diff --git a/files/classes/comment.py b/files/classes/comment.py index 7e133be73..37d0970c9 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -87,12 +87,12 @@ class Comment(Base): @property @lazy def options(self): - return [x for x in self.child_comments if x.author_id == AUTOPOLLER_ID] + return (x for x in self.child_comments if x.author_id == AUTOPOLLER_ID) @property @lazy def choices(self): - return [x for x in self.child_comments if x.author_id == AUTOCHOICE_ID] + return (x for x in self.child_comments if x.author_id == AUTOCHOICE_ID) def total_poll_voted(self, v): if v: diff --git a/files/classes/slots.py b/files/classes/slots.py index a1e5f389d..03baf98ab 100644 --- a/files/classes/slots.py +++ b/files/classes/slots.py @@ -9,7 +9,7 @@ def shuffle(stuff): class Slots: command_word = "!slots" casino_word = "!slotsmb" - if SITE == 'rdrama.net': minimum_bet = 100 + if SITE_NAME == 'Drama': minimum_bet = 100 else: minimum_bet = 10 maximum_bet = INFINITY payout_to_symbols = { diff --git a/files/helpers/const.py b/files/helpers/const.py index 453fb6020..ca53e2171 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -127,7 +127,7 @@ def torture_ap(body, username): return body -LONGPOST_REPLIES = ('Wow, you must be a JP fan.', 'This is one of the worst posts I have EVER seen. Delete it.', "No, don't reply like this, please do another wall of unhinged rant please.", '# 😴😴😴', "Ma'am we've been over this before. You need to stop.", "I've known more coherent downies.", "Your pulitzer's in the mail", "That's great and all, but I asked for my burger without cheese.", 'That degree finally paying off', "That's nice sweaty. Why don't you have a seat in the time out corner with Pizzashill until you calm down, then you can have your Capri Sun.", "All them words won't bring your pa back.", "You had a chance to not be completely worthless, but it looks like you threw it away. At least you're consistent.", 'Some people are able to display their intelligence by going on at length on a subject and never actually saying anything. This ability is most common in trades such as politics, public relations, and law. You have impressed me by being able to best them all, while still coming off as an absolute idiot.', "You can type 10,000 characters and you decided that these were the one's that you wanted.", 'Have you owned the libs yet?', "I don't know what you said, because I've seen another human naked.", 'Impressive. Normally people with such severe developmental disabilities struggle to write much more than a sentence or two. He really has exceded our expectations for the writing portion. Sadly the coherency of his writing, along with his abilities in the social skills and reading portions, are far behind his peers with similar disabilities.', "This is a really long way of saying you don't fuck.", "Sorry ma'am, looks like his delusions have gotten worse. We'll have to admit him.", ':#marseywoah:', 'If only you could put that energy into your relationships', 'Posts like this is why I do Heroine.', 'still unemployed then?', 'K', 'look im gunna have 2 ask u 2 keep ur giant dumps in the toilet not in my replys 😷😷😷', "Mommy is soooo proud of you, sweaty. Let's put this sperg out up on the fridge with all your other failures.", "Good job bobby, here's a star", "That was a mistake. You're about to find out the hard way why.", 'You sat down and wrote all this shit. You could have done so many other things with your life. What happened to your life that made you decide writing novels of bullshit on rdrama.net was the best option?', "I don't have enough spoons to read this shit", "All those words won't bring daddy back.", 'OUT!', "Damn, you're really mad over this, but thanks for the effort you put into typing that all out! Sadly I won't read it all.", "Jesse what the fuck are you talking about??") +LONGPOST_REPLIES = ('Wow, you must be a JP fan.', 'This is one of the worst posts I have EVER seen. Delete it.', "No, don't reply like this, please do another wall of unhinged rant please.", '# 😴😴😴', "Ma'am we've been over this before. You need to stop.", "I've known more coherent downies.", "Your pulitzer's in the mail", "That's great and all, but I asked for my burger without cheese.", 'That degree finally paying off', "That's nice sweaty. Why don't you have a seat in the time out corner with Pizzashill until you calm down, then you can have your Capri Sun.", "All them words won't bring your pa back.", "You had a chance to not be completely worthless, but it looks like you threw it away. At least you're consistent.", 'Some people are able to display their intelligence by going on at length on a subject and never actually saying anything. This ability is most common in trades such as politics, public relations, and law. You have impressed me by being able to best them all, while still coming off as an absolute idiot.', "You can type 10,000 characters and you decided that these were the one's that you wanted.", 'Have you owned the libs yet?', "I don't know what you said, because I've seen another human naked.", 'Impressive. Normally people with such severe developmental disabilities struggle to write much more than a sentence or two. He really has exceded our expectations for the writing portion. Sadly the coherency of his writing, along with his abilities in the social skills and reading portions, are far behind his peers with similar disabilities.', "This is a really long way of saying you don't fuck.", "Sorry ma'am, looks like his delusions have gotten worse. We'll have to admit him.", ':#marseywoah:', 'If only you could put that energy into your relationships', 'Posts like this is why I do Heroine.', 'still unemployed then?', 'K', 'look im gunna have 2 ask u 2 keep ur giant dumps in the toilet not in my replys 😷😷😷', "Mommy is soooo proud of you, sweaty. Let's put this sperg out up on the fridge with all your other failures.", "Good job bobby, here's a star", "That was a mistake. You're about to find out the hard way why.", f'You sat down and wrote all this shit. You could have done so many other things with your life. What happened to your life that made you decide writing novels of bullshit on {SITE} was the best option?', "I don't have enough spoons to read this shit", "All those words won't bring daddy back.", 'OUT!', "Damn, you're really mad over this, but thanks for the effort you put into typing that all out! Sadly I won't read it all.", "Jesse what the fuck are you talking about??") AGENDAPOSTER_PHRASE = 'black lives matter' @@ -138,7 +138,7 @@ AGENDAPOSTER_MSG = """Hi @{username},\n\nYour {type} has been automatically remo included. \n\n*This is an automated message; if you need help, you can message us [here](/contact).*""" -if SITE == 'rdrama.net': +if SITE_NAME == 'Drama': PW_ID = 3750 BASEDBOT_ID = 0 KIPPY_ID = 7150 @@ -168,7 +168,7 @@ if SITE == 'rdrama.net': MOM_ID = 4588 DONGER_ID = 541 BUG_THREAD = 18459 - WELCOME_MSG = "Hi there! It's me, your soon-to-be favorite rDrama user @carpathianflorist here to give you a brief rundown on some of the sick features we have here. You'll probably want to start by following me, though. So go ahead and click my name and then smash that Follow button. This is actually really important, so go on. Hurry.\n\nThanks!\n\nNext up: If you're a member of the media, similarly just shoot me a DM and I'll set about verifying you and then we can take care of your sad journalism stuff.\n\n**FOR EVERYONE ELSE**\n\n Begin by navigating to [the settings page](https://rdrama.net/settings/profile) (we'll be prettying this up so it's less convoluted soon, don't worry) and getting some basic customization done.\n\n### Themes\n\nDefinitely change your theme right away, the default one (Midnight) is pretty enough, but why not use something *exotic* like Win98, or *flashy* like Tron? Even Coffee is super tasteful and way more fun than the default. More themes to come when we get around to it!\n\n### Avatar/pfp\n\nYou'll want to set this pretty soon; without uploading one, I put together a randomly-assigned selection of 180ish pictures of furries, ugly goths, mujahideen, anime girls, and My Little Ponys which are used by everyone who was too lazy to set a pfp. Set the banner too while you're at it. Your profile is important!\n\n### Flairs\n\nSince you're already on the settings page, you may as well set a flair, too. As with your username, you can - obviously - choose the color of this, either with a hex value or just from the preset colors. And also like your username, you can change this at any time. [Paypigs](https://marsey1.gumroad.com/l/tfcvri) can even further relive the glory days of 90s-00s internet and set obnoxious signatures.\n\n### PROFILE ANTHEMS\n\nSpeaking of profiles, hey, remember MySpace? Do you miss autoplaying music assaulting your ears every time you visited a friend's page? Yeah, we brought that back. Enter a YouTube URL, wait a few seconds for it to process, and then BAM! you've got a profile anthem which people cannot mute. Unless they spend 20,000 dramacoin in the shop for a mute button. Which you can then remove from your profile by spending 40,000 dramacoin on an unmuteable anthem. Get fucked poors!\n\n### Dramacoin?\n\nDramacoin is basically our take on the karma system. Except unlike the karma system, it's not gay and boring and stupid and useless. Dramacoin can be spent at [Marsey's Dramacoin Emporium](https://rdrama.net/shop) on upgrades to your user experience (many more coming than what's already listed there), and best of all on tremendously annoying awards to fuck with your fellow dramautists. We're always adding more, so check back regularly in case you happen to miss one of the announcement posts. Holiday-themed awards are currently unavailable while we resolve an internal dispute, but they **will** return, no matter what some other janitors insist.\n\nLike karma, dramacoin is obtained by getting upvotes on your threads and comments. *Unlike* karma, it's also obtained by getting downvotes on your threads and comments. Downvotes don't really do anything here - they pay the same amount of dramacoin and they increase thread/comment ranking just the same as an upvote. You just use them to express petty disapproval and hopefully start a fight. Because all votes are visible here. To hell with your anonymity.\n\nDramacoin can also be traded amongst users from their profiles. Note that there is a 3% transaction fee.\n\n**Dramacoin and shop items cannot be purchased with real money and this will not change.** Though we are notoriously susceptible to bribes, so definitely shoot your shot. It'll probably go well, honestly.\n\n### Badges\n\nRemember all those neat little metallic icons you saw on my profile when you were following me? If not, scroll back up and go have a look. And doublecheck to make sure you pressed the Follow button. Anyway, those are badges. You earn them by doing a variety of things. Some of them even offer benefits, like discounts at the shop. A [complete list of badges and their requirements can be found here](https://rdrama.net/badges), though I add more pretty regularly, so keep an eye on the changelog.\n\n### Other stuff\n\nWe're always adding new features, and we take a fun-first approach to development. If you have a suggestion for something that would be fun, funny, annoying - or best of all, some combination of all three - definitely make a thread about it. Or just DM me if you're shy. Weirdo. Anyway there's also the [leaderboards](https://rdrama.net/leaderboard), boring stuff like two-factor authentication you can toggle on somewhere in the settings page (psycho), the ability to save posts and comments, close to a thousand emojis already (several hundred of which are rDrama originals), and on and on and on and on. This is just the basics, mostly to help you get acquainted with some of the things you can do here to make it more easy on the eyes, customizable, and enjoyable. If you don't enjoy it, just go away! We're not changing things to suit you! Get out of here loser! And no, you can't delete your account :na:\n\nI love you.
*xoxo Carp* 💋" + WELCOME_MSG = f"Hi there! It's me, your soon-to-be favorite rDrama user @carpathianflorist here to give you a brief rundown on some of the sick features we have here. You'll probably want to start by following me, though. So go ahead and click my name and then smash that Follow button. This is actually really important, so go on. Hurry.\n\nThanks!\n\nNext up: If you're a member of the media, similarly just shoot me a DM and I'll set about verifying you and then we can take care of your sad journalism stuff.\n\n**FOR EVERYONE ELSE**\n\n Begin by navigating to [the settings page]({SITE_FULL}/settings/profile) (we'll be prettying this up so it's less convoluted soon, don't worry) and getting some basic customization done.\n\n### Themes\n\nDefinitely change your theme right away, the default one (Midnight) is pretty enough, but why not use something *exotic* like Win98, or *flashy* like Tron? Even Coffee is super tasteful and way more fun than the default. More themes to come when we get around to it!\n\n### Avatar/pfp\n\nYou'll want to set this pretty soon; without uploading one, I put together a randomly-assigned selection of 180ish pictures of furries, ugly goths, mujahideen, anime girls, and My Little Ponys which are used by everyone who was too lazy to set a pfp. Set the banner too while you're at it. Your profile is important!\n\n### Flairs\n\nSince you're already on the settings page, you may as well set a flair, too. As with your username, you can - obviously - choose the color of this, either with a hex value or just from the preset colors. And also like your username, you can change this at any time. [Paypigs](https://marsey1.gumroad.com/l/tfcvri) can even further relive the glory days of 90s-00s internet and set obnoxious signatures.\n\n### PROFILE ANTHEMS\n\nSpeaking of profiles, hey, remember MySpace? Do you miss autoplaying music assaulting your ears every time you visited a friend's page? Yeah, we brought that back. Enter a YouTube URL, wait a few seconds for it to process, and then BAM! you've got a profile anthem which people cannot mute. Unless they spend 20,000 dramacoin in the shop for a mute button. Which you can then remove from your profile by spending 40,000 dramacoin on an unmuteable anthem. Get fucked poors!\n\n### Dramacoin?\n\nDramacoin is basically our take on the karma system. Except unlike the karma system, it's not gay and boring and stupid and useless. Dramacoin can be spent at [Marsey's Dramacoin Emporium]({SITE_FULL}/shop) on upgrades to your user experience (many more coming than what's already listed there), and best of all on tremendously annoying awards to fuck with your fellow dramautists. We're always adding more, so check back regularly in case you happen to miss one of the announcement posts. Holiday-themed awards are currently unavailable while we resolve an internal dispute, but they **will** return, no matter what some other janitors insist.\n\nLike karma, dramacoin is obtained by getting upvotes on your threads and comments. *Unlike* karma, it's also obtained by getting downvotes on your threads and comments. Downvotes don't really do anything here - they pay the same amount of dramacoin and they increase thread/comment ranking just the same as an upvote. You just use them to express petty disapproval and hopefully start a fight. Because all votes are visible here. To hell with your anonymity.\n\nDramacoin can also be traded amongst users from their profiles. Note that there is a 3% transaction fee.\n\n**Dramacoin and shop items cannot be purchased with real money and this will not change.** Though we are notoriously susceptible to bribes, so definitely shoot your shot. It'll probably go well, honestly.\n\n### Badges\n\nRemember all those neat little metallic icons you saw on my profile when you were following me? If not, scroll back up and go have a look. And doublecheck to make sure you pressed the Follow button. Anyway, those are badges. You earn them by doing a variety of things. Some of them even offer benefits, like discounts at the shop. A [complete list of badges and their requirements can be found here]({SITE_FULL}/badges), though I add more pretty regularly, so keep an eye on the changelog.\n\n### Other stuff\n\nWe're always adding new features, and we take a fun-first approach to development. If you have a suggestion for something that would be fun, funny, annoying - or best of all, some combination of all three - definitely make a thread about it. Or just DM me if you're shy. Weirdo. Anyway there's also the [leaderboards]({SITE_FULL}/leaderboard), boring stuff like two-factor authentication you can toggle on somewhere in the settings page (psycho), the ability to save posts and comments, close to a thousand emojis already (several hundred of which are rDrama originals), and on and on and on and on. This is just the basics, mostly to help you get acquainted with some of the things you can do here to make it more easy on the eyes, customizable, and enjoyable. If you don't enjoy it, just go away! We're not changing things to suit you! Get out of here loser! And no, you can't delete your account :na:\n\nI love you.
*xoxo Carp* 💋" elif SITE == "pcmemes.net": PW_ID = 0 BASEDBOT_ID = 800 @@ -569,7 +569,7 @@ NOTIFIED_USERS = { FORTUNE_REPLIES = ('Your fortune: Allah Wills It','Your fortune: Inshallah, Only Good Things Shall Come To Pass','Your fortune: Allah Smiles At You This Day','Your fortune: Your Bussy Is In For A Blasting','Your fortune: You Will Be Propositioned By A High-Tier Twink','Your fortune: Repent, You Have Displeased Allah And His Vengeance Is Nigh','Your fortune: Reply Hazy, Try Again','Your fortune: lmao you just lost 100 dramacoin','Your fortune: Yikes 😬','Your fortune: You Will Be Blessed With Many Black Bulls','Your fortune: NEETmax, The Day Is Lost If You Venture Outside','Your fortune: A Taste Of Jannah Awaits You Today','Your fortune: Watch Your Back','Your fortune: Outlook good','Your fortune: Godly Luck','Your fortune: Good Luck','Your fortune: Bad Luck','Your fortune: Good news will come to you by mail','Your fortune: Very Bad Luck','Your fortune: キタ━━━━━━(゚∀゚)━━━━━━ !!!!','Your fortune: Better not tell you now','Your fortune: You will meet a dark handsome stranger','Your fortune: ( ´_ゝ`)フーン','Your fortune: Excellent Luck','Your fortune: Average Luck') -no_pass_phrase = """

Sorry whiteboy, we're gonna need to see some ID before you start throwin that word around like it's nothing.\n\nTake a 10 minute time-out and come back when you've learned your lesson and/or paid reparations (by purchasing a BIPOC Approved™ Rdrama NWord Pass© from the shop) \n\nThis is an automated message; if you need help, you can message us here.

""" +no_pass_phrase = """

Sorry whiteboy, we're gonna need to see some ID before you start throwin that word around like it's nothing.\n\nTake a 10 minute time-out and come back when you've learned your lesson and/or paid reparations (by purchasing a BIPOC Approved™ rDrama NWord Pass© from the shop) \n\nThis is an automated message; if you need help, you can message us here.

""" db = db_session() SUBS = [x[0] for x in db.query(Sub.name).all()] diff --git a/files/helpers/jinja2.py b/files/helpers/jinja2.py index e487c9d45..944921aac 100644 --- a/files/helpers/jinja2.py +++ b/files/helpers/jinja2.py @@ -16,4 +16,4 @@ def post_embed(id, v): @app.context_processor def inject_constants(): - return {"environ":environ, "SITE_NAME":SITE_NAME, "SITE_FULL":SITE_FULL, "AUTOJANNY_ID":AUTOJANNY_ID, "NOTIFICATIONS_ID":NOTIFICATIONS_ID, "PUSHER_ID":PUSHER_ID, "CC":CC, "CC_TITLE":CC_TITLE, "listdir":listdir, "MOOSE_ID":MOOSE_ID, "AEVANN_ID":AEVANN_ID, "config":app.config.get, "DEFAULT_COLOR":DEFAULT_COLOR, "COLORS":COLORS, "SUBS": SUBS} + return {"environ":environ, "SITE":SITE, "SITE_NAME":SITE_NAME, "SITE_FULL":SITE_FULL, "AUTOJANNY_ID":AUTOJANNY_ID, "NOTIFICATIONS_ID":NOTIFICATIONS_ID, "PUSHER_ID":PUSHER_ID, "CC":CC, "CC_TITLE":CC_TITLE, "listdir":listdir, "MOOSE_ID":MOOSE_ID, "AEVANN_ID":AEVANN_ID, "config":app.config.get, "DEFAULT_COLOR":DEFAULT_COLOR, "COLORS":COLORS, "SUBS": SUBS} diff --git a/files/routes/comments.py b/files/routes/comments.py index 69af51c79..6fcfab1ce 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -57,7 +57,7 @@ def post_pid_comment_cid(cid, pid=None, anything=None, v=None, sub=None): if not pid: if comment.parent_submission: pid = comment.parent_submission - elif request.host == "rdrama.net": pid = 6489 + elif SITE_NAME == 'Drama': pid = 6489 elif request.host == 'pcmemes.net': pid = 2487 else: pid = 1 @@ -435,7 +435,7 @@ def api_comment(v): n = Notification(comment_id=c_jannied.id, user_id=v.id) g.db.add(n) - elif request.host == 'rdrama.net' and 'nigg' in c.body.lower() and not v.nwordpass: + elif SITE_NAME == 'Drama' and 'nigg' in c.body.lower() and not v.nwordpass: c.is_banned = True c.ban_reason = "AutoJanny" @@ -463,7 +463,7 @@ def api_comment(v): n = Notification(comment_id=c_jannied.id, user_id=v.id) g.db.add(n) - if request.host == "rdrama.net" and len(c.body) >= 1000 and "<" not in body and "" not in body_html: + if SITE_NAME == 'Drama' and len(c.body) >= 1000 and "<" not in body and "" not in body_html: body = random.choice(LONGPOST_REPLIES) @@ -492,7 +492,7 @@ def api_comment(v): g.db.add(n) - if request.host == "rdrama.net" and random.random() < 0.001: + if SITE_NAME == 'Drama' and random.random() < 0.001: body = "zoz" body_html2 = sanitize(body) @@ -822,7 +822,7 @@ def edit_comment(cid, v): n = Notification(comment_id=c_jannied.id, user_id=v.id) g.db.add(n) - elif request.host == 'rdrama.net' and 'nigg' in c.body.lower() and not v.nwordpass: + elif SITE_NAME == 'Drama' and 'nigg' in c.body.lower() and not v.nwordpass: c.is_banned = True c.ban_reason = "AutoJanny" diff --git a/files/routes/posts.py b/files/routes/posts.py index f59be0b60..93d37d7f9 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -242,7 +242,7 @@ def post_id(pid, anything=None, v=None, sub=None): post.views += 1 g.db.add(post) - if request.host != 'old.rdrama.net' and post.over_18 and not (v and v.over_18) and session.get('over_18', 0) < int(time.time()): + if post.over_18 and not (v and v.over_18) and session.get('over_18', 0) < int(time.time()): if request.headers.get("Authorization") or request.headers.get("xhr"): return {"error":"Must be 18+ to view"}, 451 return render_template("errors/nsfw.html", v=v) @@ -540,7 +540,7 @@ def edit_post(pid, v): n = Notification(comment_id=c_jannied.id, user_id=v.id) g.db.add(n) - elif request.host == 'rdrama.net' and 'nigg' in f'{p.body}{p.title}'.lower() and not v.nwordpass: + elif SITE_NAME == 'Drama' and 'nigg' in f'{p.body}{p.title}'.lower() and not v.nwordpass: p.is_banned = True p.ban_reason = "AutoJanny" @@ -720,7 +720,7 @@ def thumbnail_thread(pid): db.add(post) db.commit() - if SITE == 'rdrama.net': + if SITE_NAME == 'Drama': for t in ("submission","comment"): word = random.choice(('rdrama','marsey')) @@ -1138,7 +1138,7 @@ def submit_post(v, sub=None): if not new_post.thumburl and new_post.url: - if request.host in new_post.url or new_post.url.startswith('/') or request.host == 'rdrama.net' and 'rdrama' in new_post.domain: + if request.host in new_post.url or new_post.url.startswith('/') or new_post.domain == SITE: new_post.thumburl = f'/static/assets/images/{SITE_NAME}/site_preview.webp' elif request.headers.get('cf-ipcountry')!="T1": gevent.spawn( thumbnail_thread, new_post.id) @@ -1184,7 +1184,7 @@ def submit_post(v, sub=None): n = Notification(comment_id=c_jannied.id, user_id=v.id) g.db.add(n) - elif request.host == 'rdrama.net' and 'nigg' in f'{new_post.body}{new_post.title}'.lower() and not v.nwordpass: + elif SITE_NAME == 'Drama' and 'nigg' in f'{new_post.body}{new_post.title}'.lower() and not v.nwordpass: new_post.is_banned = True new_post.ban_reason = "AutoJanny" diff --git a/files/routes/static.py b/files/routes/static.py index 6fc3384c1..ba0a0fe43 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -18,7 +18,7 @@ def privacy(v): @app.get("/marseys") @auth_required def marseys(v): - if request.host == 'rdrama.net': + if SITE_NAME == 'Drama': marseys = g.db.query(Marsey, User).join(User, User.id==Marsey.author_id).order_by(Marsey.count.desc()) else: marseys = g.db.query(Marsey).order_by(Marsey.count.desc()) @@ -27,7 +27,7 @@ def marseys(v): @app.get("/marsey_list") @cache.memoize(timeout=600) def marsey_list(): - if request.host == 'rdrama.net': + if SITE_NAME == 'Drama': marseys = [f"{x.name} : {y} {x.tags}" for x, y in g.db.query(Marsey, User.username).join(User, User.id==Marsey.author_id).order_by(Marsey.count.desc())] else: marseys = [f"{x.name} : {x.tags}" for x in g.db.query(Marsey).order_by(Marsey.count.desc())] diff --git a/files/routes/users.py b/files/routes/users.py index 34d547643..104a6168b 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -674,7 +674,7 @@ def following(username, v): @app.get("/views") @auth_required def visitors(v): - if request.host == 'rdrama.net' and v.admin_level < 1 and not v.patron: return render_template("errors/patron.html", v=v) + if SITE_NAME == 'Drama' and v.admin_level < 1 and not v.patron: return render_template("errors/patron.html", v=v) viewers=sorted(v.viewers, key = lambda x: x.last_view_utc, reverse=True) return render_template("viewers.html", v=v, viewers=viewers) diff --git a/files/templates/admin/awards.html b/files/templates/admin/awards.html index 75ac7c044..b21a7158a 100644 --- a/files/templates/admin/awards.html +++ b/files/templates/admin/awards.html @@ -63,7 +63,7 @@

-	{% if request.host != 'rdrama.net' or v.id == AEVANN_ID %}
+	{% if SITE != 'Drama' or v.id == AEVANN_ID %}
 		
Grant Monthly Marseybux
{% endif %} {% endblock %} \ No newline at end of file diff --git a/files/templates/api.html b/files/templates/api.html index f95eda437..cdcee8f4c 100644 --- a/files/templates/api.html +++ b/files/templates/api.html @@ -30,13 +30,13 @@ headers={"Authorization": "access_token_goes_here"} - url="https://rdrama.net/@carpathianflorist" + url="{{SITE_FULL}}/?sort=comments" r=requests.get(url, headers=headers) print(r.json()) -

The expected result of this would be a large JSON representation of the posts posted by @carpathianflorist

+

The expected result of this would be a large JSON representation of the posts on the frontpage sorted by the number of comments

 
 
@@ -61,7 +61,7 @@
 

Drama administrators will review and approve or deny your request for API keys. You'll know when your request has been approved when you get a private message with an access token tied to your account.

DO NOT reveal your Client ID or Access Token. Anyone with these information will be able to pretend to be you. You are responsible for keeping them a secret!

Step 2: Prompt Your User for Authorization

-

Send your user to https://rdrama.net/authorize/?client_id=YOUR_CLIENT_ID

+

Send your user to {{SITE_FULL}}/authorize/?client_id=YOUR_CLIENT_ID

If done correctly, the user will see that your application wants to access their Drama account, and be prompted to approve or deny the request.

Step 3: Catch the redirect

The user clicks "Authorize". Drama will redirect the user's browser to GET the designated redirect URI. The access token URL parameter will be included in the redirect, which your server should process.

@@ -72,11 +72,11 @@ headers={"Authorization": "access_token_goes_here"} - url="https://rdrama.net/@carpathianflorist" + url="{{SITE_FULL}}/?sort=comments" r=requests.get(url, headers=headers) print(r.json())
-

The expected result of this would be a large JSON representation of the submissions submitted by @carpathianflorist

+

The expected result of this would be a large JSON representation of the posts on the frontpage sorted by the number of comments

{% endblock %} \ No newline at end of file diff --git a/files/templates/comments.html b/files/templates/comments.html index 07caaa88d..875c3b0ab 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -232,7 +232,7 @@ {% if c.author.verified %} {% endif %} - @{{c.author_name}}'s profile picture{{c.author_name}} + @{{c.author_name}}'s profile picture{{c.author_name}} {% if c.author.customtitle %}  {% if c.author.quadrant %}{{c.author.quadrant}} quadrant{% endif %}{{c.author.customtitle | safe}}{% endif %} {% endif %} @@ -452,7 +452,7 @@ Context - + {% if v %} @@ -622,7 +622,7 @@ {% if not c.ghost %}
  • Votes
  • {% endif %} - Copy link + Copy link Context diff --git a/files/templates/errors/patron.html b/files/templates/errors/patron.html index ce63203d0..97bfd61c5 100644 --- a/files/templates/errors/patron.html +++ b/files/templates/errors/patron.html @@ -13,7 +13,7 @@
    :#marseymerchant:

    401 Not Authorized

    -

    This page is only available to {% if request.host == "rdrama.net" %}paypigs{% else %}patrons{% endif %}:

    +

    This page is only available to {% if SITE_NAME == 'Drama' %}paypigs{% else %}patrons{% endif %}:

    {{config('GUMROAD_LINK')}}
    diff --git a/files/templates/header.html b/files/templates/header.html index fd8020f03..88505544a 100644 --- a/files/templates/header.html +++ b/files/templates/header.html @@ -22,7 +22,7 @@ {% if SITE_NAME == 'Drama' %}
    - 💖🌈 welcome to rdrama.net: the official site for r/subredditdrama + 💖🌈 welcome to {{SITE}}: the official site for r/subredditdrama
    {% elif SUBS %}
    @@ -36,7 +36,7 @@
    - {% if request.host == 'rdrama.net' %} + {% if SITE_NAME == 'Drama' %} {% set icon = ('marseyblm','marseykween','marseydynamite','marseyblack','marseymyeisha','marseyetika','marseyobama','marseyblackcop','marseysosa','marseyblackface')|random() %} header icon {% else %} @@ -158,7 +158,7 @@ Source code - {% if request.host in ['rdrama.net', 'pcmemes.net'] %} + {% if SITE_NAME in ['Drama', 'PCM'] %} Bugs/Suggestions {% endif %} @@ -168,7 +168,7 @@ {% if not (g.webview and v.truecoins < 1) and request.host != '2Much4You' %} Donate {% endif %} - {% if request.host == 'rdrama.net' %}Archives{% endif %} + {% if SITE_NAME == 'Drama' %}Archives{% endif %} Contact us
    @@ -223,7 +223,7 @@ {% if not (g.webview and v.truecoins < 1) %} Donate {% endif %} - {% if request.host == 'rdrama.net' %}Archives{% endif %} + {% if SITE_NAME == 'Drama' %}Archives{% endif %} Contact us - Copy link + Copy link {% if v %}
  • diff --git a/files/templates/submission_listing.html b/files/templates/submission_listing.html index aff0ec15a..fea1ab2d3 100644 --- a/files/templates/submission_listing.html +++ b/files/templates/submission_listing.html @@ -190,7 +190,7 @@ {% if p.author.verified %} {% endif %} - @{{p.author_name}}'s profile picture{{p.author_name}}{% if p.author.customtitle %}  {% if p.author.quadrant %}{{p.author.quadrant}} quadrant{% endif %}{{p.author.customtitle | safe}}{% endif %} + @{{p.author_name}}'s profile picture{{p.author_name}}{% if p.author.customtitle %}  {% if p.author.quadrant %}{{p.author.quadrant}} quadrant{% endif %}{{p.author.customtitle | safe}}{% endif %} {% endif %}  {{p.age_string}}   @@ -224,7 +224,7 @@ Give Award {% endif %} - Copy link + Copy link {% if v %} Subscribe @@ -322,7 +322,7 @@
  • - + {% if p.realbody(v) and request.path != "/changelog"%}