diff --git a/files/classes/badges.py b/files/classes/badges.py index 27937a82be..2ec4d5ee26 100644 --- a/files/classes/badges.py +++ b/files/classes/badges.py @@ -55,7 +55,7 @@ class Badge(Base): @property @lazy def path(self): - return f"/static/assets/images/badges/{self.name.replace(' ','%20')}.webp?a=4" + return f"/static/assets/images/badges/{self.name.replace(' ','%20')}.webp?a=5" @property @lazy diff --git a/files/classes/submission.py b/files/classes/submission.py index 4b5a1e8d3d..4326a55e11 100644 --- a/files/classes/submission.py +++ b/files/classes/submission.py @@ -68,7 +68,7 @@ class Submission(Base): @property @lazy def comments(self): - return g.db.query(Comment.author_id, Comment.created_utc, Comment.id).filter_by(parent_submission=self.id) + return g.db.query(Comment.author_id, Comment.created_utc, Comment.id).filter(Submission.parent_submission == self.id, Submission.author_id.notin_((AUTOPOLLER_ID,AUTOBETTER_ID))) @property @lazy diff --git a/files/classes/user.py b/files/classes/user.py index 57df1c3c12..e2977dafdc 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -433,10 +433,10 @@ class User(Base): @property @lazy def profile_url(self): - if self.agendaposter: return f"https://{site}/static/assets/images/defaultpictures/agendaposter/{random.randint(1, 50)}.webp?a=202" + if self.agendaposter: return f"https://{site}/static/assets/images/defaultpictures/agendaposter/{random.randint(1, 50)}.webp?a=203" if self.profileurl: return self.profileurl if "rama" in site: return f"https://{site}/static/assets/images/defaultpictures/{random.randint(1, 150)}.webp?a=202" - return f"https://{site}/static/assets/images/default-profile-pic.webp?a=202" + return f"https://{site}/static/assets/images/default-profile-pic.webp?a=203" @lazy def json_popover(self, v): diff --git a/files/helpers/const.py b/files/helpers/const.py index 5976f5e6f7..1d7d67e8c1 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -141,7 +141,8 @@ if SITE == 'rdrama.net': AUTOPOLLER_ID = 6176 AUTOBETTER_ID = 7668 TAX_RECEIVER_ID = 995 - AUTO_UPVOTE_IDS = (2424,4245) + PIZZASHILL_ID = 2424 + HIL_ID = 4245 CRAT_ID = 747 IDIO_ID = 30 CARP_ID = 995 @@ -167,7 +168,8 @@ elif SITE == "pcmemes.net": AUTOPOLLER_ID = 3369 AUTOBETTER_ID = 1867 TAX_RECEIVER_ID = 1592 - AUTO_UPVOTE_IDS = () + PIZZASHILL_ID = 0 + HIL_ID = 0 CRAT_ID = 0 IDIO_ID = 0 CARP_ID = 0 @@ -193,7 +195,8 @@ else: AUTOPOLLER_ID = 6 AUTOBETTER_ID = 7 TAX_RECEIVER_ID = 8 - AUTO_UPVOTE_IDS = () + PIZZASHILL_ID = 0 + HIL_ID = 0 CRAT_ID = 0 IDIO_ID = 0 CARP_ID = 0 diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index 62bf6c4ff3..6ed4086254 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -109,7 +109,7 @@ def sanitize(sanitized, noimages=False, alert=False, comment=False): for i in re.finditer("

@((\w|-){1,25})", sanitized): u = get_user(i.group(1), graceful=True) if u: - sanitized = sanitized.replace(i.group(0), f'''

@{u.username}'s profile picture@{u.username}''') + sanitized = sanitized.replace(i.group(0), f'''

@{u.username}'s profile picture@{u.username}''', 1) else: sanitized = re.sub('(^|\s|\n|

)\/?((r|u)\/\w{3,25})', r'\1\2', sanitized) @@ -118,9 +118,9 @@ def sanitize(sanitized, noimages=False, alert=False, comment=False): if u and (not g.v.any_block_exists(u) or g.v.admin_level > 1): if noimages: - sanitized = sanitized.replace(i.group(0), f'{i.group(1)}@{u.username}') + sanitized = sanitized.replace(i.group(0), f'{i.group(1)}@{u.username}', 1) else: - sanitized = sanitized.replace(i.group(0), f'''{i.group(1)}@{u.username}'s profile picture@{u.username}''') + sanitized = sanitized.replace(i.group(0), f'''{i.group(1)}@{u.username}'s profile picture@{u.username}''', 1) for i in re.finditer('https://i\.imgur\.com/(([^_]*?)\.(jpg|png|jpeg))', sanitized): diff --git a/files/routes/admin.py b/files/routes/admin.py index e0b2ef440b..19f12588cd 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -58,6 +58,9 @@ def remove_admin(v, username): @limiter.limit("1/second;30/minute;200/hour;1000/day") @admin_level_required(3) def distribute(v, comment): + autobetter = g.db.query(User).filter_by(id=AUTOBETTER_ID).one_or_none() + if autobetter.coins == 0: return {"error": "@AutoBetter has 0 coins"} + try: comment = int(comment) except: abort(400) post = g.db.query(Comment.parent_submission).filter_by(id=comment).one_or_none()[0] @@ -67,6 +70,10 @@ def distribute(v, comment): for option in post.bet_options: pool += option.upvotes pool *= 200 + autobetter.coins -= pool + if autobetter.coins < 0: autobetter.coins = 0 + g.db.add(autobetter) + votes = g.db.query(CommentVote).filter_by(comment_id=comment) coinsperperson = int(pool / votes.count()) @@ -76,11 +83,6 @@ def distribute(v, comment): u.coins += coinsperperson add_notif(cid, u.id) - autobetter = g.db.query(User).filter_by(id=AUTOBETTER_ID).one_or_none() - autobetter.coins -= pool - if autobetter.coins < 0: return {"error": "Not enough coins in bool"}, 400 - g.db.add(autobetter) - cid = notif_comment(f"You lost the 200 coins you bet on [{post.permalink}]({post.permalink}) :marseylaugh:") cids = [x.id for x in post.bet_options] cids.remove(comment) @@ -500,14 +502,11 @@ def users_list(v): @admin_level_required(2) def alt_votes_get(v): - if not request.values.get("u1") or not request.values.get("u2"): - return render_template("admin/alt_votes.html", v=v) - u1 = request.values.get("u1") u2 = request.values.get("u2") if not u1 or not u2: - return redirect("/admin/alt_votes") + return render_template("admin/alt_votes.html", v=v) u1 = get_user(u1) u2 = get_user(u2) diff --git a/files/routes/awards.py b/files/routes/awards.py index 5abef536b2..f99c9a3417 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -356,7 +356,8 @@ def award_post(pid, v): g.db.add(post.author) g.db.commit() - if request.referrer and len(request.referrer) > 1: return redirect(request.referrer) + if request.referrer and len(request.referrer) > 1 and (request.referrer.startswith('/') or request.referrer.startswith(request.host_url)): + return redirect(request.referrer) else: return redirect("/") @@ -540,7 +541,8 @@ def award_comment(cid, v): g.db.add(c.author) g.db.commit() - if request.referrer and len(request.referrer) > 1: return redirect(request.referrer) + if request.referrer and len(request.referrer) > 1 and (request.referrer.startswith('/') or request.referrer.startswith(request.host_url)): + return redirect(request.referrer) else: return redirect("/") @app.get("/admin/awards") diff --git a/files/routes/comments.py b/files/routes/comments.py index 166c4ef3d0..ef3534d287 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -469,29 +469,32 @@ def api_comment(v): if len(c.body) > 500: notifbody = c.body[:500] + '...' else: notifbody = c.body - beams_client.publish_to_interests( - interests=[f'{request.host}{parent.author.id}'], - publish_body={ - 'web': { - 'notification': { - 'title': f'New reply by @{v.username}', - 'body': notifbody, - 'deep_link': f'https://{site}/comment/{c.id}?context=9&read=true#context', - 'icon': f'https://{request.host}/assets/images/{SITE_NAME}/icon.webp', - } - }, - 'fcm': { - 'notification': { - 'title': f'New reply by @{v.username}', - 'body': notifbody, + try: + beams_client.publish_to_interests( + interests=[f'{request.host}{parent.author.id}'], + publish_body={ + 'web': { + 'notification': { + 'title': f'New reply by @{v.username}', + 'body': notifbody, + 'deep_link': f'https://{site}/comment/{c.id}?context=9&read=true#context', + 'icon': f'https://{request.host}/assets/images/{SITE_NAME}/icon.webp', + } }, - 'data': { - 'url': f'comment/{c.id}?context=9&read=true#context', + 'fcm': { + 'notification': { + 'title': f'New reply by @{v.username}', + 'body': notifbody, + }, + 'data': { + 'url': f'comment/{c.id}?context=9&read=true#context', + } } - } - }, - ) - + }, + ) + except Exception as e: + print(e) + print(c.id) vote = CommentVote(user_id=v.id, @@ -512,7 +515,7 @@ def api_comment(v): c.voted = 1 - if v.id in AUTO_UPVOTE_IDS: + if v.id == PIZZASHILL_ID: autovote = CommentVote(user_id=CARP_ID, comment_id=c.id, vote_type=1) g.db.add(autovote) autovote = CommentVote(user_id=AEVANN_ID, comment_id=c.id, vote_type=1) @@ -524,6 +527,14 @@ def api_comment(v): g.db.add(v) c.upvotes += 3 g.db.add(c) + elif v.id == HIL_ID: + autovote = CommentVote(user_id=CARP_ID, comment_id=c.id, vote_type=1) + g.db.add(autovote) + v.coins += 1 + v.truecoins += 1 + g.db.add(v) + c.upvotes += 1 + g.db.add(c) g.db.commit() diff --git a/files/routes/errors.py b/files/routes/errors.py index 31a33760f2..9c36a9a404 100644 --- a/files/routes/errors.py +++ b/files/routes/errors.py @@ -13,13 +13,12 @@ def error_400(e): @app.errorhandler(401) def error_401(e): - path = request.path - qs = urlencode(dict(request.values)) - argval = quote(f"{path}?{qs}", safe='') - output = f"/login?redirect={argval}" - if request.headers.get("Authorization") or request.headers.get("xhr"): return {"error": "401 Not Authorized"}, 401 - else: return redirect(output) + else: + path = request.path + qs = urlencode(dict(request.values)) + argval = quote(f"{path}?{qs}", safe='') + return redirect(f"/login?redirect={argval}") @app.errorhandler(403) @@ -61,4 +60,6 @@ def error_500(e): @app.post("/allow_nsfw") def allow_nsfw(): session["over_18"] = int(time.time()) + 3600 - return redirect(request.values.get("redir", "/")) \ No newline at end of file + redir = request.values.get("redir") + if redir and redir.startswith(request.host_url) or redir.startswith('/'): return redirect(redir) + return redirect('/') \ No newline at end of file diff --git a/files/routes/front.py b/files/routes/front.py index de7a471beb..4d61f9c0ec 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -6,11 +6,6 @@ from files.classes.submission import Submission defaulttimefilter = environ.get("DEFAULT_TIME_FILTER", "all").strip() SITE_NAME = environ.get("SITE_NAME", "").strip() -@app.get("/post/") -@auth_required -def slash_post(v): - return redirect("/") - @app.post("/clear") @auth_required def clear(v): @@ -123,7 +118,8 @@ def notifications(v): @auth_desired def front_all(v): - if not v and request.path == "/" and not request.headers.get("Authorization"): return redirect(f"/logged_out{request.full_path}") + if not v and request.path == "/" and not request.headers.get("Authorization"): + return redirect(f"/logged_out{request.full_path}") if v and request.path.startswith('/logged_out'): v = None @@ -436,7 +432,7 @@ def comment_idlist(page=1, v=None, nsfw=False, sort="new", t="all"): elif sort == "controversial": comments = comments.order_by(-1 * Comment.upvotes * Comment.downvotes * Comment.downvotes) elif sort == "top": - comments = comments.order_by(Comment.realupvotes.desc()) + comments = comments.order_by(Comment.downvotes - Comment.upvotes) elif sort == "bottom": comments = comments.order_by(Comment.upvotes - Comment.downvotes) @@ -466,4 +462,18 @@ def all_comments(v): idlist = idlist[:25] if request.headers.get("Authorization"): return {"data": [x.json for x in comments]} - return render_template("home_comments.html", v=v, sort=sort, t=t, page=page, comments=comments, standalone=True, next_exists=next_exists) \ No newline at end of file + return render_template("home_comments.html", v=v, sort=sort, t=t, page=page, comments=comments, standalone=True, next_exists=next_exists) + + +@app.get("/transfers") +@auth_required +def transfers(v): + + page = int(request.values.get("page", 1)) + + comments = g.db.query(Comment).filter(Comment.author_id == NOTIFICATIONS_ID, Comment.parent_submission == None, Comment.distinguish_level == 6, Comment.body_html.like("% has transferred %"), Comment.created_utc == 0).offset(25 * (page - 1)).limit(26).all() + + next_exists = len(comments) > 25 + comments = comments[:25] + + return render_template("transfers.html", v=v, page=page, comments=comments, standalone=True, next_exists=next_exists) \ No newline at end of file diff --git a/files/routes/login.py b/files/routes/login.py index 0a44b9c615..ff479a9ec0 100644 --- a/files/routes/login.py +++ b/files/routes/login.py @@ -12,13 +12,14 @@ valid_password_regex = re.compile("^.{8,100}$") @auth_desired def login_get(v): - redir = request.values.get("redirect", "/").replace("/logged_out", "").strip() - if v: - return redirect(redir) + redir = request.values.get("redirect") + if redir: + redir = redir.replace("/logged_out", "").strip() + if not redir.startswith(request.host_url) and not redir.startswith('/'): redir = None - return render_template("login.html", - failed=False, - redirect=redir) + if v and redir: return redirect(redir) + + return render_template("login.html", failed=False, redirect=redir) def check_for_alts(current_id): @@ -137,10 +138,13 @@ def login_post(): if account.id != PW_ID: check_for_alts(account.id) - redir = request.values.get("redirect", "/").replace("/logged_out", "").strip() - g.db.commit() + redir = request.values.get("redirect") + if redir: + redir = redir.replace("/logged_out", "").strip() + if not redir.startswith(request.host_url) and not redir.startswith('/'): redir = '/' + return redirect(redir) diff --git a/files/routes/posts.py b/files/routes/posts.py index 3618feda77..28b6700d81 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -96,7 +96,8 @@ def submit_get(v): @app.get("/logged_out/post//") @auth_desired def post_id(pid, anything=None, v=None): - if not v and not request.path.startswith('/logged_out') and not request.headers.get("Authorization"): return redirect(f"/logged_out{request.full_path}") + if not v and not request.path.startswith('/logged_out') and not request.headers.get("Authorization"): + return redirect(f"/logged_out{request.full_path}") if v and request.path.startswith('/logged_out'): v = None @@ -169,7 +170,7 @@ def post_id(pid, anything=None, v=None): elif sort == "controversial": comments = comments.order_by(-1 * Comment.upvotes * Comment.downvotes * Comment.downvotes) elif sort == "top": - comments = comments.order_by(-Comment.upvotes - Comment.downvotes) + comments = comments.order_by(Comment.realupvotes.desc()) elif sort == "bottom": comments = comments.order_by(Comment.upvotes - Comment.downvotes) @@ -186,7 +187,7 @@ def post_id(pid, anything=None, v=None): elif sort == "controversial": comments = comments.order_by(-1 * Comment.upvotes * Comment.downvotes * Comment.downvotes) elif sort == "top": - comments = comments.order_by(-Comment.upvotes - Comment.downvotes) + comments = comments.order_by(Comment.realupvotes.desc()) elif sort == "bottom": comments = comments.order_by(Comment.upvotes - Comment.downvotes) @@ -288,7 +289,7 @@ def viewmore(v, pid, sort, offset): elif sort == "controversial": comments = comments.order_by(-1 * Comment.upvotes * Comment.downvotes * Comment.downvotes) elif sort == "top": - comments = comments.order_by(-Comment.upvotes - Comment.downvotes) + comments = comments.order_by(Comment.realupvotes.desc()) elif sort == "bottom": comments = comments.order_by(Comment.upvotes - Comment.downvotes) @@ -305,7 +306,7 @@ def viewmore(v, pid, sort, offset): elif sort == "controversial": comments = comments.order_by(-1 * Comment.upvotes * Comment.downvotes * Comment.downvotes) elif sort == "top": - comments = comments.order_by(-Comment.upvotes - Comment.downvotes) + comments = comments.order_by(Comment.realupvotes.desc()) elif sort == "bottom": comments = comments.order_by(Comment.upvotes - Comment.downvotes) @@ -1064,6 +1065,7 @@ def submit_post(v): title = url_match.group(5) if "Snapshots:\n\n" not in body: body += "Snapshots:\n\n" + if f'**[{title}]({href})**:\n\n' in body: continue body += f'**[{title}]({href})**:\n\n' if href.startswith('https://old.reddit.com/'): body += f'* [unddit.com](https://unddit.com/{href.replace("https://old.reddit.com/", "")})\n' @@ -1106,7 +1108,7 @@ def submit_post(v): send_discord_message(f"https://{site}{new_post.permalink}") cache.delete_memoized(changeloglist) - if v.id in AUTO_UPVOTE_IDS: + if v.id in (PIZZASHILL_ID, HIL_ID): autovote = Vote(user_id=CARP_ID, submission_id=new_post.id, vote_type=1) g.db.add(autovote) autovote = Vote(user_id=AEVANN_ID, submission_id=new_post.id, vote_type=1) diff --git a/files/routes/search.py b/files/routes/search.py index cc80f82f0f..f23843f74b 100644 --- a/files/routes/search.py +++ b/files/routes/search.py @@ -255,7 +255,7 @@ def searchcomments(v): elif sort == "controversial": comments = comments.order_by(-1 * Comment.upvotes * Comment.downvotes * Comment.downvotes) elif sort == "top": - comments = comments.order_by(Comment.realupvotes.desc()) + comments = comments.order_by(Comment.downvotes - Comment.upvotes) elif sort == "bottom": comments = comments.order_by(Comment.upvotes - Comment.downvotes) diff --git a/files/routes/settings.py b/files/routes/settings.py index 9591e9070c..f2642f5aa2 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -473,7 +473,7 @@ def gumroad(v): send_repeatable_notification(v.id, f"You have received {procoins} Marseybux! You can use them to buy awards in the [shop](/shop).") if v.truecoins > 150 and v.patron: v.cluballowed = True - if v.patron > 3 and v.verified == None: v.verified = "Verified" + if v.patron > 1 and v.verified == None: v.verified = "Verified" g.db.add(v) diff --git a/files/routes/users.py b/files/routes/users.py index cb423d2fa6..b8580474ea 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -244,11 +244,13 @@ def transfer_coins(v, username): tax = math.ceil(amount*0.03) tax_receiver = g.db.query(User).filter_by(id=TAX_RECEIVER_ID).one_or_none() tax_receiver.coins += tax - log_message = f"[@{v.username}](/id/{v.id}) has transferred {amount} {app.config['COINS_NAME']} to [@{receiver.username}]({receiver.id})" - send_repeatable_notification(TAX_RECEIVER_ID, log_message) g.db.add(tax_receiver) else: tax = 0 + if TAX_RECEIVER_ID: + log_message = f"[@{v.username}](/id/{v.id}) has transferred {amount} {app.config['COINS_NAME']} to [@{receiver.username}]({receiver.id})" + send_repeatable_notification(TAX_RECEIVER_ID, log_message) + receiver.coins += amount-tax v.coins -= amount send_repeatable_notification(receiver.id, f"🤑 [@{v.username}](/id/{v.id}) has gifted you {amount-tax} {app.config['COINS_NAME']}!") @@ -436,7 +438,7 @@ def message2(v, username): if len(message) > 500: notifbody = message[:500] + '...' else: notifbody = message - + beams_client.publish_to_interests( interests=[f'{request.host}{user.id}'], publish_body={ @@ -628,7 +630,7 @@ def u_username(username, v=None): if username != u.username: - return redirect(request.path.replace(username, u.username)) + return redirect(request.full_path.replace(username, u.username)) if u.reserved: if request.headers.get("Authorization") or request.headers.get("xhr"): return {"error": f"That username is reserved for: {u.reserved}"} @@ -796,7 +798,7 @@ def u_username_comments(username, v=None): elif sort == "controversial": comments = comments.order_by(-1 * Comment.upvotes * Comment.downvotes * Comment.downvotes) elif sort == "top": - comments = comments.order_by(Comment.realupvotes.desc()) + comments = comments.order_by(Comment.downvotes - Comment.upvotes) elif sort == "bottom": comments = comments.order_by(Comment.upvotes - Comment.downvotes) diff --git a/files/routes/votes.py b/files/routes/votes.py index 5e8083aa0e..79c6564a0c 100644 --- a/files/routes/votes.py +++ b/files/routes/votes.py @@ -102,7 +102,7 @@ def api_vote_post(post_id, new, v): post.author.coins += 1 post.author.truecoins += 1 g.db.add(post.author) - real = (bool(v.profileurl) or bool(v.customtitle) or v.namecolor != defaultcolor) and not v.agendaposter and not v.shadowbanned + real = new == -1 or (not v.agendaposter and not v.shadowbanned and (bool(v.profileurl) or bool(v.customtitle) or v.namecolor != defaultcolor)) vote = Vote(user_id=v.id, vote_type=new, submission_id=post_id, @@ -115,7 +115,7 @@ def api_vote_post(post_id, new, v): g.db.flush() post.upvotes = g.db.query(Vote.id).filter_by(submission_id=post.id, vote_type=1).count() post.downvotes = g.db.query(Vote.id).filter_by(submission_id=post.id, vote_type=-1).count() - post.realupvotes = g.db.query(Vote.id).filter_by(submission_id=post.id, vote_type=1, real=True).count() - g.db.query(Vote.id).filter_by(submission_id=post.id, vote_type=1, real=False).count() + g.db.query(Vote.id).filter_by(submission_id=post.id, vote_type=-1).count() + post.realupvotes = g.db.query(Vote.id).filter_by(submission_id=post.id, real=True).count() if post.author.progressivestack: post.realupvotes *= 2 g.db.add(post) g.db.commit() @@ -167,7 +167,7 @@ def api_vote_comment(comment_id, new, v): comment.author.coins += 1 comment.author.truecoins += 1 g.db.add(comment.author) - real = (bool(v.profileurl) or bool(v.customtitle) or v.namecolor != defaultcolor) and not v.agendaposter and not v.shadowbanned + real = new == -1 or (not v.agendaposter and not v.shadowbanned and (bool(v.profileurl) or bool(v.customtitle) or v.namecolor != defaultcolor)) vote = CommentVote(user_id=v.id, vote_type=new, comment_id=comment_id, @@ -181,7 +181,7 @@ def api_vote_comment(comment_id, new, v): g.db.flush() comment.upvotes = g.db.query(CommentVote.id).filter_by(comment_id=comment.id, vote_type=1).count() comment.downvotes = g.db.query(CommentVote.id).filter_by(comment_id=comment.id, vote_type=-1).count() - comment.realupvotes = g.db.query(CommentVote.id).filter_by(comment_id=comment.id, vote_type=1, real=True).count() - g.db.query(CommentVote.id).filter_by(comment_id=comment.id, vote_type=1, real=False).count() + g.db.query(CommentVote.id).filter_by(comment_id=comment.id, vote_type=-1).count() + comment.realupvotes = g.db.query(CommentVote.id).filter_by(comment_id=comment.id, real=True).count() if comment.author.progressivestack: comment.realupvotes *= 2 g.db.add(comment) g.db.commit() diff --git a/files/templates/admin/badge_grant.html b/files/templates/admin/badge_grant.html index fa280c8324..10b4d2f7ea 100644 --- a/files/templates/admin/badge_grant.html +++ b/files/templates/admin/badge_grant.html @@ -60,7 +60,7 @@ - + {{v['name']}} {{v['description']}} diff --git a/files/templates/admin/badge_remove.html b/files/templates/admin/badge_remove.html index 2bf7ad2c1f..c225978c38 100644 --- a/files/templates/admin/badge_remove.html +++ b/files/templates/admin/badge_remove.html @@ -60,7 +60,7 @@ - + {{v['name']}} {{v['description']}} diff --git a/files/templates/authforms.html b/files/templates/authforms.html index 5645ac9048..e2632b5233 100644 --- a/files/templates/authforms.html +++ b/files/templates/authforms.html @@ -15,7 +15,7 @@ {% if v %} - + {% if v.agendaposter %} - + {% endif %} @@ -111,7 +111,7 @@

- cover + cover diff --git a/files/templates/badges.html b/files/templates/badges.html index 364ad22497..f244aab80b 100644 --- a/files/templates/badges.html +++ b/files/templates/badges.html @@ -21,7 +21,7 @@ {% for k,v in badges.items() %} {{v['name']}} - {{v['name']}} + {{v['name']}} {{v['description']}} {% endfor %} diff --git a/files/templates/comments.html b/files/templates/comments.html index 07af7358df..f488fc9a50 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -149,8 +149,8 @@ {% if c.post and c.post.over_18 %}+18{% endif %} {% if c.post %} - {% if c.author_id==v.id and c.child_comments and is_notification_page%} - Comment {{'Replies' if (c.child_comments | length)>1 else 'Reply'}}: {{c.post.realtitle(v) | safe}} + {% if c.author_id==v.id and replies and is_notification_page%} + Comment {{'Replies' if (replies | length)>1 else 'Reply'}}: {{c.post.realtitle(v) | safe}} {% elif c.post.author_id==v.id and c.level == 1 and is_notification_page%} Post Reply: {{c.post.realtitle(v) | safe}} {% elif is_notification_page and c.parent_submission in v.subscribed_idlist() %} @@ -217,7 +217,7 @@ {% endif %} @{{c.author.username}}'s profile picture{{c.author.username}} - {% if c.author.customtitle %}  {% if c.author.quadrant %}{{c.author.quadrant}} quadrant{% endif %}{{c.author.customtitle | safe}}{% endif %} + {% if c.author.customtitle %}  {% if c.author.quadrant %}{{c.author.quadrant}} quadrant{% endif %}{{c.author.customtitle | safe}}{% endif %} {% if c.parent_comment_id and not standalone and level != 1 %}{{c.parent_comment.author.username}}{% endif %} diff --git a/files/templates/default.html b/files/templates/default.html index dca273a80a..53bbae16fd 100644 --- a/files/templates/default.html +++ b/files/templates/default.html @@ -7,7 +7,7 @@ {% if v %} - + {% if v.agendaposter %} - + {% endif %} diff --git a/files/templates/emoji_modal.html b/files/templates/emoji_modal.html index f4a851b352..16d4bcfe45 100644 --- a/files/templates/emoji_modal.html +++ b/files/templates/emoji_modal.html @@ -29,6 +29,9 @@ + @@ -70,6 +73,9 @@
+
+
+
@@ -80,7 +86,7 @@ - + - + {% if v.agendaposter %} - + {% endif %}
@@ -56,10 +56,10 @@ diff --git a/files/templates/login_2fa.html b/files/templates/login_2fa.html index dd6f064ad1..20af269c0b 100644 --- a/files/templates/login_2fa.html +++ b/files/templates/login_2fa.html @@ -14,7 +14,7 @@ 2-Step Login - {{SITE_NAME}} - + @@ -94,7 +94,7 @@
- cover + cover
diff --git a/files/templates/marseys.html b/files/templates/marseys.html index f9868c2d52..7332d912d0 100644 --- a/files/templates/marseys.html +++ b/files/templates/marseys.html @@ -19,7 +19,7 @@ {{loop.index}} {{k[0]}} - :{{k[0]}}: + :{{k[0]}}: {{k[2]}} {% if k[1] in ('anton-d','unknown') %}{{k[1]}}{% else %}@{{k[1]}}'s profile picture{{k[1]}}{% endif %} diff --git a/files/templates/patrons.html b/files/templates/patrons.html index be02a72370..e2e36ab0cd 100644 --- a/files/templates/patrons.html +++ b/files/templates/patrons.html @@ -14,7 +14,7 @@ {{loop.index}} @{{u.username}}'s profile picture{{u.username}} - Patron-{{u.patron}} + Patron-{{u.patron}} {% endfor %} diff --git a/files/templates/settings.html b/files/templates/settings.html index a394ad030f..f3cb88500c 100644 --- a/files/templates/settings.html +++ b/files/templates/settings.html @@ -34,7 +34,7 @@ - + {% if v.agendaposter %} - + {% else %} - + {% endif %} diff --git a/files/templates/sidebar_Drama.html b/files/templates/sidebar_Drama.html index 984236bd0f..90128ab051 100644 --- a/files/templates/sidebar_Drama.html +++ b/files/templates/sidebar_Drama.html @@ -1,6 +1,6 @@ diff --git a/files/templates/sign_up_failed_ref.html b/files/templates/sign_up_failed_ref.html index a260ae1ddf..49af3aacd8 100644 --- a/files/templates/sign_up_failed_ref.html +++ b/files/templates/sign_up_failed_ref.html @@ -32,7 +32,7 @@ {% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}{{SITE_NAME}}{% endif %} - + @@ -84,7 +84,7 @@
- cover + cover diff --git a/files/templates/submission.html b/files/templates/submission.html index ee47b7d1ee..e59a226fdd 100644 --- a/files/templates/submission.html +++ b/files/templates/submission.html @@ -65,7 +65,7 @@ {% if p.award_count("wholesome") > 1 %} - :#marseywholesome: + :#marseywholesome: {% endif %} @@ -73,7 +73,7 @@ {% if p.award_count("wholesome") > 2 %} - :#marseywholesome: + :#marseywholesome: {% endif %} @@ -81,7 +81,7 @@ {% if p.award_count("wholesome") > 3 %} - :#marseywholesome: + :#marseywholesome: {% endif %} @@ -118,25 +118,25 @@ - :#marseytrain: + :#marseytrain: {% endif %} {% if p.award_count("train") > 1 %} - :#marseytrain: + :#marseytrain: {% endif %} {% if p.award_count("train") > 2 %} - :#marseytrain: + :#marseytrain: {% endif %} {% if p.award_count("train") > 3 %} - :#marseytrain: + :#marseytrain: {% endif %} @@ -367,7 +367,7 @@ {% if p.active_flags %}
{{p.active_flags}} Reports{% endif %} {% if p.author.verified %} {% endif %} - @{{p.author.username}}'s profile picture{{p.author.username}}{% if p.author.customtitle %}  {% if p.author.quadrant %}{{p.author.quadrant}} quadrant{% endif %}{{p.author.customtitle | safe}}{% endif %} + @{{p.author.username}}'s profile picture{{p.author.username}}{% if p.author.customtitle %}  {% if p.author.quadrant %}{{p.author.quadrant}} quadrant{% endif %}{{p.author.customtitle | safe}}{% endif %}  {{p.age_string}} ({% if p.is_image %}image post{% elif p.is_video %}video post{% elif p.realurl(v) %}{{p.domain}}{% else %}text post{% endif %}) diff --git a/files/templates/submission_listing.html b/files/templates/submission_listing.html index 0734877a34..d4ab864f32 100644 --- a/files/templates/submission_listing.html +++ b/files/templates/submission_listing.html @@ -63,11 +63,9 @@ {% for p in listing %} {% set ups=p.upvotes %} @@ -135,7 +133,7 @@
{% if p.club and not (v and (v.paid_dues or v.id == p.author_id)) %} - post thumnail + post thumnail {% elif not p.url %} post thumnail @@ -191,7 +189,7 @@ {% if p.active_flags %}{{p.active_flags}} Reports{% endif %} {% if p.author.verified %} {% endif %} - @{{p.author.profile_url}}'s profile picture{{p.author.username}}{% if p.author.customtitle %}  {% if p.author.quadrant %}{{p.author.quadrant}} quadrant{% endif %}{{p.author.customtitle | safe}}{% endif %} + @{{p.author.profile_url}}'s profile picture{{p.author.username}}{% if p.author.customtitle %}  {% if p.author.quadrant %}{{p.author.quadrant}} quadrant{% endif %}{{p.author.customtitle | safe}}{% endif %}  {{p.age_string}}   ({% if p.is_image %}image post{% elif p.is_video %}video post{% elif p.realurl(v) %}{{p.domain}}{% else %}text post{% endif %}) diff --git a/files/templates/submit.html b/files/templates/submit.html index 1b54ec235b..edb069aba4 100644 --- a/files/templates/submit.html +++ b/files/templates/submit.html @@ -26,7 +26,7 @@ {% block stylesheets %} {% if v %} - + {% if v.agendaposter %} - + {% endif %} {% endblock %} diff --git a/files/templates/transfers.html b/files/templates/transfers.html new file mode 100644 index 0000000000..42cbdbb7b3 --- /dev/null +++ b/files/templates/transfers.html @@ -0,0 +1,42 @@ +{% extends "default.html" %} + +{% block PseudoSubmitForm %}{% endblock %} +{% block sortnav %}{% endblock %} + +{% block content %} +

+	
+ +
+ +
+ + {% include "comments.html" %} + +
+
+
+ + +{% endblock %} + +{% block pagenav %} + +{% endblock %} \ No newline at end of file diff --git a/files/templates/userpage.html b/files/templates/userpage.html index 31ede85d44..cc72758f49 100644 --- a/files/templates/userpage.html +++ b/files/templates/userpage.html @@ -95,7 +95,7 @@
- {% if u.customtitle %}

{% if u.quadrant %}{{u.quadrant}} quadrant{% endif %}{{u.customtitle | safe}}

+ {% if u.customtitle %}

{% if u.quadrant %}{{u.quadrant}} quadrant{% endif %}{{u.customtitle | safe}}

{% else %}

 				{% endif %}
 
@@ -184,7 +184,7 @@
 							 
 							
 							 
-							
+							
 						
 
 						
@@ -368,7 +368,7 @@ {% if v and v.has_follower(u) and not v.is_nofollow %} Follows you {% endif %} - {% if u.customtitle %}

{% if u.quadrant %}@{{u.quadrant}} quadrant{% endif %}{{u.customtitle | safe}}

+ {% if u.customtitle %}

{% if u.quadrant %}@{{u.quadrant}} quadrant{% endif %}{{u.customtitle | safe}}

{% else %}

 				{% endif %}
@@ -473,7 +473,7 @@
 						 
 						
 						 
-						
+						
 					
 
 					
@@ -730,7 +730,7 @@ -{% if v %} +{% if v and v.id != u.id and '/comments' not in request.path %} {% include "emoji_modal.html" %} {% endif %}