From 1435fe0df9be7b96c0273c587896650d412116e9 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 5 Mar 2022 23:42:58 +0200 Subject: [PATCH 01/21] fd --- files/helpers/const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/helpers/const.py b/files/helpers/const.py index f1403be535..73e6105e24 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -153,7 +153,7 @@ elif SITE == "pcmemes.net": SNAPPY_ID = 261 LONGPOSTBOT_ID = 1832 ZOZBOT_ID = 1833 - AUTOPOLLER_ID = 3369 + AUTOPOLLER_ID = 2129 AUTOBETTER_ID = 1867 AUTOCHOICE_ID = 2072 BASEDBOT_ID = 800 From 7e242d6acf55fbeeda340fb0b9e9d8cb3ee4ba63 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 5 Mar 2022 23:51:40 +0200 Subject: [PATCH 02/21] testin --- files/templates/marseys.html | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/files/templates/marseys.html b/files/templates/marseys.html index fea3b2da62..f52419399f 100644 --- a/files/templates/marseys.html +++ b/files/templates/marseys.html @@ -1,17 +1,21 @@ {% extends "default.html" %} {% block content %} + + +
 
 	
 
-
+
+
- - {% if SITE_NAME == 'Drama' %}{% endif %} + + {% if SITE_NAME == 'Drama' %}{% endif %} From 541c6c7274102b9da6bedd285dfc2f880b6aaa61 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 5 Mar 2022 23:55:12 +0200 Subject: [PATCH 03/21] fds --- files/templates/marseys.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/templates/marseys.html b/files/templates/marseys.html index f52419399f..d1cfc755fc 100644 --- a/files/templates/marseys.html +++ b/files/templates/marseys.html @@ -20,7 +20,7 @@ {% if SITE_NAME == 'Drama' %} - {% for marsey, author in marseys %} + {% for marsey, author in marseys[:10] %} From 34ea87f07302c3f107d1bc5274e01cbfc54b6264 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 5 Mar 2022 23:56:25 +0200 Subject: [PATCH 04/21] fsd --- files/templates/marseys.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/templates/marseys.html b/files/templates/marseys.html index d1cfc755fc..b03e0fed9e 100644 --- a/files/templates/marseys.html +++ b/files/templates/marseys.html @@ -15,7 +15,7 @@ - {% if SITE_NAME == 'Drama' %}{% endif %} + {% if SITE_NAME == 'Drama' %}{% endif %} From c84d9cecab1f9a43e54ba263b8cbc858d2d55a60 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 5 Mar 2022 23:57:11 +0200 Subject: [PATCH 05/21] cv --- files/templates/marseys.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/templates/marseys.html b/files/templates/marseys.html index b03e0fed9e..bc060c7920 100644 --- a/files/templates/marseys.html +++ b/files/templates/marseys.html @@ -15,7 +15,7 @@ - {% if SITE_NAME == 'Drama' %}{% endif %} + {% if SITE_NAME == 'Drama' %}{% endif %} @@ -26,7 +26,7 @@ - + {% endfor %} {% else %} From cf90f870e28d44e7632815eed83721435cc6ff83 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 5 Mar 2022 23:57:38 +0200 Subject: [PATCH 06/21] ki --- files/templates/marseys.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/templates/marseys.html b/files/templates/marseys.html index bc060c7920..072b34fbfb 100644 --- a/files/templates/marseys.html +++ b/files/templates/marseys.html @@ -26,7 +26,7 @@ - + {% endfor %} {% else %} From 392dfc1f7d32e33574ac61420f75f59f38cf15f1 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 6 Mar 2022 00:00:37 +0200 Subject: [PATCH 08/21] dsf --- files/templates/marseys.html | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/files/templates/marseys.html b/files/templates/marseys.html index 072b34fbfb..a84aa324da 100644 --- a/files/templates/marseys.html +++ b/files/templates/marseys.html @@ -7,8 +7,7 @@ -
-
# Name MarseyUsageAuthorUsageAuthor
{{loop.index}} {{marsey.name}}Name Marsey UsageAuthorAuthor
Name Marsey UsageAuthorAuthor
{{marsey.name}} :{{marsey.name}}: {{marsey.count}}{{author.username}}{{author.truecoins}}
{{marsey.name}} :{{marsey.name}}: {{marsey.count}}{{author.truecoins}}{{author.username}}
+
@@ -20,13 +19,13 @@ {% if SITE_NAME == 'Drama' %} - {% for marsey, author in marseys[:10] %} + {% for marsey, author in marseys %} - + {% endfor %} {% else %} From 89cbeed7658af2c63b8dc4874c9905f3dcefbe12 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 6 Mar 2022 00:01:00 +0200 Subject: [PATCH 09/21] sfd --- files/templates/marseys.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/files/templates/marseys.html b/files/templates/marseys.html index a84aa324da..103e6e35cf 100644 --- a/files/templates/marseys.html +++ b/files/templates/marseys.html @@ -7,7 +7,8 @@ -
#
{{loop.index}} {{marsey.name}} :{{marsey.name}}: {{marsey.count}}{{author.username}}{{author.username}}
+
+
From 3b9e013037ddf15e0f635cc38169ae0a80dffe5d Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 6 Mar 2022 00:02:18 +0200 Subject: [PATCH 10/21] fds --- files/templates/marseys.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/templates/marseys.html b/files/templates/marseys.html index 103e6e35cf..2dac036916 100644 --- a/files/templates/marseys.html +++ b/files/templates/marseys.html @@ -26,7 +26,7 @@ - + {% endfor %} {% else %} From dc6b5ca83ad3006576135b42b37071c74abbff88 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 6 Mar 2022 00:04:28 +0200 Subject: [PATCH 11/21] sfd --- files/templates/marseys.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/templates/marseys.html b/files/templates/marseys.html index 2dac036916..33f5ee38bd 100644 --- a/files/templates/marseys.html +++ b/files/templates/marseys.html @@ -26,7 +26,7 @@ - + {% endfor %} {% else %} From c897c73fbf041648f52171142ef6276c815c6af5 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 6 Mar 2022 00:09:06 +0200 Subject: [PATCH 13/21] done queen --- files/routes/static.py | 5 ++++- files/templates/marseys.html | 12 ++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/files/routes/static.py b/files/routes/static.py index d46b136b50..4862376cf2 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -19,7 +19,10 @@ def privacy(v): @auth_required def marseys(v): if SITE_NAME == 'Drama': - marseys = g.db.query(Marsey, User).join(User, User.id==Marsey.author_id).order_by(Marsey.count.desc()) + marseys = g.db.query(Marsey, User).join(User, User.id==Marsey.author_id) + sort = request.values.get(sort, "usage") + if sort == "usage": marseys = marseys.order_by(Marsey.count.desc()) + else: marseys = marseys.order_by(User.username) else: marseys = g.db.query(Marsey).order_by(Marsey.count.desc()) return render_template("marseys.html", v=v, marseys=marseys) diff --git a/files/templates/marseys.html b/files/templates/marseys.html index 33f5ee38bd..af545a9520 100644 --- a/files/templates/marseys.html +++ b/files/templates/marseys.html @@ -1,21 +1,17 @@ {% extends "default.html" %} {% block content %} - - -
 
 	
 
-
-
#{{marsey.name}} :{{marsey.name}}: {{marsey.count}}{{author.username}}{{author.username}}
{{marsey.name}} :{{marsey.name}}: {{marsey.count}}{{author.username}}{{author.truecoins}}
+
- - {% if SITE_NAME == 'Drama' %}{% endif %} + + {% if SITE_NAME == 'Drama' %}{% endif %} @@ -26,7 +22,7 @@ - + {% endfor %} {% else %} From 7e1311195d86900c018bea79d3eb920bd00937c3 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 6 Mar 2022 00:09:46 +0200 Subject: [PATCH 14/21] fart --- files/routes/static.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/routes/static.py b/files/routes/static.py index 4862376cf2..55c78bd870 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -20,7 +20,7 @@ def privacy(v): def marseys(v): if SITE_NAME == 'Drama': marseys = g.db.query(Marsey, User).join(User, User.id==Marsey.author_id) - sort = request.values.get(sort, "usage") + sort = request.values.get("sort", "usage") if sort == "usage": marseys = marseys.order_by(Marsey.count.desc()) else: marseys = marseys.order_by(User.username) else: From 9e42ece4ca2d2e405ee63a44716faa43622f609b Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 6 Mar 2022 00:15:18 +0200 Subject: [PATCH 18/21] drama --- files/templates/authforms.html | 2 +- files/templates/default.html | 8 ++++---- files/templates/log.html | 4 ++-- files/templates/login.html | 2 +- files/templates/login_2fa.html | 2 +- files/templates/settings.html | 2 +- files/templates/settings2.html | 4 ++-- files/templates/sign_up.html | 2 +- files/templates/sign_up_failed_ref.html | 2 +- files/templates/submit.html | 4 ++-- 10 files changed, 16 insertions(+), 16 deletions(-) diff --git a/files/templates/authforms.html b/files/templates/authforms.html index df5df78e84..53d41840aa 100644 --- a/files/templates/authforms.html +++ b/files/templates/authforms.html @@ -15,7 +15,7 @@ {% if v %} - + {% if v.agendaposter %} - + {% if SITE_NAME == 'Drama' and not request.path.startswith('/s/') %} - + {% endif %} {% if v.agendaposter %} @@ -35,9 +35,9 @@ {% endif %} {% else %} - + {% if SITE_NAME == 'Drama' and not request.path.startswith('/s/') %} - + {% endif %} {% endif %} diff --git a/files/templates/log.html b/files/templates/log.html index fbef4012cb..618864527b 100644 --- a/files/templates/log.html +++ b/files/templates/log.html @@ -6,7 +6,7 @@ {% block content %} {% if v %} - + {% if v.agendaposter %} - + {% endif %}
diff --git a/files/templates/login.html b/files/templates/login.html index 1c9009ac3b..c3fefa6b2d 100644 --- a/files/templates/login.html +++ b/files/templates/login.html @@ -18,7 +18,7 @@ {% endblock %} - + diff --git a/files/templates/login_2fa.html b/files/templates/login_2fa.html index c9324afa3b..2a340f9a05 100644 --- a/files/templates/login_2fa.html +++ b/files/templates/login_2fa.html @@ -14,7 +14,7 @@ 2-Step Login - {{SITE_NAME}} - + diff --git a/files/templates/settings.html b/files/templates/settings.html index 1f1a169d96..986aa313ca 100644 --- a/files/templates/settings.html +++ b/files/templates/settings.html @@ -34,7 +34,7 @@ - + {% if v.agendaposter %} - + {% else %} - + {% endif %} diff --git a/files/templates/sign_up.html b/files/templates/sign_up.html index 59a2089694..be0d4ae93b 100644 --- a/files/templates/sign_up.html +++ b/files/templates/sign_up.html @@ -31,7 +31,7 @@ {% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}Sign up - {{SITE_NAME}}{% endif %} - + diff --git a/files/templates/sign_up_failed_ref.html b/files/templates/sign_up_failed_ref.html index d8cd8d495a..7911c9cef3 100644 --- a/files/templates/sign_up_failed_ref.html +++ b/files/templates/sign_up_failed_ref.html @@ -32,7 +32,7 @@ {% if ref_user %}{{ref_user.username}} invites you to {{SITE_NAME}}{% else %}{{SITE_NAME}}{% endif %} - + diff --git a/files/templates/submit.html b/files/templates/submit.html index d075fa8dc4..046f1c478c 100644 --- a/files/templates/submit.html +++ b/files/templates/submit.html @@ -26,7 +26,7 @@ {% block stylesheets %} {% if v %} - + {% if v.agendaposter %} - + {% endif %} {% endblock %} From 770643b4a6142e84e61274f9711ee3fdcc796f21 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 6 Mar 2022 00:16:40 +0200 Subject: [PATCH 19/21] no more quadrants y'all cant behave --- files/classes/user.py | 1 - files/routes/settings.py | 34 ------------------------- files/templates/comments.html | 2 +- files/templates/settings_profile.html | 32 ----------------------- files/templates/submission.html | 2 +- files/templates/submission_listing.html | 2 +- files/templates/userpage.html | 4 +-- 7 files changed, 5 insertions(+), 72 deletions(-) diff --git a/files/classes/user.py b/files/classes/user.py index 3290e3299b..369193d714 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -30,7 +30,6 @@ class User(Base): __tablename__ = "users" if SITE == "pcmemes.net": - quadrant = Column(String) basedcount = Column(Integer, default=0) pills = deferred(Column(String, default="")) diff --git a/files/routes/settings.py b/files/routes/settings.py index 74329e6850..63538ae96b 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -348,40 +348,6 @@ def settings_profile_post(v): updated = True - quadrant = request.values.get("quadrant") - if quadrant and request.host == 'pcmemes.net'.lower(): - v.quadrant = quadrant - v.customtitle = quadrant - if quadrant=="Centrist": - v.namecolor = "7f8fa6" - v.titlecolor = "7f8fa6" - elif quadrant=="LibLeft": - v.namecolor = "62ca56" - v.titlecolor = "62ca56" - elif quadrant=="LibRight": - v.namecolor = "f8db58" - v.titlecolor = "f8db58" - elif quadrant=="AuthLeft": - v.namecolor = "ff0000" - v.titlecolor = "ff0000" - elif quadrant=="AuthRight": - v.namecolor = "2a96f3" - v.titlecolor = "2a96f3" - elif quadrant=="LibCenter": - v.namecolor = "add357" - v.titlecolor = "add357" - elif quadrant=="AuthCenter": - v.namecolor = "954b7a" - v.titlecolor = "954b7a" - elif quadrant=="Left": - v.namecolor = "b1652b" - v.titlecolor = "b1652b" - elif quadrant=="Right": - v.namecolor = "91b9A6" - v.titlecolor = "91b9A6" - - updated = True - if updated: g.db.add(v) g.db.commit() diff --git a/files/templates/comments.html b/files/templates/comments.html index 1833b0b08d..80eaedb674 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -226,7 +226,7 @@ {{c.print()}} {% endif %} {{c.author_name}} - {% if c.author.customtitle %}  {% if c.author.quadrant %}{{c.author.quadrant}} quadrant{% endif %}{{c.author.customtitle | safe}}{% endif %} + {% if c.author.customtitle %}  {{c.author.customtitle | safe}}{% endif %} {% endif %} {% if c.parent_comment_id and not standalone and level != 1 %}{{c.parent_comment.author_name}}{% endif %} diff --git a/files/templates/settings_profile.html b/files/templates/settings_profile.html index 85dd33c52c..da0a74bffe 100644 --- a/files/templates/settings_profile.html +++ b/files/templates/settings_profile.html @@ -10,38 +10,6 @@
- {% if request.host == "pcmemes.net".lower() %} - -

Quadrant

- -
- -
-
- -
- -
-

Choose your quadrant.

-
- -
- -
- -
-
- {% endif %} - - - - {% if SITE_NAME == 'Drama' %}

House

diff --git a/files/templates/submission.html b/files/templates/submission.html index b3a7d53f46..32b98cb43c 100644 --- a/files/templates/submission.html +++ b/files/templates/submission.html @@ -632,7 +632,7 @@ {% if p.author.verified %} {% endif %} - {{p.author_name}}{% if p.author.customtitle %}  {% if p.author.quadrant %}{{p.author.quadrant}} quadrant{% endif %}{{p.author.customtitle | safe}}{% endif %} + {{p.author_name}}{% if p.author.customtitle %}  {{p.author.customtitle | safe}}{% endif %} {% endif %}  {{p.age_string}} ({% if p.is_image %}image post{% elif p.is_video %}video post{% elif p.domain %}{{p.domain}}{% else %}text post{% endif %}) diff --git a/files/templates/submission_listing.html b/files/templates/submission_listing.html index 965b1a317a..6d9a3e2779 100644 --- a/files/templates/submission_listing.html +++ b/files/templates/submission_listing.html @@ -200,7 +200,7 @@ {% if p.author.verified %} {% endif %} - {{p.author_name}}{% if p.author.customtitle %}  {% if p.author.quadrant %}{{p.author.quadrant}} quadrant{% endif %}{{p.author.customtitle | safe}}{% endif %} + {{p.author_name}}{% if p.author.customtitle %}  {{p.author.customtitle | safe}}{% endif %} {% endif %}  {{p.age_string}}   diff --git a/files/templates/userpage.html b/files/templates/userpage.html index 023c7328f8..dfed1db039 100644 --- a/files/templates/userpage.html +++ b/files/templates/userpage.html @@ -104,7 +104,7 @@
- {% if u.customtitle %}

{% if u.quadrant %}{{u.quadrant}} quadrant{% endif %}{{u.customtitle | safe}}

+ {% if u.customtitle %}

{{u.customtitle | safe}}

{% else %}

 				{% endif %}
 
@@ -399,7 +399,7 @@
 				{% if v and v.has_follower(u) and not v.is_nofollow %}
 					Follows you
 				{% endif %}
-				{% if u.customtitle %}

{% if u.quadrant %}@{{u.quadrant}} quadrant{% endif %}{{u.customtitle | safe}}

+ {% if u.customtitle %}

{{u.customtitle | safe}}

{% else %}

 				{% endif %}

From 17d6fc3dc6fabdfdd775ac5a59ad30f569833608 Mon Sep 17 00:00:00 2001
From: Aevann1 
Date: Sun, 6 Mar 2022 00:19:07 +0200
Subject: [PATCH 21/21] bruh

---
 files/helpers/alerts.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/files/helpers/alerts.py b/files/helpers/alerts.py
index 2905a840ad..211563b8f4 100644
--- a/files/helpers/alerts.py
+++ b/files/helpers/alerts.py
@@ -46,7 +46,12 @@ def notif_comment(text, autojanny=False):
 
 	text_html = sanitize(text, alert=True)
 
-	existing = g.db.query(Comment.id).filter_by(author_id=author_id, parent_submission=None, body_html=text_html).one_or_none()
+	try: existing = g.db.query(Comment.id).filter_by(author_id=author_id, parent_submission=None, body_html=text_html).one_or_none()
+	except:
+		existing = g.db.query(Comment).filter_by(author_id=author_id, parent_submission=None, body_html=text_html).all()
+		for c in existing: g.db.delete(c)
+		g.db.flush()
+		existing = g.db.query(Comment.id).filter_by(author_id=author_id, parent_submission=None, body_html=text_html).one_or_none()
 	
 	if existing: return existing[0]
 	else: return create_comment(text_html, autojanny)
# Name MarseyUsageAuthorUsageAuthor
{{marsey.name}} :{{marsey.name}}: {{marsey.count}}{{author.truecoins}}{{author.username}}