forked from MarseyWorld/MarseyWorld
Merge branch 'frost' into ezra
commit
6d49a12285
|
@ -19,13 +19,14 @@ for k, val in result.items():
|
|||
|
||||
del result
|
||||
|
||||
topmakers = {}
|
||||
for k, val in marseys.items():
|
||||
if val in topmakers: topmakers[val] += 1
|
||||
else: topmakers[val] = 1
|
||||
if SITE == 'rdrama.net':
|
||||
topmakers = {}
|
||||
for k, val in marseys.items():
|
||||
if val in topmakers: topmakers[val] += 1
|
||||
else: topmakers[val] = 1
|
||||
|
||||
topmakers.pop('unknown')
|
||||
topmakers = sorted(topmakers.items(), key=lambda x: x[1], reverse=True)[:25]
|
||||
topmakers.pop('unknown')
|
||||
topmakers = sorted(topmakers.items(), key=lambda x: x[1], reverse=True)[:25]
|
||||
|
||||
AJ_REPLACEMENTS = {
|
||||
' your ': " you're ",
|
||||
|
|
|
@ -56,7 +56,7 @@ def post_pid_comment_cid(cid, pid=None, anything=None, v=None):
|
|||
if not pid:
|
||||
if comment.parent_submission: pid = comment.parent_submission
|
||||
elif request.host == "rdrama.net": pid = 6489
|
||||
elif 'pcmemes.net' == request.host: pid = 2487
|
||||
elif request.host == 'pcmemes.net': pid = 2487
|
||||
else: pid = 1
|
||||
|
||||
try: pid = int(pid)
|
||||
|
@ -305,7 +305,7 @@ def api_comment(v):
|
|||
g.db.add(c_option)
|
||||
|
||||
|
||||
if 'pcmemes.net' == request.host and c.body.lower().startswith("based"):
|
||||
if request.host == 'pcmemes.net' and c.body.lower().startswith("based"):
|
||||
pill = re.match("based and (.{1,20}?)(-| )pilled", body, re.IGNORECASE)
|
||||
|
||||
if level == 1: basedguy = get_account(c.post.author_id)
|
||||
|
|
|
@ -384,7 +384,7 @@ def settings_profile_post(v):
|
|||
updated = True
|
||||
|
||||
quadrant = request.values.get("quadrant")
|
||||
if quadrant and 'pcmemes.net' == request.host.lower():
|
||||
if quadrant and request.host == 'pcmemes.net'.lower():
|
||||
v.quadrant = quadrant
|
||||
v.customtitle = quadrant
|
||||
if quadrant=="Centrist":
|
||||
|
|
|
@ -281,7 +281,7 @@ def leaderboard(v):
|
|||
users4 = users.order_by(User.comment_count.desc()).limit(25).all()
|
||||
users5 = users.order_by(User.received_award_count.desc()).limit(25).all()
|
||||
|
||||
if 'pcmemes.net' == request.host: users6 = users.order_by(User.basedcount.desc()).limit(10).all()
|
||||
if request.host == 'pcmemes.net': users6 = users.order_by(User.basedcount.desc()).limit(10).all()
|
||||
else: users6 = None
|
||||
|
||||
users7 = users.order_by(User.coins_spent.desc()).limit(25).all()
|
||||
|
@ -304,7 +304,7 @@ def leaderboard(v):
|
|||
for user in users11: users12.append((user, badges[user.id]))
|
||||
users12 = sorted(users12, key=lambda x: x[1], reverse=True)[:25]
|
||||
|
||||
if True: users13 = topmakers
|
||||
if request.host == 'rdrama.net': users13 = topmakers
|
||||
else: users13 = None
|
||||
|
||||
return render_template(f"{template}leaderboard.html", v=v, users1=users1, users2=users2, users3=users3, users4=users4, users5=users5, users6=users6, users7=users7, users9=users9, users10=users10, users12=users12, users13=users13)
|
||||
|
|
Loading…
Reference in New Issue