diff options
author | Choom | 2023-01-16 05:32:08 -0300 |
---|---|---|
committer | Choom | 2023-01-18 22:06:34 -0300 |
commit | 542e8d1452130079ae47f7a56328f8421e56f5ab (patch) | |
tree | 37c15cdd5803f05ad5a36fb2e62cd05ad3fc6ef3 /cgi | |
parent | 53056e445626d21523a799c8d8f03b16f24b0c47 (diff) | |
download | weabot-542e8d1452130079ae47f7a56328f8421e56f5ab.tar.gz weabot-542e8d1452130079ae47f7a56328f8421e56f5ab.tar.xz weabot-542e8d1452130079ae47f7a56328f8421e56f5ab.zip |
Config para el usuario
Diffstat (limited to 'cgi')
-rw-r--r-- | cgi/api.py | 11 | ||||
-rw-r--r-- | cgi/templates/base_bottom.html | 4 | ||||
-rw-r--r-- | cgi/templates/base_top.html | 2 | ||||
-rw-r--r-- | cgi/templates/txt_board.en.html | 2 | ||||
-rw-r--r-- | cgi/templates/txt_board.html | 2 | ||||
-rwxr-xr-x | cgi/weabot.py | 7 |
6 files changed, 16 insertions, 12 deletions
@@ -336,6 +336,7 @@ def api_process(self, path_split): post['thumb_height'] = post['thumb_height'] post['message'] = post['message'] values['posts'].append(post) + elif method == 'delete': data_board = formdata.get('dir') data_postid = formdata.get('id') @@ -357,6 +358,7 @@ def api_process(self, path_split): imageonly = True deletePosts(board['dir'], postid, imageonly, data_password) + elif method == 'post': boarddir = formdata.get('board') @@ -385,6 +387,13 @@ def api_process(self, path_split): values['post_url'] = post_url values['time_taken'] = ttaken values['post_id'] = postid + + elif method == 'styles': + values['bbs_styles'] = Settings.TXT_STYLES + values['ib_styles'] = Settings.STYLES + values['bbs_styles_default'] = Settings.TXT_STYLES_DEFAULT + values['ib_styles_default'] = Settings.STYLES_DEFAULT + elif method == 'newThreads': data_limit = formdata.get('limit') limit = 30 @@ -399,9 +408,11 @@ def api_process(self, path_split): threads = getNewThreads(limit) values['threads'] = threads + elif method == "blotter": latest_news = FetchAll("SELECT `timestamp`, `message`, `timestamp_formatted` FROM `news` WHERE `type` = '2' ORDER BY `timestamp` DESC LIMIT %s", (Settings.HOME_NEWS,)) values["news"] = latest_news + elif method == 'boardsExtra': boards = FetchAll('SELECT dir, name, longname, subname, postarea_desc, postarea_extra, anonymous, subject, message, disable_name, disable_subject, allow_spoilers, allow_oekaki, numthreads, board_type, allow_images, allow_image_replies, maxsize FROM `boards` WHERE `secret`=0 ORDER BY `sort` ASC') values['boards'] = boards diff --git a/cgi/templates/base_bottom.html b/cgi/templates/base_bottom.html index 102f8f2..2a63435 100644 --- a/cgi/templates/base_bottom.html +++ b/cgi/templates/base_bottom.html @@ -1,3 +1,3 @@ -<div class="footer">- <a href="//www.bienvenidoainternet.org" target="_top">weabot</a> <?py include('templates/revision.html') ?> -</div> +<div id="footer">- <a href="//www.bienvenidoainternet.org" target="_top">weabot</a> <?py include('templates/revision.html') ?> -</div> </body> -</html>
\ No newline at end of file +</html> diff --git a/cgi/templates/base_top.html b/cgi/templates/base_top.html index 2dc079e..dcf3d65 100644 --- a/cgi/templates/base_top.html +++ b/cgi/templates/base_top.html @@ -37,7 +37,7 @@ </head> <body#{' class="res"' if replythread else ''} data-brd="#{board}"> <div id="main_nav"><span>[<a href="/" target="_top">Bienvenido a Internet</a>] [<?py include('templates/navbar.html') ?>]</span></div> - <div class="logo"> + <div id="logo"> <?py if board: ?> #{board_long} <?py else: ?> diff --git a/cgi/templates/txt_board.en.html b/cgi/templates/txt_board.en.html index 13a1554..75f548a 100644 --- a/cgi/templates/txt_board.en.html +++ b/cgi/templates/txt_board.en.html @@ -2,7 +2,7 @@ <body class="mainpage" data-brd="#{board}"> <div id="main_nav"><a href="/" target="_top">Bienvenido a Internet</a> | <?py include('templates/navbar.html') ?></div> <?py if banner_url: ?> - <img class="banner" src="#{banner_url}" style="width:#{banner_width}px;height:#{banner_height}px;" /> + <img id="banner" src="#{banner_url}" width="#{banner_width}" height="#{banner_height}" /> <?py #endif ?> <div id="titlebox" class="outerbox"> <div class="innerbox"> diff --git a/cgi/templates/txt_board.html b/cgi/templates/txt_board.html index 98cb159..4e8d820 100644 --- a/cgi/templates/txt_board.html +++ b/cgi/templates/txt_board.html @@ -2,7 +2,7 @@ <body class="mainpage" data-brd="#{board}"> <div id="main_nav"><a href="/" target="_top">Bienvenido a Internet</a> | <?py include('templates/navbar.html') ?></div> <?py if banner_url: ?> - <img class="banner" src="#{banner_url}" style="width:#{banner_width}px;height:#{banner_height}px;" /> + <img id="banner" src="#{banner_url}" width="#{banner_width}" height="#{banner_height}" /> <?py #endif ?> <div id="titlebox" class="outerbox"> <div class="innerbox"> diff --git a/cgi/weabot.py b/cgi/weabot.py index 3ecf0f3..c1bc1a3 100755 --- a/cgi/weabot.py +++ b/cgi/weabot.py @@ -323,13 +323,6 @@ class weabot(object): else: url = f"{Settings.HOME_URL}{board['dir']}/res/{thread['id']}.html" self.output += '<html xmlns="http://www.w3.org/1999/xhtml"><meta http-equiv="refresh" content="0;url=%s" /><body><p>...</p></body></html>' % url - elif path_split[1] == "nostalgia": - caught = True - OpenDb() - thread = FetchOne( - "SELECT `timestamp` FROM `archive` WHERE `boardid` = 9 AND `timestamp` < 1462937230 ORDER BY RAND() LIMIT 1") - url = f"{Settings.HOME_URL}/zonavip/read/{thread['timestamp']}/" - self.output += '<html xmlns="http://www.w3.org/1999/xhtml"><meta http-equiv="refresh" content="0;url=%s" /><body><p>...</p></body></html>' % url elif path_split[1] == "banned": OpenDb() bans = FetchAll("SELECT * FROM `bans` WHERE INET6_ATON(%s) BETWEEN `ipstart` AND `ipend`", (self.ip,)) |