diff --git a/files/classes/user.py b/files/classes/user.py index d16081be74..72549d5255 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -188,8 +188,6 @@ class User(Base): @property @lazy def is_cakeday(self): - if SITE_NAME == 'rDrama': return True - else: return False if time.time() - self.created_utc > 363 * 86400: date = time.strftime("%d %b", time.gmtime(self.created_utc)) now = time.strftime("%d %b", time.gmtime()) diff --git a/files/helpers/const.py b/files/helpers/const.py index 084644adf6..1074b8fc2f 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -397,7 +397,7 @@ AWARDS = { "lootbox": { "kind": "lootbox", "title": "Lootbox", - "description": "???", + "description": "", "icon": "fas fa-box-open", "color": "text-blue", "price": 1000 @@ -442,6 +442,30 @@ AWARDS = { "color": "text-yellow", "price": 300 }, + "firework": { + "kind": "firework", + "title": "Fireworks", + "description": "Summons fireworks on the post.", + "icon": "fas fa-bahai", + "color": "text-danger", + "price": 300 + }, + "confetti": { + "kind": "confetti", + "title": "Confetti", + "description": "Summons confetti to fall on the post.", + "icon": "fas fa-party-horn", + "color": "text-yellow", + "price": 300 + }, + "ricardo": { + "kind": "ricardo", + "title": "Stripper Cake", + "description": "Summons Ricardo to dance on the post.", + "icon": "fas fa-pinata", + "color": "text-pink", + "price": 500 + }, "tilt": { "kind": "tilt", "title": "Tilt", @@ -634,30 +658,6 @@ AWARDS = { "color": "checkmark", "price": 100000 }, - "firework": { - "kind": "firework", - "title": "Fireworks", - "description": "PARTY TIME!", - "icon": "fas fa-bahai", - "color": "text-blue-200", - "price": 300 - }, - "confetti": { - "kind": "confetti", - "title": "Confetti", - "description": "PARTY TIME!", - "icon": "fas fa-party-horn", - "color": "text-blue-200", - "price": 300 - }, - "ricardo": { - "kind": "ricardo", - "title": "Stripper Cake", - "description": "PARTY TIME!", - "icon": "fas fa-pinata", - "color": "text-blue-200", - "price": 500 - }, } if SITE_NAME == 'PCM': @@ -699,7 +699,7 @@ AWARDS3 = {} for k, val in AWARDS2.items(): if val['price'] == 300: AWARDS3[k] = val -DOUBLE_XP_ENABLED = 1652997600 # set to unixtime for when DXP begins, -1 to disable +DOUBLE_XP_ENABLED = -1 # set to unixtime for when DXP begins, -1 to disable TROLLTITLES = [ "how will @{username} ever recover?", diff --git a/files/routes/comments.py b/files/routes/comments.py index 4d0cdbc10c..198bbc9182 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -249,7 +249,8 @@ def api_comment(v): filename = f'files/assets/images/badges/{badge.id}.webp' copyfile(oldname, filename) process_image(v.patron, filename, 200) - requests.post(f'https://api.cloudflare.com/client/v4/zones/{CF_ZONE}/purge_cache', headers=CF_HEADERS, data={'files': [f"https://{request.host}/assets/images/badges/{badge.id}.webp"]}, timeout=5) + requests.post(f'https://api.cloudflare.com/client/v4/zones/{CF_ZONE}/purge_cache', headers=CF_HEADERS, + data='{"files": ["https://%s/assets/images/badges/%s.webp"]}' % (request.host, badge.id), timeout=5) except Exception as e: return {"error": str(e)}, 400 elif v.admin_level > 2 and parent_post.id == 37838: @@ -300,7 +301,8 @@ def api_comment(v): - requests.post(f'https://api.cloudflare.com/client/v4/zones/{CF_ZONE}/purge_cache', headers=CF_HEADERS, data={'files': [f"https://{request.host}/e/{name}.webp"]}, timeout=5) + requests.post(f'https://api.cloudflare.com/client/v4/zones/{CF_ZONE}/purge_cache', headers=CF_HEADERS, + data='{"files": ["https://%s/e/%s.webp"]}' % (request.host, name), timeout=5) cache.delete_memoized(marsey_list) except Exception as e: diff --git a/files/templates/comments.html b/files/templates/comments.html index bf99684221..be58c1e16b 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -207,7 +207,7 @@ {% if not c.author %} {{c.print()}} {% endif %} - {% if c.author.is_cakeday %}{% endif %}{{c.author_name}} + {% if c.author.is_cakeday %}{% endif %}{{c.author_name}} {% if c.author.customtitle %}  {{c.author.customtitle | safe}}{% endif %} {% endif %} diff --git a/files/templates/default.html b/files/templates/default.html index a19378c698..4c0564bf7f 100644 --- a/files/templates/default.html +++ b/files/templates/default.html @@ -10,7 +10,7 @@ - + {% if v.agendaposter %} - + {% endif %} {% if request.path == '/catalog' %} @@ -249,8 +249,7 @@ {% if sub %} /h/{{sub.name}} banner {% elif SITE_NAME == 'rDrama' %} - {# set path = "assets/images/" + SITE_NAME + "/banners" #} - {% set path = "assets/images/" + SITE_NAME + "/banners-birthgay" %} + {% set path = "assets/images/" + SITE_NAME + "/banners" %} {% set image = "/" + path + "/" + listdir('files/' + path)|random() + '?v=25' %} diff --git a/files/templates/header.html b/files/templates/header.html index 27840a621a..f8edd43935 100644 --- a/files/templates/header.html +++ b/files/templates/header.html @@ -8,15 +8,6 @@ padding-top: 69.55px !important } } - - /* Birthgay specific */ - #navbar i, #navbar .nav-link { - text-shadow: 1px 1px 0 black, 1px -1px 0 black, -1px 1px 0 black, -1px -1px 0 black; - } - .navbar-light .navbar-nav .nav-link, .navbar-light .navbar-nav .nav-link:hover { - color: #FFF !important; - } - /* End birthgay specific */ {% else %}