splash
This commit is contained in:
parent
155a3744ac
commit
3975e10dc7
9 changed files with 63 additions and 29 deletions
|
@ -15,6 +15,8 @@ from flask import g
|
|||
|
||||
site = environ.get("DOMAIN").strip()
|
||||
site_name = environ.get("SITE_NAME").strip()
|
||||
if site == 'pcmemes.net': cc = "SPLASH MOUNTAIN"
|
||||
else: cc = "COUNTRY CLUB"
|
||||
|
||||
class Submission(Base):
|
||||
__tablename__ = "submissions"
|
||||
|
@ -317,7 +319,7 @@ class Submission(Base):
|
|||
else: return ""
|
||||
|
||||
def realbody(self, v):
|
||||
if self.club and not (v and v.paid_dues): return "<p>COUNTRY CLUB ONLY</p>"
|
||||
if self.club and not (v and v.paid_dues): return f"<p>{cc} ONLY</p>"
|
||||
|
||||
body = self.body_html
|
||||
body = censor_slurs(body, v)
|
||||
|
@ -335,7 +337,7 @@ class Submission(Base):
|
|||
return body
|
||||
|
||||
def plainbody(self, v):
|
||||
if self.club and not (v and v.paid_dues): return "<p>COUNTRY CLUB ONLY</p>"
|
||||
if self.club and not (v and v.paid_dues): return f"<p>{cc} ONLY</p>"
|
||||
|
||||
body = self.body
|
||||
body = censor_slurs(body, v)
|
||||
|
@ -348,7 +350,7 @@ class Submission(Base):
|
|||
def realtitle(self, v):
|
||||
if self.club and not (v and v.paid_dues) and not (v and v.admin_level > 1):
|
||||
if v: return random.choice(TROLLTITLES).format(username=v.username)
|
||||
else: return 'COUNTRY CLUB MEMBERS ONLY'
|
||||
else: return f'{cc} MEMBERS ONLY'
|
||||
elif self.title_html: title = self.title_html
|
||||
else: title = self.title
|
||||
|
||||
|
@ -360,7 +362,7 @@ class Submission(Base):
|
|||
def plaintitle(self, v):
|
||||
if self.club and not (v and v.paid_dues) and not (v and v.admin_level > 1):
|
||||
if v: return random.choice(TROLLTITLES).format(username=v.username)
|
||||
else: return 'COUNTRY CLUB MEMBERS ONLY'
|
||||
else: return f'{cc} MEMBERS ONLY'
|
||||
else: title = self.title
|
||||
|
||||
title = censor_slurs(title, v)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue