vc
This commit is contained in:
parent
4b34f44792
commit
f46846bf9e
8 changed files with 8 additions and 8 deletions
Binary file not shown.
|
@ -433,7 +433,7 @@ class User(Base):
|
||||||
def profile_url(self):
|
def profile_url(self):
|
||||||
if self.agendaposter: return f"{SITE_FULL}/static/assets/images/defaultpictures/agendaposter/{random.randint(1, 51)}.webp?a=1008"
|
if self.agendaposter: return f"{SITE_FULL}/static/assets/images/defaultpictures/agendaposter/{random.randint(1, 51)}.webp?a=1008"
|
||||||
if self.profileurl: return self.profileurl
|
if self.profileurl: return self.profileurl
|
||||||
if SITE_NAME == 'rdrama.net': return f"{SITE_FULL}/static/assets/images/defaultpictures/{random.randint(1, 150)}.webp?a=1008"
|
if SITE_NAME == 'Drama': return f"{SITE_FULL}/static/assets/images/defaultpictures/{random.randint(1, 150)}.webp?a=1008"
|
||||||
return f"{SITE_FULL}/static/assets/images/default-profile-pic.webp?a=1008"
|
return f"{SITE_FULL}/static/assets/images/default-profile-pic.webp?a=1008"
|
||||||
|
|
||||||
@lazy
|
@lazy
|
||||||
|
|
|
@ -175,7 +175,7 @@ def club_ban(v, username):
|
||||||
@limiter.limit("1/second;30/minute;200/hour;1000/day")
|
@limiter.limit("1/second;30/minute;200/hour;1000/day")
|
||||||
@admin_level_required(2)
|
@admin_level_required(2)
|
||||||
def make_meme_admin(v, username):
|
def make_meme_admin(v, username):
|
||||||
if request.host == 'pcmemes.net' or (SITE_NAME == 'rdrama.net' and v.admin_level > 2) or (request.host != 'rdrama.net' and request.host != 'pcmemes.net'):
|
if request.host == 'pcmemes.net' or (SITE_NAME == 'Drama' and v.admin_level > 2) or (request.host != 'rdrama.net' and request.host != 'pcmemes.net'):
|
||||||
user = get_user(username)
|
user = get_user(username)
|
||||||
if not user: abort(404)
|
if not user: abort(404)
|
||||||
user.admin_level = 1
|
user.admin_level = 1
|
||||||
|
@ -188,7 +188,7 @@ def make_meme_admin(v, username):
|
||||||
@limiter.limit("1/second;30/minute;200/hour;1000/day")
|
@limiter.limit("1/second;30/minute;200/hour;1000/day")
|
||||||
@admin_level_required(2)
|
@admin_level_required(2)
|
||||||
def remove_meme_admin(v, username):
|
def remove_meme_admin(v, username):
|
||||||
if request.host == 'pcmemes.net' or (SITE_NAME == 'rdrama.net' and v.admin_level > 2) or (request.host != 'rdrama.net' and request.host != 'pcmemes.net'):
|
if request.host == 'pcmemes.net' or (SITE_NAME == 'Drama' and v.admin_level > 2) or (request.host != 'rdrama.net' and request.host != 'pcmemes.net'):
|
||||||
user = get_user(username)
|
user = get_user(username)
|
||||||
if not user: abort(404)
|
if not user: abort(404)
|
||||||
user.admin_level = 0
|
user.admin_level = 0
|
||||||
|
|
|
@ -17,7 +17,7 @@ def join_discord(v):
|
||||||
|
|
||||||
if v.shadowbanned: return {"error": "Internal server error"}
|
if v.shadowbanned: return {"error": "Internal server error"}
|
||||||
|
|
||||||
if SITE_NAME == 'rdrama.net' and v.admin_level == 0 and v.patron == 0 and v.truecoins < 150:
|
if SITE_NAME == 'Drama' and v.admin_level == 0 and v.patron == 0 and v.truecoins < 150:
|
||||||
return "You must receive 150 upvotes/downvotes from other users before being able to join the Discord server."
|
return "You must receive 150 upvotes/downvotes from other users before being able to join the Discord server."
|
||||||
|
|
||||||
now=int(time.time())
|
now=int(time.time())
|
||||||
|
|
|
@ -432,7 +432,7 @@ def themecolor(v):
|
||||||
@limiter.limit("1/second;30/minute;200/hour;1000/day")
|
@limiter.limit("1/second;30/minute;200/hour;1000/day")
|
||||||
@auth_required
|
@auth_required
|
||||||
def gumroad(v):
|
def gumroad(v):
|
||||||
if SITE_NAME == 'rdrama.net': patron = 'Paypig'
|
if SITE_NAME == 'Drama': patron = 'Paypig'
|
||||||
else: patron = 'Patron'
|
else: patron = 'Patron'
|
||||||
|
|
||||||
if not (v.email and v.is_activated):
|
if not (v.email and v.is_activated):
|
||||||
|
|
|
@ -342,7 +342,7 @@ def leaderboard(v):
|
||||||
else: pos11 = (users11.count()+1, 0)
|
else: pos11 = (users11.count()+1, 0)
|
||||||
users11 = users11.limit(25).all()
|
users11 = users11.limit(25).all()
|
||||||
|
|
||||||
if SITE_NAME == 'rdrama.net':
|
if SITE_NAME == 'Drama':
|
||||||
sq = g.db.query(Marsey.author_id, func.count(Marsey.author_id).label("count"), func.rank().over(order_by=func.count(Marsey.author_id).desc()).label("rank")).group_by(Marsey.author_id).subquery()
|
sq = g.db.query(Marsey.author_id, func.count(Marsey.author_id).label("count"), func.rank().over(order_by=func.count(Marsey.author_id).desc()).label("rank")).group_by(Marsey.author_id).subquery()
|
||||||
users12 = g.db.query(User, sq.c.count).join(sq, User.id==sq.c.author_id).order_by(sq.c.count.desc())
|
users12 = g.db.query(User, sq.c.count).join(sq, User.id==sq.c.author_id).order_by(sq.c.count.desc())
|
||||||
pos12 = g.db.query(User.id, sq.c.rank, sq.c.count).join(sq, User.id==sq.c.author_id).filter(User.id == v.id).one_or_none()
|
pos12 = g.db.query(User.id, sq.c.rank, sq.c.count).join(sq, User.id==sq.c.author_id).filter(User.id == v.id).one_or_none()
|
||||||
|
|
|
@ -216,7 +216,7 @@
|
||||||
{% if '@' not in request.path %}
|
{% if '@' not in request.path %}
|
||||||
{% if v %}
|
{% if v %}
|
||||||
|
|
||||||
{% if SITE_NAME == 'rdrama.net' %}
|
{% if SITE_NAME == 'Drama' %}
|
||||||
{% set path = "assets/images/" + SITE_NAME + "/banners" %}
|
{% set path = "assets/images/" + SITE_NAME + "/banners" %}
|
||||||
{% set image = "/static/" + path + "/" + listdir('files/' + path)|random() + '?a=20' %}
|
{% set image = "/static/" + path + "/" + listdir('files/' + path)|random() + '?a=20' %}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<nav class="shadow shadow-md fixed-top">
|
<nav class="shadow shadow-md fixed-top">
|
||||||
{% if SITE_NAME == 'rdrama.net' %}
|
{% if SITE_NAME == 'Drama' %}
|
||||||
<div id="srd" style="width: 100%; background-color: var(--primary); padding: 2px; text-align: center; font-weight: bold;white-space:nowrap">
|
<div id="srd" style="width: 100%; background-color: var(--primary); padding: 2px; text-align: center; font-weight: bold;white-space:nowrap">
|
||||||
<a style="color: white" class="text-small-mobile" href="https://reddit.com/r/SubredditDrama">💖🌈 welcome to rdrama.net: the official site for r/subredditdrama</a>
|
<a style="color: white" class="text-small-mobile" href="https://reddit.com/r/SubredditDrama">💖🌈 welcome to rdrama.net: the official site for r/subredditdrama</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue