diff --git a/files/helpers/const.py b/files/helpers/const.py index 148f7f6d2..cbfa61e79 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -149,6 +149,7 @@ if SITE == 'rdrama.net': JOAN_ID = 28 MOOSE_ID = 1904 AEVANN_ID = 1 + Q_ID = 1480 LAWLZ_ID = 3833 LLM_ID = 253 DAD_ID = 2513 @@ -176,6 +177,7 @@ elif SITE == "pcmemes.net": JOAN_ID = 0 MOOSE_ID = 0 AEVANN_ID = 1 + Q_ID = 0 LAWLZ_ID = 0 LLM_ID = 0 DAD_ID = 0 @@ -203,6 +205,7 @@ else: JOAN_ID = 0 MOOSE_ID = 0 AEVANN_ID = 0 + Q_ID = 0 LAWLZ_ID = 0 LLM_ID = 0 DAD_ID = 0 @@ -288,8 +291,8 @@ BADGES = { 'description': 'Contributed at least $100' }, 26: { - 'name': 'Rightoid Agendaposter', - 'description': 'Forced to use the agendaposter theme' + 'name': 'Rightoid', + 'description': 'Forced to use the rightoid theme' }, 27: { 'name': 'Lolcow', @@ -656,8 +659,8 @@ AWARDS = { }, "agendaposter": { "kind": "agendaposter", - "title": "Rightoid Agendaposter", - "description": "Forces the agendaposter theme on the recipient for 24 hours.", + "title": "Rightoid", + "description": "Forces the rightoid theme on the recipient for 24 hours.", "icon": "fas fa-snooze", "color": "text-purple", "price": 2500 diff --git a/files/routes/awards.py b/files/routes/awards.py index 483ee4901..6a4ed52d2 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -84,7 +84,7 @@ def shop(v): @auth_required def buy(v, award): if award == 'benefactor' and not request.values.get("mb"): - return {"error": "You can only buy this award with marseybux."}, 403 + return {"error": "You can only buy the Benefactor award with marseybux."}, 403 AWARDS = deepcopy(AWARDS2) diff --git a/files/routes/front.py b/files/routes/front.py index 13e27abe7..369290f8c 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -219,8 +219,8 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, filter_words=' else: cutoff = now - 86400 posts = posts.filter(Submission.created_utc >= cutoff) - if sort != "hot": posts = posts.filter_by(is_banned=False, private=False, deleted_utc = 0) - else: posts = posts.filter_by(is_banned=False, stickied=None, private=False, deleted_utc = 0) + if sort == "hot" or v.id == Q_ID: posts = posts.filter_by(is_banned=False, stickied=None, private=False, deleted_utc = 0) + else: posts = posts.filter_by(is_banned=False, private=False, deleted_utc = 0) if v and v.admin_level == 0: blocking = [x[0] for x in g.db.query( @@ -247,7 +247,7 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, filter_words=' if not (v and v.shadowbanned): posts = posts.join(User, User.id == Submission.author_id).filter(User.shadowbanned == None) - if sort == "hot": + if sort == "hot" or v.id == Q_ID: ti = int(time.time()) + 3600 posts = posts.order_by(-1000000*(Submission.realupvotes + 1 + Submission.comment_count/5)/(func.power(((ti - Submission.created_utc)/1000), 1.23))) elif sort == "new": @@ -272,7 +272,7 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, filter_words=' posts = posts[:size] - if sort == "hot" and page == 1: + if (sort == "hot" or v.id == Q_ID) and page == 1: pins = g.db.query(Submission).filter(Submission.stickied != None, Submission.is_banned == False) if v and v.admin_level == 0: blocking = [x[0] for x in g.db.query(UserBlock.target_id).filter_by(user_id=v.id).all()] diff --git a/files/templates/award_modal.html b/files/templates/award_modal.html index 2b4b5aa41..4221f1c8f 100644 --- a/files/templates/award_modal.html +++ b/files/templates/award_modal.html @@ -1,4 +1,4 @@ - + + + + \ No newline at end of file