diff --git a/files/helpers/const.py b/files/helpers/const.py index ca53e21716..b1cb3b1931 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -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_NAME == 'Drama': +if SITE_NAME in ('Drama','2Much4You'): PW_ID = 3750 BASEDBOT_ID = 0 KIPPY_ID = 7150 diff --git a/files/routes/front.py b/files/routes/front.py index 1829b5efd4..45c0c811dd 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -151,10 +151,12 @@ def front_all(v, sub=None): if v: defaultsorting = v.defaultsorting - defaulttime = v.defaulttime + if sub or SITE_NAME == '2Much4You': defaulttime = 'all' + else: defaulttime = v.defaulttime else: defaultsorting = "hot" - defaulttime = defaulttimefilter + if sub or SITE_NAME == '2Much4You': defaulttime = 'all' + else: defaulttime = v.defaulttime sort=request.values.get("sort", defaultsorting) t=request.values.get('t', defaulttime) @@ -341,6 +343,9 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, ccmode="false" if (sort == "hot" or (v and v.id == Q_ID)) and page == 1 and ccmode == "false" and not gt and not lt: pins = g.db.query(Submission).filter(Submission.stickied != None, Submission.is_banned == False) if sub: pins = pins.filter_by(sub=sub.name) + elif SITE_NAME == '2Much4You': pins = pins.filter(Submission.sub != None) + else: pins = pins.filter_by(sub=None) + if v and v.admin_level == 0: blocking = [x[0] for x in g.db.query(UserBlock.target_id).filter_by(user_id=v.id).all()] blocked = [x[0] for x in g.db.query(UserBlock.user_id).filter_by(target_id=v.id).all()] diff --git a/files/templates/authforms.html b/files/templates/authforms.html index ed6d9554ae..6d76ad8353 100644 --- a/files/templates/authforms.html +++ b/files/templates/authforms.html @@ -15,7 +15,7 @@ {% if v %} - + {% if v.agendaposter %} - + {% endif %} diff --git a/files/templates/default.html b/files/templates/default.html index 1bac5b79d3..5ea9e67efd 100644 --- a/files/templates/default.html +++ b/files/templates/default.html @@ -8,7 +8,7 @@ {% if v %} - + {% if v.agendaposter %} - + {% endif %} diff --git a/files/templates/header.html b/files/templates/header.html index 88505544aa..58a840f928 100644 --- a/files/templates/header.html +++ b/files/templates/header.html @@ -1,6 +1,15 @@