Merge branch 'master' into videos2

remotes/1693045480750635534/spooky-22
Aevann1 2021-09-07 00:03:28 +02:00 committed by GitHub
commit d30c290f50
38 changed files with 1788 additions and 211 deletions

View File

@ -45,6 +45,7 @@ services:
- GUMROAD_TOKEN=3435tdfsdudebussylmaoxxt43
- GUMROAD_LINK=https://marsey1.gumroad.com/l/tfcvri
- CARD_VIEW=1
- DISABLE_DOWNVOTES=0
links:
- "redis"
- "postgres"
@ -56,7 +57,9 @@ services:
redis:
image: redis
command: redis-server --pidfile /redis_6379.pid --dbfilename dump.rdb --dir ./
command: redis-server /drama/redis.conf
volumes:
- ./redis.conf:/drama/redis.conf
ports:
- "6379:6379"

38
env 100644
View File

@ -0,0 +1,38 @@
export PYTHONPATH="/service"
export REDIS_URL="redis://redis"
export DATABASE_URL="postgresql://postgres@postgres:5432/postgres"
export DATABASE_CONNECTION_POOL_URL="postgresql://postgres@postgres:5432/postgres"
export MASTER_KEY="-KTVciAUQFpFh2WdJ/oiHJlxl6FvzRZp8kYzAAv3l2OA="
export DOMAIN="localhost"
export SITE_NAME="Drama"
export CLOUDFLARE_ZONE="3435tdfsdudebussylmaoxxt43"
export CLOUDFLARE_KEY="3435tdfsdudebussylmaoxxt43"
export GIPHY_KEY="3435tdfsdudebussylmaoxxt43"
export MAILGUN_KEY="3435tdfsdudebussylmaoxxt43"
export MAILGUN_DOMAIN="rdrama.net"
export FORCE_HTTPS="0"
export DISCORD_SERVER_ID="3435tdfsdudebussylmaoxxt43"
export DISCORD_CLIENT_ID="3435tdfsdudebussylmaoxxt43"
export DISCORD_CLIENT_SECRET="3435tdfsdudebussylmaoxxt43"
export DISCORD_BOT_TOKEN="3435tdfsdudebussylmaoxxt43"
export IMGUR_KEY="3435tdfsdudebussylmaoxxt43"
export IBB_KEY="3435tdfsdudebussylmaoxxt43"
export HCAPTCHA_SECRET="3435tdfsdudebussylmaoxxt43"
export YOUTUBE_KEY="3435tdfsdudebussylmaoxxt43"
export PUSHER_KEY="3435tdfsdudebussylmaoxxt43"
export SPAM_SIMILARITY_THRESHOLD="0.5"
export SPAM_SIMILAR_COUNT_THRESHOLD="5"
export SPAM_URL_SIMILARITY_THRESHOLD="0.1"
export COMMENT_SPAM_SIMILAR_THRESHOLD="0.5"
export COMMENT_SPAM_COUNT_THRESHOLD="5"
export READ_ONLY="0"
export BOT_DISABLE="0"
export COINS_NAME="Dramacoins"
export DEFAULT_TIME_FILTER="all"
export DEFAULT_THEME="dark"
export DEFAULT_COLOR="ff66ac #YOU HAVE TO PICK ONE OF THOSE COLORS OR SHIT WILL BREAK: ff66ac, 805ad5, 62ca56, 38a169, 80ffff, 2a96f3, eb4963, ff0000, f39731, 30409f, 3e98a7, e4432d, 7b9ae4, ec72de, 7f8fa6, f8db58"
export SLOGAN="Dude bussy lmao"
export GUMROAD_TOKEN="3435tdfsdudebussylmaoxxt43"
export GUMROAD_LINK="https://marsey1.gumroad.com/l/tfcvri"
export CARD_VIEW="1"
export DISABLE_DOWNVOTES="0"

View File

@ -286,12 +286,6 @@ ACTIONTYPES={
"color": "bg-danger",
"title": 'removed admin @{self.target_user.username}'
},
"dethrone_self":{
"str":'stepped down as guildmaster',
"icon":"fa-user-crown",
"color": "bg-danger",
"title": 'stepped down as guildmaster'
},
"add_mod":{
"str":'added admin {self.target_link}',
"icon":"fa-user-crown",
@ -369,11 +363,5 @@ ACTIONTYPES={
"icon":"fa-user-cog",
"color": "bg-muted",
"title": "changed permissions on invitation to {self.target_user.username}"
},
"create_guild":{
"str": 'created +{self.board.name}',
"icon": "fa-chess-rook",
"color": "bg-primary",
"title": "created +{self.board.name}"
}
}

View File

@ -52,6 +52,7 @@ class User(Base, Stndrd, Age_times):
passhash = deferred(Column(String))
post_count = Column(Integer, default=0)
comment_count = Column(Integer, default=0)
received_award_count = Column(Integer, default=0)
created_utc = Column(Integer, default=0)
suicide_utc = Column(Integer, default=0)
rent_utc = Column(Integer, default=0)
@ -66,6 +67,7 @@ class User(Base, Stndrd, Age_times):
shadowbanned = Column(Boolean, default=False)
over_18 = Column(Boolean, default=False)
hidevotedon = Column(Boolean, default=False)
highlightcomments = Column(Boolean, default=True)
slurreplacer = Column(Boolean, default=True)
flairchanged = Column(Boolean, default=False)
newtab = Column(Boolean, default=False)
@ -353,18 +355,6 @@ class User(Base, Stndrd, Age_times):
return sorted(list(awards.values()), key=lambda x: x['kind'], reverse=True)
@property
@lazy
def received_awards_num(self):
posts_idlist = g.db.query(Submission.id).filter_by(author_id=self.id).subquery()
comments_idlist = g.db.query(Comment.id).filter_by(author_id=self.id).subquery()
post_awards = g.db.query(AwardRelationship).filter(AwardRelationship.submission_id.in_(posts_idlist)).count()
comment_awards = g.db.query(AwardRelationship).filter(AwardRelationship.comment_id.in_(comments_idlist)).count()
return post_awards + comment_awards
@property
@lazy
def post_notifications_count(self):

View File

@ -1,12 +1,12 @@
from os import environ
SLURS = {
" fag":" cute twink",
" Fag":" Cute twink",
" FAG":" CUTE TWINK",
" faggot":" cute twink",
" Faggot":" Cute twink",
" FAGGOT":" CUTE TWINK",
" fag":" cute twink",
" Fag":" Cute twink",
" FAG":" CUTE TWINK",
" kill yourself":" keep yourself safe",
" KILL YOURSELF":" KEEP YOURSELF SAFE",
" nigger":" 🏀",
@ -33,12 +33,12 @@ SLURS = {
" TROON":" 🚂🚃🚃",
" NoNewNormal": "HorseDewormerAddicts",
" nonewnormal": "horsedewormeraddicts",
"fag ":"cute twink ",
"Fag ":"Cute twink ",
"FAG ":"CUTE TWINK ",
"faggot ":"cute twink ",
"Faggot ":"Cute twink ",
"FAGGOT ":"CUTE TWINK ",
"fag ":"cute twink ",
"Fag ":"Cute twink ",
"FAG ":"CUTE TWINK ",
"kill yourself ":"keep yourself safe ",
"KILL YOURSELF ":"KEEP YOURSELF SAFE ",
"nigger ":"🏀 ",
@ -69,14 +69,14 @@ SLURS = {
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,", '![](https://i.kym-cdn.com/photos/images/newsfeed/001/038/094/0a1.jpg)', '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!']
AGENDAPOSTER_MSG = """Hi {username},\n\nYour comment has been automatically removed because you forgot
AGENDAPOSTER_MSG = """Hi @{username},\n\nYour comment has been automatically removed because you forgot
to include `trans lives matter`.\n\nDon't worry, we're here to help! We
won't let you post or comment anything that doesn't express your love and acceptance towards
the trans community. Feel free to resubmit your comment with `trans lives matter`
included. \n\n*This is an automated message; if you need help,
you can message us [here](/contact).*"""
VAXX_MSG = """Hi {username}, it appears that you may be trying to spread dangerous misinformation regarding ineffective COVID-19 treatments based on pseudoscientific hearsay. Your post has been removed because it contained the word ivermectin. We ask that you understand that horse dewormer neither treats, nor prevents, COVID-19. For more information, please read up on what the FDA has to say on the matter:
VAXX_MSG = """Hi @{username}, it appears that you may be trying to spread dangerous misinformation regarding ineffective COVID-19 treatments based on pseudoscientific hearsay. Your post has been removed because it contained the word ivermectin. We ask that you understand that horse dewormer neither treats, nor prevents, COVID-19. For more information, please read up on what the FDA has to say on the matter:
https://www.fda.gov/consumers/consumer-updates/why-you-should-not-use-ivermectin-treat-or-prevent-covid-19

View File

@ -22,6 +22,14 @@ def post_embed(id, v):
return render_template("submission_listing.html", listing=[p], v=v)
@app.template_filter("favorite_emojis")
def favorite_emojis(x):
str = ""
emojis = sorted(x.items(), key=lambda x: x[1], reverse=True)[:25]
for k, v in emojis:
str += f'<button class="btn m-1 px-0" onclick="getEmoji(\'{k}\', \'@form@\')" style="background: None!important; width:60px; overflow: hidden; border: none;" data-toggle="tooltip" title=":{k}:" delay:="0"><img loading="lazy" width=50 src="/assets/images/emojis/{k}.gif" alt="{k}-emoji"/></button>'
return str
@app.context_processor
def inject_constants():
constants = [c for c in dir(const) if not c.startswith("_")]

View File

@ -209,16 +209,26 @@ def sanitize(sanitized, noimages=False):
start = '&lt;s&gt;'
end = '&lt;/s&gt;'
if not session.get("favorite_emojis"): session["favorite_emojis"] = {}
if start in sanitized and end in sanitized and start in sanitized.split(end)[0] and end in sanitized.split(start)[1]: sanitized = sanitized.replace(start, '<span class="spoiler">').replace(end, '</span>')
for i in re.finditer('<p>:([^ ]{1,30}?):</p>', sanitized):
if path.isfile(f'./files/assets/images/emojis/{i.group(1)}.gif'):
sanitized = sanitized.replace(f'<p>:{i.group(1)}:</p>', f'<p><img loading="lazy" data-toggle="tooltip" title="{i.group(1)}" delay="0" height=60 src="https://{site}/assets/images/emojis/{i.group(1)}.gif"</p>')
if i.group(1) in session["favorite_emojis"]: session["favorite_emojis"][i.group(1)] += 1
else: session["favorite_emojis"][i.group(1)] = 1
for i in re.finditer(':([^ ]{1,30}?):', sanitized):
if path.isfile(f'./files/assets/images/emojis/{i.group(1)}.gif'):
sanitized = sanitized.replace(f':{i.group(1)}:', f'<img loading="lazy" data-toggle="tooltip" title="{i.group(1)}" delay="0" height=30 src="https://{site}/assets/images/emojis/{i.group(1)}.gif"<span>')
if i.group(1) in session["favorite_emojis"]: session["favorite_emojis"][i.group(1)] += 1
else: session["favorite_emojis"][i.group(1)] = 1
sanitized = sanitized.replace("https://www.", "https://").replace("https://youtu.be/", "https://youtube.com/watch?v=").replace("https://music.youtube.com/watch?v=", "https://youtube.com/watch?v=").replace("https://open.spotify.com/", "https://open.spotify.com/embed/").replace("https://streamable.com/", "https://streamable.com/e/").replace("https://youtube.com/shorts/", "https://youtube.com/watch?v=").replace("https://mobile.", "https://").replace("https://m.", "https://")
for i in re.finditer('" target="_blank">(https://youtube.com/watch\?v\=.*?)</a>', sanitized):

View File

@ -23,7 +23,10 @@ def get_logged_in_user():
uid = session.get("user_id")
nonce = session.get("login_nonce", 0)
if not uid: x= (None, None)
v = g.db.query(User).filter_by(id=uid).first()
try:
if g.db: v = g.db.query(User).filter_by(id=uid).first()
else: v = None
except: v = None
if v and v.agendaposter_expires_utc and v.agendaposter_expires_utc < g.timestamp:
v.agendaposter_expires_utc = 0
@ -59,6 +62,8 @@ def check_ban_evade(v):
post.ban_reason="ban evasion"
g.db.add(post)
g.db.commit()
ma=ModAction(
kind="ban_post",
user_id=AUTOJANNY_ACCOUNT,

View File

@ -22,12 +22,6 @@ from files.helpers.discord import add_role
IMGUR_KEY = environ.get("IMGUR_KEY", "").strip()
@app.get("/imgurcredits")
@admin_level_required(6)
def imgurcredits(v):
req = requests.get('https://api.imgur.com/3/credits', headers = {"Authorization": f"Client-ID {IMGUR_KEY}"}).json()
return req
@app.post("/@<username>/make_admin")
@admin_level_required(6)
def make_admin(v, username):
@ -38,6 +32,16 @@ def make_admin(v, username):
return "", 204
@app.post("/@<username>/make_fake_admin")
@admin_level_required(6)
def make_fake_admin(v, username):
user = get_user(username)
if not user: abort(404)
user.admin_level = 1
g.db.add(user)
return "", 204
@app.post("/@<username>/remove_admin")
@admin_level_required(6)
def remove_admin(v, username):
@ -650,6 +654,24 @@ def unshadowban(user_id, v):
return "", 204
@app.post("/admin/verify/<user_id>")
@admin_level_required(6)
@validate_formkey
def verify(user_id, v):
user = g.db.query(User).filter_by(id=user_id).first()
user.verified = "Verified"
g.db.add(user)
return "", 204
@app.post("/admin/unverify/<user_id>")
@admin_level_required(6)
@validate_formkey
def unverify(user_id, v):
user = g.db.query(User).filter_by(id=user_id).first()
user.verified = None
g.db.add(user)
return "", 204
@app.post("/admin/title_change/<user_id>")
@admin_level_required(6)
@ -1189,4 +1211,4 @@ def multiple_plots(**kwargs):
plt.savefig("image.png")
plt.clf()
return upload_imgur(png=True)
return upload_imgur(png=True)

View File

@ -106,6 +106,9 @@ def award_post(pid, v):
if kind in ACTIONS:
ACTIONS[kind](post=post)
post.author.received_award_count += 1
g.db.add(post.author)
return "", 204
@ -167,6 +170,9 @@ def award_comment(cid, v):
if kind in ACTIONS:
ACTIONS[kind](comment=c)
c.author.received_award_count += 1
g.db.add(c.author)
return "", 204
@app.get("/admin/user_award")

View File

@ -665,7 +665,8 @@ def submit_post(v):
except: embed = None
elif "youtu" in domain:
yt_id = re.match(re.compile("^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|shorts\/|\&v=)([^#\&\?]*).*"), url).group(2)
try: yt_id = re.match(re.compile("^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|shorts\/|\&v=)([^#\&\?]*).*"), url).group(2)
except: embed = None
if not yt_id or len(yt_id) != 11: embed = None
else:
params = parse_qs(urlparse(url).query)
@ -1032,7 +1033,7 @@ def submit_post(v):
n = Notification(comment_id=c_jannied.id, user_id=v.id)
g.db.add(n)
if "rdrama" in request.host or (new_post.url and not "weebzone" in request.host):
if "rdrama" in request.host or (new_post.url and not "weebzone" in request.host and not "marsey.tech" in request.host):
c = Comment(author_id=261,
distinguish_level=6,
parent_submission=new_post.id,

View File

@ -62,6 +62,10 @@ def settings_profile_post(v):
updated = True
v.cardview = request.values.get("cardview", None) == 'true'
if request.values.get("highlightcomments", v.highlightcomments) != v.highlightcomments:
updated = True
v.highlightcomments = request.values.get("highlightcomments", None) == 'true'
if request.values.get("newtab", v.newtab) != v.newtab:
updated = True
v.newtab = request.values.get("newtab", None) == 'true'

View File

@ -140,24 +140,11 @@ def leaderboard(v):
users2 = users.order_by(User.stored_subscriber_count.desc()).limit(10).all()
users3 = users.order_by(User.post_count.desc()).limit(10).all()
users4 = users.order_by(User.comment_count.desc()).limit(10).all()
users5 = users.order_by(User.received_award_count.desc()).limit(10).all()
if "pcm" in request.host:
users5 = users.order_by(User.basedcount.desc()).limit(10).all()
return render_template("leaderboard.html", v=v, users1=users1, users2=users2, users3=users3, users4=users4, users5=users5)
return render_template("leaderboard.html", v=v, users1=users1, users2=users2, users3=users3, users4=users4)
@app.get("/award_leaderboard")
@auth_desired
def award_leaderboard(v):
return render_template("award_leaderboard.html", v=v, users=a_leaderboard())
@cache.memoize(timeout=86400)
def a_leaderboard():
users = g.db.query(User).options(lazyload('*')).all()
users = sorted(users, key=lambda x: x.received_awards_num, reverse=True)[:10]
return users
users6 = users.order_by(User.basedcount.desc()).limit(10).all()
return render_template("leaderboard.html", v=v, users1=users1, users2=users2, users3=users3, users4=users4, users5=users5, users6=users6)
return render_template("leaderboard.html", v=v, users1=users1, users2=users2, users3=users3, users4=users4, users5=users5)
@app.get("/@<username>/css")
def get_css(username):

View File

@ -1,29 +0,0 @@
{% extends "settings2.html" %}
{% block pagetitle %}Leaderboard - awards received{% endblock %}
{% block content %}
<pre class="d-none d-md-inline-block"></pre>
<h5 style="font-weight:bold;text-align: center;">Top 10 by awards received</h5>
<pre></pre>
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th style="font-weight:bold;">#</th>
<th style="font-weight:bold;">Name</th>
<th style="font-weight:bold; text-align:right;">Awards</th>
</tr>
</thead>
{% for user in users %}
<tr>
<td style="font-weight:bold;">{{users.index(user)+1}}</td>
<td><a style="color:#{{user.namecolor}}; font-weight:bold;" href="/@{{user.username}}"><img loading="lazy" src="/uid/{{user.id}}/pic/profile" class="profile-pic-20 mr-1"><span {% if user.patron %}class="patron" style="background-color:#{{user.namecolor}};"{% endif %}>{{user.username}}</span></a></td>
<td style="font-weight:bold; text-align:right;">{{user.received_awards_num}}</td>
</tr>
{% endfor %}
</table>
<pre>
</pre>
{% endblock %}

View File

@ -116,7 +116,7 @@
<div class="user-info">
<span class="comment-collapse d-md-none" onclick="collapse_comment('{{c.id}}')"></span>
{% if last_view_utc and c.created_utc > last_view_utc and not (v and v.id==c.author_id) %}<i class="text-admin fas fa-circle" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="Unread"></i>{% endif %}
{% if last_view_utc and c.created_utc > last_view_utc and not (v and v.id==c.author_id) and (not v or v.highlightcomments) %}<i style="color:red !important" class="text-admin fas fa-circle" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="Unread"></i>{% endif %}
{% if c.awards %}
{% for a in c.awards[:5] %}
@ -255,12 +255,12 @@
{% endif %}
{% elif v %}
<li id="comment-{{c.id}}-down" tabindex="0" class="list-inline-item arrow-down downvote-button d-none d-md-inline-block mr-2 comment-{{c.id}}-down {% if voted==-1 %}active{% endif %}" data-id-down="{{c.id}}" data-content-type="comment">
<li {% if environ.get('DISABLE_DOWNVOTES') == '1' %}style="display:None!important"{% endif %} id="comment-{{c.id}}-down" tabindex="0" class="list-inline-item arrow-down downvote-button d-none d-md-inline-block mr-2 comment-{{c.id}}-down {% if voted==-1 %}active{% endif %}" data-id-down="{{c.id}}" data-content-type="comment">
</li>
{% else %}
<li id="comment-{{c.id}}-down" tabindex="0" class="list-inline-item arrow-down d-none d-md-inline-block" onclick="location.href='/login';">
<li {% if environ.get('DISABLE_DOWNVOTES') == '1' %}style="display:None!important"{% endif %} id="comment-{{c.id}}-down" tabindex="0" class="list-inline-item arrow-down d-none d-md-inline-block" onclick="location.href='/login';">
</li>
{% endif %}
@ -305,7 +305,7 @@
{% endif %}
{% if v and v.admin_level==6 and v.id==c.author_id %}
<li class="list-inline-item text-info d-none d-md-inline-block"><a id="distinguish-{{c.id}}" href="javascript:void(0)" onclick="admin_comment('{{c.id}}')"><i class="fas fa-id-badge text-info fa-fw"></i>{{'Undistinguish' if c.distinguish_level else 'Distinguish'}}</a></li>
<li class="list-inline-item d-none d-md-inline-block"><a class="text-info" id="distinguish-{{c.id}}" href="javascript:void(0)" onclick="admin_comment('{{c.id}}')"><i class="fas fa-id-badge text-info fa-fw"></i>{{'Undistinguish' if c.distinguish_level else 'Distinguish'}}</a></li>
{% endif %}
@ -355,9 +355,9 @@
<li class="list-inline-item arrow-down d-inline-block d-md-none mr-2 comment-{{c.id}}-up active"></li>
{% endif %}
{% elif v %}
<li id="comment-{{c.id}}-down" tabindex="0" class="list-inline-item arrow-down downvote-button d-inline-block d-md-none mr-2 comment-{{c.id}}-down {% if voted==-1 %}active{% endif %}" data-id-down="{{c.id}}" data-content-type="comment"></li>
<li {% if environ.get('DISABLE_DOWNVOTES') == '1' %}style="display:None!important"{% endif %} id="comment-{{c.id}}-down" tabindex="0" class="list-inline-item arrow-down downvote-button d-inline-block d-md-none mr-2 comment-{{c.id}}-down {% if voted==-1 %}active{% endif %}" data-id-down="{{c.id}}" data-content-type="comment"></li>
{% else %}
<li id="comment-{{c.id}}-down" tabindex="0" class="list-inline-item arrow-down d-inline-block d-md-none" onclick="location.href='/login';"></li>
<li {% if environ.get('DISABLE_DOWNVOTES') == '1' %}style="display:None!important"{% endif %} id="comment-{{c.id}}-down" tabindex="0" class="list-inline-item arrow-down d-inline-block d-md-none" onclick="location.href='/login';"></li>
{% endif %}
</ul>
</div>
@ -463,7 +463,7 @@
{% if v %}
{% if v.admin_level>=1 and v.id==c.author_id %}
<li class="list-group-item text-info"><a class="d-block" id="distinguish-{{c.id}}" href="javascript:void(0)" onclick="admin_comment('{{c.id}}', )" data-dismiss="modal"><i class="fas fa-id-badge text-info"></i>{{'Undistinguish' if c.distinguish_level else 'Distinguish'}}</a></li>
<li class="list-group-item"><a class="text-info d-block" id="distinguish-{{c.id}}" href="javascript:void(0)" onclick="admin_comment('{{c.id}}', )" data-dismiss="modal"><i class="fas fa-id-badge text-info"></i>{{'Undistinguish' if c.distinguish_level else 'Distinguish'}}</a></li>
{% endif %}
{% if v.admin_level>=3 %}
<li class="list-group-item"><a class="text-success d-block" href="javascript:void(0)" onclick="approveComment('{{c.id}}')" data-dismiss="modal"><i class="fas fa-check text-success"></i>Approve</a></li>

View File

@ -1064,9 +1064,9 @@
</head>
<body id="{% if request.path != '/comments' %}{% block pagetype %}frontpage{% endblock %}{% endif %}" style="overflow-x: hidden; {% if v and v.background %} background:url(/assets/images/backgrounds/{{v.background}}) no-repeat center center fixed !important; background-size: cover!important; background-color: #000!important;{% endif %} margin-top: 29px!important;">
<body id="{% if request.path != '/comments' %}{% block pagetype %}frontpage{% endblock %}{% endif %}" style="overflow-x: hidden; {% if v and v.background %} background:url(/assets/images/backgrounds/{{v.background}}) no-repeat center center fixed !important; background-size: cover!important; background-color: #000!important;{% endif %} {% if 'rdrama' in request.host %}margin-top: 29px!important;{% endif %}">
<a rel="nofollow noopener noreferrer" href="{% if 'rdrama' in request.host %}https://secure.transequality.org/site/Donation2?df_id=1480{% else %}/{% endif %}"><img loading="lazy" src="/assets/images/{{'SITE_NAME' | app_config}}/{% if v %}banner.gif{% else %}cached.gif{% endif %}" width="100%"></a>
{% if "marsey.tech" not in request.host %}<a rel="nofollow noopener noreferrer" href="{% if 'rdrama' in request.host %}https://secure.transequality.org/site/Donation2?df_id=1480{% else %}/{% endif %}"><img loading="lazy" src="/assets/images/{{'SITE_NAME' | app_config}}/{% if v %}banner.gif{% else %}cached.gif{% endif %}" width="100%"></a>{% endif %}
{% include "header.html" %}
@ -1161,7 +1161,7 @@
{% include "expanded_image_modal.html" %}
<script src="/assets/js/general10.js"></script>
<script src="/assets/js/general13.js"></script>
<!-- ClipboardJS -->

View File

@ -1,4 +1,5 @@
<!-- Emoji Selection Modal -->
<div id="form" class="d-none"></div>
<div class="modal fade" id="emojiModal" tabindex="-1" role="dialog" aria-labelledby="emojiModalTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-scrollable modal-dialog-centered p-1" role="document">
<div class="modal-content" id="emojiTabs">
@ -6,7 +7,10 @@
<div>
<ul class="nav nav-pills py-2">
<li class="nav-item">
<a class="nav-link active btn-sm" data-toggle="tab" href="#emoji-tab-marsey">Marsey</a>
<a class="nav-link active btn-sm" data-toggle="tab" href="#emoji-tab-favorite">Favorite</a>
</li>
<li class="nav-item">
<a class="nav-link btn-sm" data-toggle="tab" href="#emoji-tab-marsey">Marsey</a>
</li>
<li class="nav-item">
<a class="nav-link btn-sm" data-toggle="tab" href="#emoji-tab-platy">Platy</a>
@ -40,7 +44,14 @@
<div id="emoji-tab-search"></div>
<div id="no-emojis-found"></div>
<div class="tab-content">
<div class="tab-pane fade show active" id="emoji-tab-marsey">
<div class="tab-pane fade show active" id="emoji-tab-favorite">
<div class="d-flex flex-wrap py-3 pl-2" id="EMOJIS_favorite">
{% if session.get("favorite_emojis") %}
{{session.get("favorite_emojis") | favorite_emojis | safe}}
{% endif %}
</div>
</div>
<div class="tab-pane fade" id="emoji-tab-marsey">
<div class="d-flex flex-wrap py-3 pl-2" id="EMOJIS_marsey"></div>
</div>
<div class="tab-pane fade" id="emoji-tab-platy">

View File

@ -145,6 +145,6 @@ We also have some custom hooks for mentioning users and subreddits. Note that th
{% include "expanded_image_modal.html" %}
{% include "expanded_video_modal.html" %}
<script src="/assets/js/general10.js"></script>
<script src="/assets/js/general13.js"></script>
{% endblock %}

View File

@ -1,15 +1,23 @@
<!-- Navigation -->
<nav class="shadow shadow-md fixed-top">
<div id="srd" style="width: 100%; background-color: var(--primary); padding: 2px; text-align: center; font-weight: bold;">
<a style="color: white" href="https://reddit.com/r/SubredditDrama">/r/SubredditDrama official site</a>
</div>
{% if "rdrama" in request.host %}
<div id="srd" style="width: 100%; background-color: var(--primary); padding: 2px; text-align: center; font-weight: bold;">
<a style="color: white" href="https://reddit.com/r/SubredditDrama">/r/SubredditDrama official site</a>
</div>
{% endif %}
<div class="navbar navbar-expand-md navbar-light" id="navbar">
<div class="container-fluid" style="padding:0;">
<div class="flex-grow-1">
<a {% if v %}href="/"{% else %}href="/logged_out"{% endif %} class="navbar-brand">
<img loading="lazy" height="30" src="/assets/images/{{'SITE_NAME' | app_config}}/headericon.gif">
<img loading="lazy" src="/assets/images/{{'SITE_NAME' | app_config}}/logo.gif" height="20">
{% if "marsey.tech" in request.host %}
<span style="font-weight: bold; font-size: 20px;">marsey.tech</span>
{% elif "gigachadlife" in request.host %}
<span style="font-weight: bold; font-size: 20px;">GigaChadLife</span>
{% else %}
<img loading="lazy" src="/assets/images/{{'SITE_NAME' | app_config}}/logo.gif" height="20">
{% endif %}
</a>
</div>
<div class="flex-grow-1 d-fl d-none d-md-block">
@ -105,7 +113,7 @@
</div>
<hr class="my-2">
<div class="px-2">
<a class="dropdown-item" href="/assets/{{'SITE_NAME' | app_config}}App.apk"><i class="fab fa-android fa-fw text-left mr-3"></i>Android app</a>
<a class="dropdown-item" href="/assets/{{'SITE_NAME' | app_config}} App.apk"><i class="fab fa-android fa-fw text-left mr-3"></i>Android app</a>
{% if "rdrama" in request.host %}
<a class="dropdown-item" href="/post/2510/posting-guidelines-policies-legal-shit"><i class="fas fa-balance-scale fa-fw text-left mr-3"></i>Rules</a>
@ -167,7 +175,7 @@
<li class="nav-item">
<a class="nav-link" href="/settings"><i class="fas fa-cog fa-fw mr-3"></i>Settings</a>
</li>
<li class="nav-item"><a class="nav-link" href="/assets/{{'SITE_NAME' | app_config}}App.apk"><i class="fab fa-android fa-fw mr-3"></i>Android app</a></li>
<li class="nav-item"><a class="nav-link" href="/assets/{{'SITE_NAME' | app_config}} App.apk"><i class="fab fa-android fa-fw mr-3"></i>Android app</a></li>
{% if "rdrama" in request.host %}
<li class="nav-item"><a class="nav-link" href="/post/2510/posting-guidelines-policies-legal-shit"><i class="fas fa-balance-scale fa-fw mr-3"></i>Rules</a></li>
@ -199,4 +207,4 @@
</div>
</div>
</div>
</nav>
</nav>

View File

@ -98,6 +98,32 @@
{% endfor %}
</table>
<pre>
</pre>
<h5 style="font-weight:bold;text-align: center;">Top 10 by received awards</h5>
<pre>
</pre>
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th style="font-weight:bold;">#</th>
<th style="font-weight:bold;">Name</th>
<th style="font-weight:bold; text-align:right;">Received awards</th>
</tr>
</thead>
{% for user in users5 %}
<tr>
<td style="font-weight:bold;">{{users5.index(user)+1}}</td>
<td><a style="color:#{{user.namecolor}}; font-weight:bold; fonts" href="/@{{user.username}}"><img loading="lazy" src="/uid/{{user.id}}/pic/profile" class="profile-pic-20 mr-1"><span {% if user.patron %}class="patron" style="background-color:#{{user.namecolor}};"{% endif %}>{{user.username}}</span></a></td>
<td style="font-weight:bold; text-align:right;">{{user.received_award_count}}</td>
</tr>
{% endfor %}
</table>
{% if "pcm" in request.host %}
<pre>
@ -116,17 +142,15 @@
<th style="font-weight:bold; text-align:right;">Based count</th>
</tr>
</thead>
{% for user in users5 %}
{% for user in users6 %}
<tr>
<td style="font-weight:bold;">{{users5.index(user)+1}}</td>
<td style="font-weight:bold;">{{users6.index(user)+1}}</td>
<td><a style="color:#{{user.namecolor}}; font-weight:bold; fonts" href="/@{{user.username}}"><img loading="lazy" src="/uid/{{user.id}}/pic/profile" class="profile-pic-20 mr-1"><span {% if user.patron %}class="patron" style="background-color:#{{user.namecolor}};"{% endif %}>{{user.username}}</span></a></td>
<td style="font-weight:bold; text-align:right;">{{user.basedcount}}</td>
</tr>
{% endfor %}
</table>
{% endif %}
<h5 style="font-weight:bold;text-align: center;"><a href="/award_leaderboard">Top 10 by awards received</a></h5>
<pre>

View File

@ -130,7 +130,7 @@
{% include "bootstrap.html" %}
<script src="/assets/js/general10.js"></script>
<script src="/assets/js/general13.js"></script>
</body>

View File

@ -254,7 +254,7 @@
</div>
</div>
<script src="/assets/js/general10.js"></script>
<script src="/assets/js/general13.js"></script>
{% block onload %}{% endblock %}

View File

@ -57,7 +57,7 @@
</head>
<body id="settings-guild" style="overflow-x: hidden; {% if v and v.background %} background:url(/assets/images/backgrounds/{{v.background}}) no-repeat center center fixed !important; background-size: cover!important; background-color: #000!important;{% endif %}">
<body id="settings2" style="overflow-x: hidden; {% if v and v.background %} background:url(/assets/images/backgrounds/{{v.background}}) no-repeat center center fixed !important; background-size: cover!important; background-color: #000!important;{% endif %}">
{% include "header.html" %}
@ -70,7 +70,7 @@
<div class="container">
<div class="row">
<div class="col">
<span class="post-meta-guild font-weight-bold">
<span class="font-weight-bold">
</span>
</div>
</div>
@ -226,7 +226,7 @@
});
</script>
<script src="/assets/js/general10.js"></script>
<script src="/assets/js/general13.js"></script>
{% block scripts %}
{% endblock %}

View File

@ -32,11 +32,11 @@
<div class="d-md-flex justify-content-between mb-3">
<div>
<h2 class="h5" name="guild_name">Users you block</h2>
<h2 class="h5" >Users you block</h2>
<p class="text-small text-muted mb-md-0">You have blocked the following users. They cannot reply to your content or notify you with a username mention.</p>
</div>
<div class="mt-auto">
<button class="btn btn-primary" data-toggle="modal" data-target="#guildmasterBanModal">Block user</button>
<button class="btn btn-primary" data-toggle="modal" data-target="#blockmodal">Block user</button>
</div>
</div>
@ -91,7 +91,7 @@
</div>
<!-- Admin Ban user Modal -->
<div class="modal fade" id="guildmasterBanModal" tabindex="-1" role="dialog" aria-labelledby="guildmasterBanModalTitle" aria-hidden="true">
<div class="modal fade" id="blockmodal" tabindex="-1" role="dialog" aria-labelledby="blockmodal" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<form action="/settings/block" id="exile-form" method="post" onsubmit="return false;">
<div class="modal-content">
@ -122,3 +122,39 @@
</div>
{% endblock %}
<script>
block_user=function() {
var exileForm = document.getElementById("exile-form");
var exileError = document.getElementById("toast-error-message");
var usernameField = document.getElementById("exile-username");
var isValidUsername = usernameField.checkValidity();
username = usernameField.value;
if (isValidUsername) {
var xhr = new XMLHttpRequest();
xhr.open("post", "/settings/block");
xhr.withCredentials=true;
f=new FormData();
f.append("username", username);
f.append("formkey", formkey());
xhr.onload=function(){
if (xhr.status<300) {
window.location.reload(true);
}
else {
$('#toast-exile-error').toast('dispose');
$('#toast-exile-error').toast('show');
exileError.textContent = JSON.parse(xhr.response)["error"];
}
}
xhr.send(f)
}
}
</script>

View File

@ -64,6 +64,27 @@
</div>
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="highlightcomments">Highlight New Comments</label>
</div>
<div class="body w-lg-100">
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" id="highlightcomments" name="highlightcomments"{% if v.highlightcomments %} checked{% endif %} onchange="post_toast('/settings/profile?highlightcomments='+document.getElementById('highlightcomments').checked);">
<label class="custom-control-label" for="highlightcomments"></label>
</div>
<span class="text-small-extra text-muted">Enable if you would like to have a red dot on comments made after the last time you visited a thread.</span>
</div>
</div>
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="theme">Website Theme</label>
@ -571,7 +592,7 @@
&nbsp;
<pre style="padding-top:0.7rem;line-height:1;" class="btn btn-secondary format d-inline-block m-0 font-weight-bolder text-uppercase" onclick="commentForm('bio-text');getGif()" aria-hidden="true" data-toggle="modal" data-target="#gifModal" data-toggle="tooltip" data-placement="bottom" title="Add GIF">GIF</pre>
&nbsp;
<pre style="padding-top:0.7rem" class="btn btn-secondary format d-inline-block m-0 fas fa-smile-beam" onclick="loadEmojis('bio-text')" aria-hidden="true" data-toggle="modal" data-target="#emojiModal" data-toggle="tooltip" data-placement="bottom" title="Add Emoji"></pre>
<pre style="padding-top:0.7rem" class="btn btn-secondary format d-inline-block m-0 fas fa-smile-beam" onclick="loadEmojis('bio-text',{{session.get('favorite_emojis')}})" aria-hidden="true" data-toggle="modal" data-target="#emojiModal" data-toggle="tooltip" data-placement="bottom" title="Add Emoji"></pre>
&nbsp;
</div>

View File

@ -233,7 +233,7 @@
<!-- {{'SITE_NAME' | app_config}} JS -->
<script src="/assets/js/general10.js"></script>
<script src="/assets/js/general13.js"></script>
</body>

View File

@ -144,7 +144,7 @@
<!-- {{'SITE_NAME' | app_config}} JS -->
<script src="/assets/js/general10.js"></script>
<script src="/assets/js/general13.js"></script>
</body>

View File

@ -489,8 +489,8 @@
<div id="post-{{p.id}}-up" tabindex="0" data-id-up="{{p.id}}" data-content-type="post" class="mx-auto arrow-up upvote-button post-{{p.id}}-up {% if voted==1 %}active{% endif %}"></div>
<span id="post-score-{{p.id}}" class="score post-score-{{p.id}} {% if voted==1 %}score-up{% elif voted==-1%}score-down{% endif %}" data-toggle="tooltip" data-placement="right" data-original-title="+{{ups}} | -{{downs}}">{{score}}</span>
<div id="post-{{p.id}}-down" tabindex="0" data-id-down="{{p.id}}" data-content-type="post" class="text-muted mx-auto arrow-down downvote-button post-{{p.id}}-down {% if voted==-1 %}active{% endif %}"></div>
<div {% if environ.get('DISABLE_DOWNVOTES') == '1' %}style="display:None!important"{% endif %} id="post-{{p.id}}-down" tabindex="0" data-id-down="{{p.id}}" data-content-type="post" class="text-muted mx-auto arrow-down downvote-button post-{{p.id}}-down {% if voted==-1 %}active{% endif %}"></div>
</div>
{% else %}
@ -499,8 +499,7 @@
<div id="post-{{p.id}}-up" tabindex="0" class="arrow-up mx-auto" onclick="location.href='/login?redirect={{request.path | urlencode}}';">
</div>
<span id="post-{{p.id}}-score-none" class="score text-muted"{% if not p.is_banned %} data-toggle="tooltip" data-placement="right" data-original-title="+{{ups}} | -{{downs}}"{% endif %}>{{score}}</span>
<div id="post-{{p.id}}-down" tabindex="0" class="arrow-down mx-auto" onclick="location.href='/login?redirect={{request.path | urlencode}}';">
</div>
<div {% if environ.get('DISABLE_DOWNVOTES') == '1' %}style="display:None!important"{% endif %} id="post-{{p.id}}-down" tabindex="0" class="arrow-down mx-auto" onclick="location.href='/login?redirect={{request.path | urlencode}}';"></div>
</div>
{% endif %}
@ -552,12 +551,11 @@
<span id="post-score-{{p.id}}" class="score post-score-{{p.id}} {% if voted==1 %}score-up{% elif voted==-1%}score-down{% endif %}" data-toggle="tooltip" data-placement="top" data-original-title="+{{ups}} | -{{downs}}">{{score}}</span>
{% if v %}
<span id="post-{{p.id}}-down-mobile" tabindex="0" data-id-down="{{p.id}}" data-content-type="post" class="ml-2 my-0 arrow-down downvote-button post-{{p.id}}-down {% if voted==-1 %}active{% endif %}">
</span>
<span {% if environ.get('DISABLE_DOWNVOTES') == '1' %}style="display:None!important"{% endif %} id="post-{{p.id}}-down-mobile" tabindex="0" data-id-down="{{p.id}}" data-content-type="post" class="ml-2 my-0 arrow-down downvote-button post-{{p.id}}-down {% if voted==-1 %}active{% endif %}"></span>
{% else %}
<span id="arrow-{{p.id}}-mobile-down" tabindex="0" class="arrow-mobile-down ml-2 my-0" onclick="location.href='/login?redirect={{request.path | urlencode}}';">
<i class="fas fa-arrow-alt-down mx-0" aria-hidden="true"></i>
</span>
<span {% if environ.get('DISABLE_DOWNVOTES') == '1' %}style="display:None!important"{% endif %} id="arrow-{{p.id}}-mobile-down" tabindex="0" class="arrow-mobile-down ml-2 my-0" onclick="location.href='/login?redirect={{request.path | urlencode}}';">
<i class="fas fa-arrow-alt-down mx-0" aria-hidden="true"></i>
</span>
{% endif %}
</li>
</ul>

View File

@ -36,7 +36,7 @@
<span id="post-score-{{p.id}}" class="score post-score-{{p.id}} {% if voted==1 %}score-up{% elif voted==-1%}score-down{% endif %}"{% if not p.is_banned %} data-toggle="tooltip" data-placement="right" data-original-title="+{{ups}} | -{{downs}}"{% endif %}>{{score}}</span>
{% if voted==-1 %}
<div class="text-muted mx-auto arrow-down post-{{p.id}}-down active"></div>
<div class="text-muted mx-auto arrow-down post-{{p.id}}-down active"></div>
{% endif %}
{% elif v %}
@ -45,7 +45,7 @@
<span id="post-score-{{p.id}}" class="score post-score-{{p.id}} {% if voted==1 %}score-up{% elif voted==-1%}score-down{% endif %}"{% if not p.is_banned %} data-toggle="tooltip" data-placement="right" data-original-title="+{{ups}} | -{{downs}}"{% endif %}>{{score}}</span>
<div id="post-{{p.id}}-down" tabindex="0" data-id-down="{{p.id}}" data-content-type="post" class="text-muted mx-auto arrow-down downvote-button post-{{p.id}}-down {% if voted==-1 %}active{% endif %}"></div>
<div {% if environ.get('DISABLE_DOWNVOTES') == '1' %}style="display:None!important"{% endif %} id="post-{{p.id}}-down" tabindex="0" data-id-down="{{p.id}}" data-content-type="post" class="text-muted mx-auto arrow-down downvote-button post-{{p.id}}-down {% if voted==-1 %}active{% endif %}"></div>
{% else %}
@ -53,8 +53,7 @@
<span id="post-{{p.id}}-score-none" class="score"{% if not p.is_banned %} data-toggle="tooltip" data-placement="right" data-original-title="+{{ups}} | -{{downs}}"{% endif %}>{{score}}</span>
<div id="post-{{p.id}}-down" tabindex="0" class="text-muted mx-auto arrow-down" onclick="location.href='/login';"></div>
<div {% if environ.get('DISABLE_DOWNVOTES') == '1' %}style="display:None!important"{% endif %} id="post-{{p.id}}-down" tabindex="0" class="text-muted mx-auto arrow-down" onclick="location.href='/login';"></div>
{% endif %}
@ -217,28 +216,6 @@
</div>
</div>
{% if p.is_image and not (v and not v.cardview) %}
<div style="text-align: center" class="mt-4">
<a target="_blank" rel="nofollow noopener noreferrer" href="{{p.url}}">
<img loading="lazy" src="{{p.url}}" class="img-fluid" style="max-height:500px;" alt="Unable to load image">
</a>
</div>
{% elif p.is_video %}
<a href="javascript:void(0)">
<div style="text-align: center" class="mt-4">
<video controls preload="metadata" style="max-width: 100%">
<source src="{{ p.realurl(v) }}" type="video/mp4">
</video>
</div>
</a>
{% endif %}
{% if p.realbody(v) %}
<div class="d-none card rounded border pb-0 pt-3 my-2" id="post-text-{{p.id}}">
{{p.realbody(v) | safe}}
</div>
{% endif %}
<div class="card-footer d-block d-md-none mt-2">
<div class="post-actions">
<ul class="list-inline text-right d-flex">
@ -268,8 +245,7 @@
<span id="post-score-{{p.id}}-mobile" class="score post-score-{{p.id}} {% if voted==1 %}score-up{% elif voted==-1%}score-down{% endif %}"{% if not p.is_banned %} data-toggle="tooltip" data-placement="top" data-original-title="+{{ups}} | -{{downs}}"{% endif %}>{{score}}</span>
{% if voted==-1 %}
<span class="ml-2 my-0 arrow-down post-{{p.id}}-down active">
</span>
<span class="ml-2 my-0 arrow-down post-{{p.id}}-down active"></span>
{% endif %}
@ -282,7 +258,7 @@
<span id="post-score-{{p.id}}-mobile" class="score post-score-{{p.id}} {% if voted==1 %}score-up{% elif voted==-1%}score-down{% endif %}"{% if not p.is_banned %} data-toggle="tooltip" data-placement="top" data-original-title="+{{ups}} | -{{downs}}"{% endif %}>{{score}}</span>
<span id="post-{{p.id}}-down-mobile" tabindex="0" data-id-down="{{p.id}}" data-content-type="post" class="ml-2 my-0 arrow-down downvote-button post-{{p.id}}-down {% if voted==-1 %}active{% endif %}">
<span {% if environ.get('DISABLE_DOWNVOTES') == '1' %}style="display:None!important"{% endif %} id="post-{{p.id}}-down-mobile" tabindex="0" data-id-down="{{p.id}}" data-content-type="post" class="ml-2 my-0 arrow-down downvote-button post-{{p.id}}-down {% if voted==-1 %}active{% endif %}">
</span>
</li>
@ -405,6 +381,36 @@
</div>
{% endif %}
{% if p.realbody(v) %}
<div class="d-none card rounded border pb-0 pt-3 my-2" id="post-text-{{p.id}}">
{{p.realbody(v) | safe}}
</div>
{% endif %}
{% if p.is_image and (not v or v.cardview) %}
<div style="text-align: center" class="mt-3 mb-4">
<a target="_blank" rel="nofollow noopener noreferrer" href="{{p.url}}">
<img loading="lazy" src="{{p.url}}" class="img-fluid" style="max-height:500px;" alt="Unable to load image">
</a>
</div>
{% elif p.is_video %}
<a href="javascript:void(0)">
<div style="text-align: center" class="mt-4">
<video controls preload="metadata" style="max-width: 100%">
<source src="{{p.realurl(v)}}" type="video/mp4">
</video>
</div>
</a>
{% elif p.embed_url and "youtu" in p.domain or "streamable.com/" in p.url %}
<div style="text-align: center" class="mt-3 mb-4">
<iframe src="{{p.embed_url}}" frameborder="0" width="600" height="337" allow="fullscreen"></iframe>
</div>
{% elif "streamable.com/" in p.url %}
<div style="text-align: center" class="mt-3 mb-4">
<iframe src="{{p.url}}" frameborder="0" width="600" height="337" allow="fullscreen"></iframe>
</div>
{% endif %}
{% else %}
{% if request.path.endswith('/admin/queue') %}

View File

@ -398,6 +398,11 @@
<pre>
</pre>
</div>
@ -477,7 +482,7 @@
<!-- {{'SITE_NAME' | app_config}} JS -->
<script src="/assets/js/general10.js"></script>
<script src="/assets/js/general13.js"></script>
<!-- ClipboardJS -->

View File

@ -125,7 +125,7 @@
</span>
{% endif %}
{% if v and v.has_follower(u) %}
<span class="text-primary badge badge-secondary text-small align-middle ml-2">Follows you</span>
<span class="followsyou text-primary badge badge-secondary text-small align-middle ml-2">Follows you</span>
{% endif %}
<div class="profile-actions align-middle d-none ml-2">
{% if v and v.id != u.id %}
@ -198,9 +198,12 @@
{% endif %}
{% endif %}
{% if 'rdrama' in request.host and v.id in [28,995] %}
{% if 'rdrama' in request.host and v.id in [1,28,29,995] %}
{% if u.admin_level == 0 %}
<a class="btn btn-primary" href="javascript:void(0)" onclick="post_toast('/@{{u.username}}/make_admin')">Make admin</a>
<a class="btn btn-primary" href="javascript:void(0)" onclick="post_toast('/@{{u.username}}/make_fake_admin')">Make fake admin</a>
{% elif u.admin_level == 1 %}
<a class="btn btn-primary" href="javascript:void(0)" onclick="post_toast('/@{{u.username}}/remove_fake_admin')">Remove fake admin</a>
{% else %}
<a class="btn btn-primary" href="javascript:void(0)" onclick="post_toast('/@{{u.username}}/remove_admin')">Remove admin</a>
{% endif %}
@ -305,6 +308,14 @@
<a class="btn btn-danger" href="javascript:void(0)" onclick="post_toast('/shadowban/{{u.id}}')">Shadowban</a>
{% endif %}
<pre></pre>
{% if u.verified %}
<a class="btn btn-danger" href="javascript:void(0)" onclick="post_toast('/admin/unverify/{{u.id}}')">Unverify</a>
{% else %}
<a class="btn btn-success" href="javascript:void(0)" onclick="post_toast('/admin/verify/{{u.id}}')">Verify</a>
{% endif %}
<pre></pre>
<form action="/admin/unnuke_user" method="post">
<input type="hidden" name="formkey", value="{{v.formkey}}">
@ -393,7 +404,7 @@
</span>
{% endif %}
{% if v and v.has_follower(u) and not v.is_nofollow %}
<span class="text-primary badge badge-secondary text-small align-middle mx-1">Follows you</span>
<span class="followsyou text-primary badge badge-secondary text-small align-middle mx-1">Follows you</span>
{% endif %}
{% if u.customtitle %}<p style="color: #{{u.titlecolor}}">{% if u.quadrant %}<img loading="lazy" height="20" src="/assets/images/PCM/quadrants/{{u.quadrant}}.gif">{% endif %}{{u.customtitle | safe}}</p>{% endif %}
<div class="font-weight-normal">
@ -442,7 +453,7 @@
<a class="btn btn-primary" href="javascript:void(0)" onclick="post_toast('/@{{u.username}}/suicide')">Get them help</a>
<a class="btn btn-primary" href="javascript:void(0)" onclick="toggleElement('profile-toggleable-mobile', 'coin-transfer-mobile')">Gift {{"COINS_NAME" | app_config}}</a>
{% if 'rdrama' not in request.host and v.admin_level == 6 %}
{% if 'pcm' in request.host and v.admin_level == 6 %}
{% if u.admin_level == 0 %}
<a class="btn btn-primary" href="javascript:void(0)" onclick="post_toast('/@{{u.username}}/make_admin')">Make admin</a>
{% elif v.id == 10 %}
@ -450,6 +461,25 @@
{% endif %}
{% endif %}
{% if 'rdrama' in request.host and v.id in [1,28,29,995] %}
{% if u.admin_level == 0 %}
<a class="btn btn-primary" href="javascript:void(0)" onclick="post_toast('/@{{u.username}}/make_admin')">Make admin</a>
<a class="btn btn-primary" href="javascript:void(0)" onclick="post_toast('/@{{u.username}}/make_fake_admin')">Make fake admin</a>
{% elif u.admin_level == 1 %}
<a class="btn btn-primary" href="javascript:void(0)" onclick="post_toast('/@{{u.username}}/remove_fake_admin')">Remove fake admin</a>
{% else %}
<a class="btn btn-primary" href="javascript:void(0)" onclick="post_toast('/@{{u.username}}/remove_admin')">Remove admin</a>
{% endif %}
{% endif %}
{% if 'rdrama' not in request.host and 'pcm' not in request.host and v.admin_level == 6 %}
{% if u.admin_level == 0 %}
<a class="btn btn-primary" href="javascript:void(0)" onclick="post_toast('/@{{u.username}}/make_admin')">Make admin</a>
{% else %}
<a class="btn btn-primary" href="javascript:void(0)" onclick="post_toast('/@{{u.username}}/remove_admin')">Remove admin</a>
{% endif %}
{% endif %}
<form class="d-none profile-toggleable-mobile" id='message-mobile' action="/@{{u.username}}/message" method="post">
<pre></pre>
<textarea id="input-message-mobile" form="message-mobile" name="message" rows="3" maxlength="1000" class="form-control" required></textarea>
@ -542,6 +572,12 @@
<a class="btn btn-danger" href="javascript:void(0)" onclick="post_toast('/shadowban/{{u.id}}')">Shadowban</a>
{% endif %}
{% if u.verified %}
<a class="btn btn-danger" href="javasript:void(0)" onclick="post_toast('/admin/unverify/{{u.id}}')">Unverify</a>
{% else %}
<a class="btn btn-success" href="javasript:void(0)" onclick="post_toast('/admin/verify/{{u.id}}')">Verify</a>
{% endif %}
<pre></pre>
<form action="/admin/unnuke_user" method="post">
<input type="hidden" name="formkey", value="{{v.formkey}}">

44
pg_hba.conf 100644
View File

@ -0,0 +1,44 @@
# Database and user names containing spaces, commas, quotes and other
# special characters must be quoted. Quoting one of the keywords
# "all", "sameuser", "samerole" or "replication" makes the name lose
# its special character, and just match a database or username with
# that name.
#
# This file is read on server startup and when the server receives a
# SIGHUP signal. If you edit the file on a running system, you have to
# SIGHUP the server for the changes to take effect, run "pg_ctl reload",
# or execute "SELECT pg_reload_conf()".
#
# Put your actual configuration here
# ----------------------------------
#
# If you want to allow non-local connections, you need to add more
# "host" records. In that case you will also need to make PostgreSQL
# listen on a non-local interface via the listen_addresses
# configuration parameter, or via the -i or -h command line switches.
# DO NOT DISABLE!
# If you change this first entry you will need to make sure that the
# database superuser can access the database using some other method.
# Noninteractive access to all databases is required during automatic
# maintenance (custom daily cronjobs, replication, and similar tasks).
#
# Database administrative login by Unix domain socket
local all postgres trust
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
local replication all trust
host replication all 127.0.0.1/32 trust
host replication all ::1/128 trust

View File

@ -24,7 +24,7 @@ docker-compose up
4- That's it! Visit `localhost` in your browser.
5- Optional: to configure the site settings and successsfully integrate it with the external services we use (hcaptcha, cloudflare, discord, giphy, mailgun, pusher, imgur, and youtube), please edit the variables in the docker-compose.yml file.
5- Optional: to change the domain from "localhost" to something else and configure the site settings, as well as integrate it with the external services the website uses, please edit the variables in the docker-compose.yml file and then restart the docker container from inside the docker app.
---
@ -51,8 +51,10 @@ source setup
4- That's it. Visit `localhost` in your browser.
5- Optional: to configure the site settings and successsfully integrate it with the external services we use, please run this command and edit the variables:
5- Optional: to change the domain from "localhost" to something else and configure the site settings, as well as integrate it with the external services the website uses, please run this command and edit the variables:
```
nano /drama/docker-compose.yml
nano /env
```
then run `source /drama/restart` to apply the changes.

1372
redis.conf 100644

File diff suppressed because it is too large Load Diff

3
restart 100644
View File

@ -0,0 +1,3 @@
source /env
killall gunicorn
gunicorn files.__main__:app -k gevent -w 2 --reload -b 0.0.0.0:80 --reload-extra-file ./files/templates/

View File

@ -1052,7 +1052,9 @@ CREATE TABLE public.users (
fail_utc integer,
steal_utc integer,
fail2_utc integer,
cardview boolean
cardview boolean,
received_award_count integer,
highlightcomments boolean
);

26
setup
View File

@ -1,11 +1,17 @@
sudo cd /drama
sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
sudo apt update
apt-cache policy docker-ce
sudo apt install docker-ce
sudo curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo sysctl vm.overcommit_memory=1
docker-compose up
sudo apt upgrade
sudo apt install postgresql postgresql-contrib
sudo apt install redis-server
sudo rm /etc/redis/redis.conf
sudo cp redis.conf /etc/redis/redis.conf
sudo systemctl restart redis.service
sudo rm /etc/postgresql/12/main/pg_hba.conf
sudo cp pg_hba.conf /etc/postgresql/12/main/pg_hba.conf
sudo psql --u postgres -f schema.sql postgres
sudo psql --u postgres -f seed-db.sql postgres
sudo apt install python3-pip
sudo pip3 install -r requirements.txt
sudo cp env /env
sudo apt install gunicorn
sudo gunicorn files.__main__:app -k gevent -w 2 --reload -b 0.0.0.0:80 --reload-extra-file ./files/templates/

View File

@ -2254,36 +2254,6 @@ I agree, but cope.
{[para]}
The downvotes are coming in, but so is the happiness I get from being technically correct :)
{[para]}
*Homosexuality is literally no different than a man fucking his dead son's corpse until there's nothing left, and I can prove it.*
**Assertion: What someone does to themself or with a consenting adult partner(s) is just fine, so long as it's not harming anyone else.**
This seems fine at first blush. After all, what do two dudes who enjoy eating each other's shit in the privacy of their Funko-filled sex dungeon actually *harm*, anyway?
First, I'd like to briefly touch on the foundation of this argument - the concept of "harm" is not strictly limited to physical damage being inflicted on someone. You can see this most easily with the universal opposition to teaching elementary schoolchildren about sex and the eighteen million genders we currently have. You can see this with laws against neurotypical adults having sex with actual retards. You can see this with laws against flashing, and sending unsolicited dick pics in a growing number of states. There's no shortage of examples here demonstrating that non-physical harm is quite real. Someone doesn't need to bleed or bruise to be damaged.
Now, keep that in mind as we move on to the meat of this post: something I call *Dead Cummy Baby Theory*. Sexy name with an even sexier explanation. Let's talk about dead cummy babies for a bit!
**Pre-established premises:**
- *Abortion is legal, therefore legally speaking, an aborted child is not a human being, else abortion would be murder.*
- *Miscarriage caused by poor decisions (drug use, drinking, negligent accidents, etc.) is not criminal in virtually all jurisdictions, therefore the child is doubly not actually a person, else this would be murder or manslaughter.*
- *So long as no non-consenting party is harmed by something, it should be legal.*
**Scenario:**
John and Jane are a married couple. They have no living family whatsoever. John impregnates Jane. Jane miscarries at six months. Heartbroken, Jane hands the bloody fetus to John and promptly drowns herself in the tub, unable to cope with the loss of her future child. John dutifully calls 911, paramedics come to collect Jane's body and he gives a report of what happened. John, having fulfilled all legal obligations regarding his deceased wife, strips down and promptly fucks the dead fetus. Just really goes to town on the thing. Splatter everywhere, it's a mess. After achieving climax, he takes the child to the kitchen and severs one of its underdeveloped arms. Waiting for the refractory period to end, John passes the time by using the naturally lubricated (thanks, Jane!) arm to tickle his prostate. Raring to go, John proceeds to once again fuck the absolute shit out of his dead kid. When finished, John cleans up and - ever the sensible man - relocates his new fleshy Fleshlight to the freezer and enjoys himself regularly with it over the course of the next few weeks until the thing is too pulverized from his thrice-daily hammering to feasibly use anymore. Raised well, John knows never to waste anything, and cleverly makes a stew for himself out of the remains of the remains. It lasts a few days and isn't great. No one is ever aware that any of this took place.
**End scenario.**
Who did John's actions harm in the above scenario? Absolutely no one. Legally, the miscarried fetus was never a person, so it's not even human remains. Neither John nor Jane have any family, so any half-baked notion of it somehow harming the fetus' relatives is out the door. Jane died, sure, but what if she hadn't and she'd also consented to what John did? Nothing changes, aside from the fact that all parties even tangentially related to the affair consented which gives it more validity (which it didn't even need) than the scene outlined above.
No one is harmed by this. Sure, it's absolutely revolting - incestuous pedonecrophilia and all that - but if you look past that, it's exactly as harmless as two dudes buttfucking each other in their bedroom. A strong argument could be made that it's *less* harmful than that, because there can be no lack of consent on the part of the fetus, whereas with the sodomites, one of them could be just too frightened to say no and end up technically raped. No one is harmed by John using his dead child as a cumsock for a few weeks. Should it be legal? If your answer is yes, please get out of my guild and go shoot yourself in the face. If your answer is no, however - why? Because it's so disgusting? Who made you the arbiter of legally acceptable decency in private? Besides that, where is the line between "gross but acceptable" and "too gross to be acceptable"? What if two same-sex siblings want to fuck? Or a sterile father and his sterile daughter who meet for the first time on her 18th birthday, so as to remove the possibility of her being groomed? No potential for inbreeding in either of those scenarios, and yet the nearly universal consensus is that they too should remain illegal. Even though no one is harmed in these situations.
Arguments in favor of legal gay relations, transsexual nonsense, polyamorous bullshit, even furries and Funko Pop collecting and anime binges and whatever the fuck else all fall apart when the logic used to justify them is applied to anything else with the least bit of substance to it. Supporting these things is - as we have just demonstrated - *morally identical* to supporting John's right to annihilate his dead kid's carcass with his cock.
And so, to reiterate: Homosexuality is literally no different than a man fucking his dead son's corpse until there's nothing left. That's a quote, write that down.
{[para]}
Heterosexuality is a mental illness.
{[para]}
@Aevann ffs ban this cute twink already