forked from rDrama/rDrama
fdMerge branch 'frost' of https://github.com/Aevann1/Drama into frost
commit
9b35785ab2
|
@ -200,7 +200,7 @@ LOTTERY_TICKET_COST = 12
|
|||
LOTTERY_SINK_RATE = 3
|
||||
LOTTERY_DURATION = 60 * 60 * 24 * 7
|
||||
|
||||
if SITE in {'rdrama.net', 'devrama.xyz'}:
|
||||
if SITE in {'rdrama.net', 'devrama.xyz', 'chudrama.net'}:
|
||||
HOLE_COST = 50000
|
||||
HOLE_INACTIVITY_DELETION = True
|
||||
|
||||
|
@ -274,7 +274,7 @@ elif SITE == 'cringetopia.org':
|
|||
|
||||
HOLE_COST = 10000
|
||||
|
||||
AUTOJANNY_ID = 2
|
||||
AUTOJANNY_ID = 1
|
||||
SNAPPY_ID = 3
|
||||
LONGPOSTBOT_ID = 4
|
||||
ZOZBOT_ID = 5
|
||||
|
@ -307,7 +307,7 @@ elif SITE == 'watchpeopledie.co':
|
|||
HOLE_STYLE_FLAIR = True
|
||||
HOLE_REQUIRED = True
|
||||
|
||||
AUTOJANNY_ID = 2
|
||||
AUTOJANNY_ID = 1
|
||||
SNAPPY_ID = 3
|
||||
LONGPOSTBOT_ID = 4
|
||||
ZOZBOT_ID = 5
|
||||
|
@ -898,6 +898,7 @@ approved_embed_hosts = {
|
|||
'cringetopia.org',
|
||||
'watchpeopledie.co',
|
||||
'devrama.xyz',
|
||||
'chudrama.net',
|
||||
'imgur.com',
|
||||
'lain.la',
|
||||
'pngfind.com',
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import time
|
||||
from files.classes.comment import Comment
|
||||
from files.classes.submission import Submission
|
||||
from files.helpers.const import *
|
||||
|
||||
def apply_time_filter(t, objects, Class):
|
||||
now = int(time.time())
|
||||
|
@ -29,6 +30,8 @@ def sort_comments(sort, comments):
|
|||
return comments.order_by((Comment.upvotes+1)/(Comment.downvotes+1) + (Comment.downvotes+1)/(Comment.upvotes+1), Comment.downvotes.desc(), Comment.id.desc())
|
||||
elif sort == "bottom":
|
||||
return comments.order_by(Comment.upvotes - Comment.downvotes)
|
||||
elif SITE == 'watchpeopledie.co':
|
||||
return comments.order_by(Comment.downvotes - Comment.upvotes, Comment.id.desc())
|
||||
else:
|
||||
return comments.order_by(Comment.realupvotes.desc(), Comment.id.desc())
|
||||
|
||||
|
|
|
@ -119,7 +119,10 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, ccmode="false"
|
|||
|
||||
if sort in ("hot","warm"):
|
||||
ti = int(time.time()) + 3600
|
||||
posts = posts.order_by(-1000000*(Submission.realupvotes + 1 + Submission.comment_count/num)/(func.power(((ti - Submission.created_utc)/1000), 1.23)), Submission.created_utc.desc())
|
||||
if SITE == 'watchpeopledie.co':
|
||||
posts = posts.order_by(-1000000*(Submission.upvotes - Submission.downvotes + 1 + Submission.comment_count/num)/(func.power(((ti - Submission.created_utc)/1000), 1.23)), Submission.created_utc.desc())
|
||||
else:
|
||||
posts = posts.order_by(-1000000*(Submission.realupvotes + 1 + Submission.comment_count/num)/(func.power(((ti - Submission.created_utc)/1000), 1.23)), Submission.created_utc.desc())
|
||||
elif sort == "bump":
|
||||
posts = posts.filter(Submission.comment_count > 1).order_by(Submission.bump_utc.desc(), Submission.created_utc.desc())
|
||||
else:
|
||||
|
|
|
@ -280,14 +280,20 @@
|
|||
<a href="{{sub.banner_url}}">
|
||||
<img alt="/h/{{sub.name}} banner" role="button" onclick="expandDesktopImage()" loading="lazy" src="{{sub.banner_url}}" width=100% style="object-fit:cover;max-height:min(42vh,30vw)!important">
|
||||
</a>
|
||||
{% elif SITE_NAME == 'rDrama' %}
|
||||
{% elif SITE_NAME == 'Chudrama' %}
|
||||
{% set path = "assets/images/" + SITE_NAME + "/banners" %}
|
||||
{% set image = "/" + path + "/" + listdir('files/' + path)|random() + '?v=25' %}
|
||||
|
||||
<a href="https://secure.winred.com/save-america-joint-fundraising-committee/early-renewal-founding-membership">
|
||||
<img alt="site banner" src="{{image}}" width="100%">
|
||||
</a>
|
||||
{% elif SITE_NAME == 'rDrama' %}
|
||||
<a href="https://secure.transequality.org/site/Donation2?df_id=1480">
|
||||
{% if v and (v.is_banned or v.agendaposter) %}
|
||||
<img alt="site banner" src="/i/{{SITE_NAME}}/banner2.webp?v=2000" width="100%">
|
||||
{% else %}
|
||||
{% set path = "assets/images/" + SITE_NAME + "/banners" %}
|
||||
{% set image = "/" + path + "/" + listdir('files/' + path)|random() + '?v=25' %}
|
||||
<img alt="site banner" src="{% if v %}{{image}}{% else %}/assets/images/{{SITE_NAME}}/cached.webp?v=100{% endif %}" width="100%">
|
||||
{% endif %}
|
||||
</a>
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
<div class="col sidebar text-left {% if '/sidebar' not in request.path %}d-none d-lg-block{% endif %} pt-3 pb-5 bg-white" id="sidebar-content">
|
||||
|
||||
{% if sub %}
|
||||
{% set image=sub.sidebar_url %}
|
||||
{% set image = sub.sidebar_url %}
|
||||
{% else %}
|
||||
{% set image='/i/' + SITE_NAME + '/sidebar.webp?v=2000' %}
|
||||
{% set image = asset_siteimg('sidebar.webp') %}
|
||||
{% endif %}
|
||||
|
||||
{#<a href="{{image}}">
|
||||
<a href="{{image}}">
|
||||
<img class="mb-4" alt="sidebar image" role="button" onclick="expandDesktopImage()" loading="lazy" src="{{image}}" width=100%>
|
||||
</a>#}
|
||||
</a>
|
||||
|
||||
<p class="mt-1 ml-2 mb-4 text-center">
|
||||
{% if g.loggedin_counter %}
|
||||
|
|
2316
seed-db.sql
2316
seed-db.sql
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue