From 542e8d1452130079ae47f7a56328f8421e56f5ab Mon Sep 17 00:00:00 2001 From: Choom Date: Mon, 16 Jan 2023 05:32:08 -0300 Subject: Config para el usuario --- cgi/api.py | 11 +++++++++++ cgi/templates/base_bottom.html | 4 ++-- cgi/templates/base_top.html | 2 +- cgi/templates/txt_board.en.html | 2 +- cgi/templates/txt_board.html | 2 +- cgi/weabot.py | 7 ------- 6 files changed, 16 insertions(+), 12 deletions(-) (limited to 'cgi') diff --git a/cgi/api.py b/cgi/api.py index e6968f8..129da97 100644 --- a/cgi/api.py +++ b/cgi/api.py @@ -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 @@ - + - \ No newline at end of file + 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 @@ -