From 65fd303962d7744a5268db83a72fe66c7378565a Mon Sep 17 00:00:00 2001 From: Choom Date: Fri, 30 Dec 2022 04:33:10 -0300 Subject: Devolviendo previews --- cgi/manage.py | 21 +++--- cgi/templates/board.html | 24 +++--- cgi/templates/board.jp.html | 10 ++- cgi/templates/txt_board.en.html | 23 +++--- cgi/templates/txt_board.html | 19 ++--- cgi/templates/txt_thread.html | 10 ++- cgi/templates/txt_threadlist.html | 35 ++++++--- static/css/dickgirl.css | 2 +- static/css/ib.css | 12 ++- static/css/img/snow.gif | Bin 0 -> 3720 bytes static/css/txt/amber.css | 6 +- static/css/txt/ayashii.css | 20 +++-- static/css/txt/bbs.css | 41 +++++----- static/css/txt/berries.css | 7 +- static/css/txt/bios.css | 8 +- static/css/txt/blue moon.css | 17 +++-- static/css/txt/ciber.css | 18 +++-- static/css/txt/cuteanarchy.css | 22 ++---- static/css/txt/futanari.css | 45 ++++++----- static/css/txt/headline.css | 1 + static/css/txt/mercury.css | 1 + static/css/txt/postal.css | 1 + static/css/txt/rizzona.css | 24 +++--- static/css/txt/ventanas.css | 1 + static/css/txt/void.css | 18 ++++- static/css/txt/waves.css | 1 + static/ico/chiruno.gif | Bin 0 -> 466 bytes static/js/weabotxt.js | 153 ++++++++++++++++++++------------------ 28 files changed, 306 insertions(+), 234 deletions(-) create mode 100644 static/css/img/snow.gif create mode 100644 static/ico/chiruno.gif diff --git a/cgi/manage.py b/cgi/manage.py index 690c807..5fb38d7 100644 --- a/cgi/manage.py +++ b/cgi/manage.py @@ -381,13 +381,13 @@ def manage(self, path_split): # Nos vamos al board y ubicamos el post board = setBoard(path_split[3]) - postid = int(path_split[4]) - post = FetchOne('SELECT `parentid`, `locked` FROM `posts` WHERE `boardid` = %s AND `id` = %s LIMIT 1', (board['id'], pid) ) + pid = int(path_split[4]) + post = FetchOne('SELECT id, parentid, locked FROM posts WHERE boardid = %s AND id = %s LIMIT 1', (board['id'], pid) ) if not post: message = _('Unable to locate a post with that ID.') template_filename = "message.html" else: - if not post['parentid']: + if post['parentid'] != 0: message = _('Post is not a thread opener.') template_filename = "message.html" else: @@ -401,13 +401,14 @@ def manage(self, path_split): UpdateDb("UPDATE `posts` SET `locked` = %s WHERE `boardid` = %s AND `id` = %s LIMIT 1", (setLocked, board["id"], post["id"])) threadUpdated(pid) - if setLocked == 1: - message = _('Thread successfully closed.') - logAction(staff_account['username'], _('Closed thread %s') % ('/' + board['dir'] + '/' + pid) ) - else: - message = _('Thread successfully opened.') - logAction(staff_account['username'], _('Opened thread %s') % ('/' + board['dir'] + '/' + pid) ) - template_filename = "message.html" + + if setLocked == 1: + message = _('Thread successfully closed.') + logAction(staff_account['username'], _('Closed thread %s') % ('/' + board['dir'] + '/' + str(pid)) ) + else: + message = _('Thread successfully opened.') + logAction(staff_account['username'], _('Opened thread %s') % ('/' + board['dir'] + '/' + str(pid)) ) + template_filename = "message.html" elif path_split[2] == 'permasage': setPermasaged = 0 diff --git a/cgi/templates/board.html b/cgi/templates/board.html index 486c380..2f02408 100644 --- a/cgi/templates/board.html +++ b/cgi/templates/board.html @@ -35,10 +35,10 @@ -
+
-
No hay dibujo
+
No hay dibujo
@@ -51,7 +51,7 @@ -
Trampa:
+
No tocar:
@@ -87,7 +87,7 @@
Archivo - + @@ -116,7 +116,7 @@
  • Los hilos son automáticamente eliminados a los #{maxage} días de edad.
  • ¿Eres nuevo? Leer antes de postear · Preguntas frecuentes · Contacto
  • -