fsd
This commit is contained in:
parent
e70acc6dbc
commit
74ee14b822
4 changed files with 35 additions and 5 deletions
|
@ -110,6 +110,7 @@ def notifications(v):
|
||||||
else:
|
else:
|
||||||
while c.parent_comment:
|
while c.parent_comment:
|
||||||
c = c.parent_comment
|
c = c.parent_comment
|
||||||
|
c.replies = g.db.query(Comment).filter_by(parent_comment_id=c.id).all()
|
||||||
|
|
||||||
if c not in listing: listing.append(c)
|
if c not in listing: listing.append(c)
|
||||||
|
|
||||||
|
@ -272,6 +273,8 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, ccmode="false"
|
||||||
elif SITE_NAME == 'Ruqqus':
|
elif SITE_NAME == 'Ruqqus':
|
||||||
posts = posts.filter(Submission.sub != None)
|
posts = posts.filter(Submission.sub != None)
|
||||||
if v and v.all_blocks: posts = posts.filter(Submission.sub.notin_(v.all_blocks))
|
if v and v.all_blocks: posts = posts.filter(Submission.sub.notin_(v.all_blocks))
|
||||||
|
elif SITE_NAME == 'PCM':
|
||||||
|
if v and v.all_blocks: posts = posts.filter(Submission.sub.notin_(v.all_blocks))
|
||||||
else: posts = posts.filter_by(sub=None)
|
else: posts = posts.filter_by(sub=None)
|
||||||
|
|
||||||
if gt: posts = posts.filter(Submission.created_utc > gt)
|
if gt: posts = posts.filter(Submission.created_utc > gt)
|
||||||
|
@ -347,7 +350,11 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, ccmode="false"
|
||||||
pins = g.db.query(Submission).filter(Submission.stickied != None, Submission.is_banned == False)
|
pins = g.db.query(Submission).filter(Submission.stickied != None, Submission.is_banned == False)
|
||||||
if sub: pins = pins.filter_by(sub=sub.name)
|
if sub: pins = pins.filter_by(sub=sub.name)
|
||||||
elif SITE_NAME == '2Much4You': pins = pins.filter(Submission.sub.in_(toomuch_subs))
|
elif SITE_NAME == '2Much4You': pins = pins.filter(Submission.sub.in_(toomuch_subs))
|
||||||
elif SITE_NAME == 'Ruqqus': pins = pins.filter(Submission.sub != None)
|
elif SITE_NAME == 'Ruqqus':
|
||||||
|
pins = pins.filter(Submission.sub != None)
|
||||||
|
if v and v.all_blocks: pins = pins.filter(Submission.sub.notin_(v.all_blocks))
|
||||||
|
elif SITE_NAME == 'PCM':
|
||||||
|
if v and v.all_blocks: pins = pins.filter(Submission.sub.notin_(v.all_blocks))
|
||||||
else: pins = pins.filter_by(sub=None)
|
else: pins = pins.filter_by(sub=None)
|
||||||
|
|
||||||
if v and v.admin_level == 0:
|
if v and v.admin_level == 0:
|
||||||
|
|
|
@ -1,7 +1,29 @@
|
||||||
<div class="col sidebar text-left d-none d-lg-block pt-3 pb-5 bg-white" style="max-width:300px">
|
<div class="col sidebar text-left d-none d-lg-block pt-3 bg-white" style="max-width:300px">
|
||||||
<img role="button" data-bs-toggle="modal" data-bs-target="#expandImageModal" onclick="expandDesktopImage('/static/assets/images/PCM/sidebar.webp?a=1041')" loading="lazy" src="/static/assets/images/PCM/sidebar.webp?a=1041" width=100%>
|
{% if sub %}
|
||||||
|
{% set image=sub.sidebar_url %}
|
||||||
|
{% else %}
|
||||||
|
{% set image='/static/assets/images/' + SITE_NAME + '/sidebar.webp?a=1041' %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<img alt="sidebar image" role="button" data-bs-toggle="modal" data-bs-target="#expandImageModal" onclick="expandDesktopImage('{{image}}')" loading="lazy" src="{{image}}" width=100%>
|
||||||
|
|
||||||
|
{% if sub %}
|
||||||
|
{% if sub.sidebar_html %}
|
||||||
|
<div class="mt-4">{{sub.sidebar_html|safe}}</div>
|
||||||
|
{% endif %}
|
||||||
|
<a class="btn btn-primary btn-block mt-4" href="/s/{{sub.name}}/mods">MODS</a>
|
||||||
|
{% if v and v.mods(sub.name) %}
|
||||||
|
<a class="btn btn-primary btn-block" href="/s/{{sub.name}}/settings">SUB SETTINGS</a>
|
||||||
|
{% endif %}
|
||||||
|
{% if v %}
|
||||||
|
<a class="btn btn-primary btn-block {% if v.blocks(sub.name) %}d-none{% endif %}" onclick="post_toast(this,'/s/{{sub.name}}/block','block-sub','unblock-sub');this.classList.toggle('d-none');nextElementSibling.classList.toggle('d-none')">BLOCK SUB</a>
|
||||||
|
<a class="btn btn-primary btn-block {% if not v.blocks(sub.name) %}d-none{% endif %}" onclick="post_toast(this,'/s/{{sub.name}}/unblock','block-sub','unblock-sub');this.classList.toggle('d-none');previousElementSibling.classList.toggle('d-none')">UNBLOCK SUB</a>
|
||||||
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
<p class="mt-4">Rules: No doxxing, No CP or other clearly illegal shit. Also no nazis, go to communities.win. Thanks!</p>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<a class="btn btn-primary btn-block" href="/create_sub">CREATE SUB</a>
|
||||||
<a class="btn btn-primary btn-block mt-4" href="https://ip2.network">STREAM LIST</a>
|
<a class="btn btn-primary btn-block mt-4" href="https://ip2.network">STREAM LIST</a>
|
||||||
<a class="btn btn-primary btn-block" href="/post/4103">BUGS/SUGGESTIONS MEGATHREAD</a>
|
<a class="btn btn-primary btn-block" href="/post/4103">BUGS/SUGGESTIONS MEGATHREAD</a>
|
||||||
<a class="btn btn-primary btn-block" href="/post/9694" >OFFICIAL CONSPIRACY THEORY THREAD</a>
|
<a class="btn btn-primary btn-block" href="/post/9694" >OFFICIAL CONSPIRACY THEORY THREAD</a>
|
||||||
|
@ -14,6 +36,7 @@
|
||||||
<a class="btn btn-primary btn-block mt-4" href="https://imgur.com/a/2wDZddF">PCM Shitposter Cutouts (2/?)</a>
|
<a class="btn btn-primary btn-block mt-4" href="https://imgur.com/a/2wDZddF">PCM Shitposter Cutouts (2/?)</a>
|
||||||
<p class="mt-4"> Rules: No doxxing, No CP or other clearly illegal shit. Thanks.</p>
|
<p class="mt-4"> Rules: No doxxing, No CP or other clearly illegal shit. Thanks.</p>
|
||||||
<p class="mt-4"> This website has nothing to do with Political Compass Memes.</p>
|
<p class="mt-4"> This website has nothing to do with Political Compass Memes.</p>
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -532,7 +532,7 @@
|
||||||
|
|
||||||
{% if not p.club or v and (v.paid_dues or v.id == p.author_id) %}
|
{% if not p.club or v and (v.paid_dues or v.id == p.author_id) %}
|
||||||
{% if p.realbody(v) %}
|
{% if p.realbody(v) %}
|
||||||
<div class="d-none card rounded border pb-0 pt-3 my-2 {% if p.author.agendaposter %}agendaposter{% endif %}" id="post-text-{{p.id}}">
|
<div class="d-none card rounded border py-3 my-2 {% if p.author.agendaposter %}agendaposter{% endif %}" id="post-text-{{p.id}}">
|
||||||
{{p.realbody(v) | safe}}
|
{{p.realbody(v) | safe}}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -79,7 +79,7 @@
|
||||||
|
|
||||||
<input autocomplete="off" type="hidden" name="formkey" value="{{v.formkey}}">
|
<input autocomplete="off" type="hidden" name="formkey" value="{{v.formkey}}">
|
||||||
|
|
||||||
{% if SITE_NAME == 'Ruqqus' or sub %}
|
{% if SITE_NAME != 'Drama' or sub %}
|
||||||
<label class='mt-4' for="title">Sub</label>
|
<label class='mt-4' for="title">Sub</label>
|
||||||
|
|
||||||
<div class="input-group mb2">
|
<div class="input-group mb2">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue