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 --- static/css/cyber.css | 6 +- static/css/dickgirl.css | 2 +- static/css/guro.css | 2 +- static/css/hotdog.css | 4 +- static/css/ib.css | 9 +-- static/css/kraut.css | 4 +- static/css/lavanda.css | 2 +- static/css/photon.css | 2 +- static/css/putaba.css | 6 +- static/css/rene.css | 6 +- static/css/spc/material.css | 2 +- static/css/spc/material_normal.css | 2 +- static/css/spc/navidad.css | 4 +- static/css/spc/valentin.css | 4 +- static/css/spc/valentin2.css | 4 +- static/css/txt/amber.css | 2 +- static/css/txt/ayashii.css | 4 +- static/css/txt/bbs.css | 6 +- static/css/txt/berries.css | 2 +- static/css/txt/cuteanarchy.css | 2 +- static/css/txt/gamer.css | 2 +- static/css/txt/mercury.css | 3 + static/css/txt/void.css | 2 +- static/css/vndb.css | 6 +- static/example/banner.jpg | Bin 0 -> 3826 bytes static/example/bbs1.html | 58 +++++++++++++++++++ static/example/bbs2.html | 53 +++++++++++++++++ static/example/ib1.html | 97 +++++++++++++++++++++++++++++++ static/js/userconf.js | 114 +++++++++++++++++++++++++++++++++++++ static/js/weabotxt.js | 2 +- 36 files changed, 383 insertions(+), 57 deletions(-) create mode 100644 static/example/banner.jpg create mode 100644 static/example/bbs1.html create mode 100644 static/example/bbs2.html create mode 100644 static/example/ib1.html create mode 100644 static/js/userconf.js 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 @@ -