From 717795ddffaff30cedb8c71b0ddb68f0ab087d59 Mon Sep 17 00:00:00 2001 From: Lorenzo Yario Date: Sat, 8 Feb 2025 22:26:17 -0600 Subject: [PATCH 01/20] Update fileinfo.html #891 --- templates/post/fileinfo.html | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/templates/post/fileinfo.html b/templates/post/fileinfo.html index ec490129..ae1dc092 100644 --- a/templates/post/fileinfo.html +++ b/templates/post/fileinfo.html @@ -1,16 +1,16 @@ {% if post.embed %} {{ post.embed }} - {% else %} -
- {% for file in post.files %} -
+ {% else %} +
+ {% for file in post.files %} +
{% if file.file == 'deleted' %} {% else %} -

File: {{ file.file }} +

File: {{ file.file }} ( {% if file.thumb == 'spoiler' %} - {% trans %}Spoiler Image{% endtrans %}, + {% trans %}Spoiler Image{% endtrans %}, {% endif %} {{ file.size|filesize }} {% if file.width and file.height %} @@ -21,18 +21,22 @@ {% endif %} {% if config.show_filename and file.filename %} , - {% if file.filename|length > config.max_filename_display %} - {{ file.filename|truncate_filename(config.max_filename_display)|e|bidi_cleanup }} + {% if file.thumb == 'spoiler' %} + {% trans %}Spoiler Image{% endtrans %} + {% elseif file.filename|length > config.max_filename_display %} + {{ file.filename|truncate_filename(config.max_filename_display)|e|bidi_cleanup }} {% else %} - {{ file.filename|e|bidi_cleanup }} + {{ file.filename|e|bidi_cleanup }} {% endif %} {% endif %} ) + {% include "post/image_identification.html" %} - {% include "post/file_controls.html" %}

+ {% include "post/file_controls.html" %} +

{% include "post/image.html" with {'post':file} %} {% endif %}
- {% endfor %} + {% endfor %}
- {% endif %} + {% endif %} From 2c2d476cea62b1080562234be63ab9320afcf783 Mon Sep 17 00:00:00 2001 From: Lorenzo Yario Date: Sat, 8 Feb 2025 22:27:21 -0600 Subject: [PATCH 02/20] 5.2.1 --- install.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.php b/install.php index 36151c87..6c8d627d 100644 --- a/install.php +++ b/install.php @@ -1,7 +1,7 @@ Date: Sat, 8 Feb 2025 22:28:53 -0600 Subject: [PATCH 03/20] Update login.html #890 --- templates/mod/login.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/mod/login.html b/templates/mod/login.html index 6ffd950f..6ed8dc64 100644 --- a/templates/mod/login.html +++ b/templates/mod/login.html @@ -7,7 +7,7 @@ {% trans 'Username' %} - + From 7bc1f67b4e19af3e24f8e1d6e9160535742075b2 Mon Sep 17 00:00:00 2001 From: Lorenzo Yario Date: Wed, 2 Apr 2025 00:34:45 -0500 Subject: [PATCH 04/20] X --- templates/thread.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/thread.html b/templates/thread.html index 4e8fbcec..18aeb9d1 100644 --- a/templates/thread.html +++ b/templates/thread.html @@ -16,7 +16,7 @@ - + {% if thread.files.0.thumb %}{% endif %} From ac3f69a7eb025dd594d259c87744c7d7c67bb283 Mon Sep 17 00:00:00 2001 From: Lorenzo Yario Date: Wed, 2 Apr 2025 02:12:50 -0500 Subject: [PATCH 05/20] jank? maybe but it fixes our current config.php --- inc/mod/pages.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/inc/mod/pages.php b/inc/mod/pages.php index 8a549481..0ec97d3e 100644 --- a/inc/mod/pages.php +++ b/inc/mod/pages.php @@ -2643,6 +2643,11 @@ function mod_config(Context $ctx, $board_config = false) { if ($board_config && !openBoard($board_config)) error($config['error']['noboard']); + else { + $board_config_file = $board_config . '/config.php'; + include $board_config_file; + } + if (!hasPermission($config['mod']['edit_config'], $board_config)) error($config['error']['noaccess']); From 4244b0a86c4b15de9e3fe293a6c94c4541d9ff7c Mon Sep 17 00:00:00 2001 From: Lorenzo Yario Date: Wed, 2 Apr 2025 02:14:46 -0500 Subject: [PATCH 06/20] tidied slightly --- inc/mod/pages.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/inc/mod/pages.php b/inc/mod/pages.php index 0ec97d3e..a3276702 100644 --- a/inc/mod/pages.php +++ b/inc/mod/pages.php @@ -2644,8 +2644,7 @@ function mod_config(Context $ctx, $board_config = false) { error($config['error']['noboard']); else { - $board_config_file = $board_config . '/config.php'; - include $board_config_file; + include $board_config . '/config.php';; } if (!hasPermission($config['mod']['edit_config'], $board_config)) From e67f3f94bf79a82657f70080f1534dc0e9f63b90 Mon Sep 17 00:00:00 2001 From: Lorenzo Yario Date: Wed, 2 Apr 2025 02:20:16 -0500 Subject: [PATCH 07/20] Delete static/banners/defaultbanner.png --- static/banners/defaultbanner.png | Bin 3903 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 static/banners/defaultbanner.png diff --git a/static/banners/defaultbanner.png b/static/banners/defaultbanner.png deleted file mode 100644 index 44fee96256509af627456c6672f40d63d1bf1dcf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3903 zcmbtV_ct4i*Ebp>f;2*@mDDaJMo}|jJgC~WYVXn7HHtowL@2eXQKe=*cI{bWwX|w) z8qrp1Y--ec{qX${-gEA`=iVRgx$E<}_l1$cKTM#TASx;jfC4DO?EA`%Ky`Rv=vB+nAnXZUFMQbj!wT`Le4L0mY0_yZ1GxSN;(42qA`y6 zenM}7gIj47oPp3>P3mg1q)F4B$xS!##=6;pAVx7_NjYG&R|toM@Pp+af8w^A?yX@f`& zWnTJyIK!~p#ClM<+3lK{c)cDnlC4MhzO_VVG@9su3{}qih^U;QSORW@CusA-MxH<2 z*sN!=Cw--0Vjxu~5kSCOa^gq+Y)2%ANQT~!QI$D@92akCl4@PWo1kqLZ-lbAu2D0i z;cI-GV<(?bJLVCgSODqybsxPq*u5F7#*BzY!Ts8oW@{2VBb&&S1@dvhjPdd3pLKp` zxK`4(!ZHI67kt(4Q8@R)X7HnA8;P06avJuDADyer8HHdVWABsmi$BjgEyaTrc}|l4 zQkcvu*wp%+{NGIwXBrnaoxlTb_39<%0GuK9Zf}@szIWsNDMZyCx{K=P|3dLVax8XG z)ApP>j)0K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Hw&-a7aZ&0eFLo)E^WRH@FVSkRb5FbK?t}1gu&b+XQmhkY nlyVDz*7~1|D$_|Ryrfl{c;^~gfr-BQ?^L>42Ab7q2kid=oP Date: Wed, 2 Apr 2025 02:21:31 -0500 Subject: [PATCH 08/20] Create banners --- static/banners | 1 + 1 file changed, 1 insertion(+) create mode 100644 static/banners diff --git a/static/banners b/static/banners new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/static/banners @@ -0,0 +1 @@ + From b08dbcff14cc1dcb5d649b7b62b040ff5dc9126a Mon Sep 17 00:00:00 2001 From: Lorenzo Yario Date: Wed, 2 Apr 2025 02:22:15 -0500 Subject: [PATCH 09/20] Delete static/banners --- static/banners | 1 - 1 file changed, 1 deletion(-) delete mode 100644 static/banners diff --git a/static/banners b/static/banners deleted file mode 100644 index 8b137891..00000000 --- a/static/banners +++ /dev/null @@ -1 +0,0 @@ - From 8aa965b77f5b2b9f3d90e5f455e9823b2f6c8aea Mon Sep 17 00:00:00 2001 From: Lorenzo Yario Date: Wed, 2 Apr 2025 02:22:26 -0500 Subject: [PATCH 10/20] Create .gitkeep --- static/banners/.gitkeep | 1 + 1 file changed, 1 insertion(+) create mode 100644 static/banners/.gitkeep diff --git a/static/banners/.gitkeep b/static/banners/.gitkeep new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/static/banners/.gitkeep @@ -0,0 +1 @@ + From 9468c9d372a0cc5b1092e1f240ad6eef491ae2d3 Mon Sep 17 00:00:00 2001 From: Lorenzo Yario Date: Wed, 2 Apr 2025 02:22:44 -0500 Subject: [PATCH 11/20] Add files via upload --- static/banners/defaultbanner.png | Bin 0 -> 3675 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 static/banners/defaultbanner.png diff --git a/static/banners/defaultbanner.png b/static/banners/defaultbanner.png new file mode 100644 index 0000000000000000000000000000000000000000..791457ad9426120069d4be5b1204d46e73154c92 GIT binary patch literal 3675 zcmb7{_fr$h*2e<`o+PvoN0J<|h#=CGUQF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c/config.php b/inc/config.php index b9be9991..db96b8eb 100644 --- a/inc/config.php +++ b/inc/config.php @@ -1164,8 +1164,45 @@ '' ), array( - '/^https?:\/\/(\w+\.)?metacafe\.com\/watch\/(\d+)\/([a-zA-Z0-9_\-.]+)\/(\?[^\'"<>]+)?$/i', - '' + '/^https?:\/\/(www\.)?rumble\.com\/(?:embed\/)?([a-zA-Z0-9]+)(?:\/[a-zA-Z0-9\-]+\.html)?(?:\?[^\'"<>]*)?$/i', + '' + ), + array( + '/^https?:\/\/(www\.)?bitchute\.com\/(?:video|embed)\/([a-zA-Z0-9]+)(\/)?(\?[^\'"<>]*)?$/i', + '' + ), + array( + '/^https?:\/\/(www\.)?kick\.com\/([a-zA-Z0-9_]+)(\?[^\'"<>]*)?$/i', + '' + ), + array( + '/^https?:\/\/(www\.)?odysee\.com\/(?:\$\/embed\/)?(?:@[^:\/]+:[a-zA-Z0-9]+\/)?[a-zA-Z0-9\-]+:([a-zA-Z0-9]+)(\/)?(\?[^\'"<>]*)?$/i', + '' + ), + /* + array( + '/^https?:\/\/(www\.)?tiktok\.com\/@([a-zA-Z0-9_.]+)\/video\/([0-9]+)(\?[^\'"<>]*)?$/i', + '
' + ), + array( + '/^https?:\/\/(www\.)?instagram\.com\/(p|reel|tv)\/([a-zA-Z0-9_-]+)(\/)?(\?[^\'"<>]*)?$/i', + '
' + ), + array( + '/^https?:\/\/(www\.)?(twitter|x)\.com\/([a-zA-Z0-9_]+)\/status\/([0-9]+)(\?[^\'"<>]*)?$/i', + '' + ), + array( + '/^https?:\/\/(www\.)?bsky\.app\/profile\/([a-zA-Z0-9_.-]+)\/post\/([a-zA-Z0-9]+)(\?[^\'"<>]*)?$/i', + '' + ),*/ + array( + '/^https?:\/\/(www\.)?bilibili\.com\/video\/(BV[a-zA-Z0-9]+|av[0-9]+)(\/)?(\?[^\'"<>]*)?$/i', + '' + ), + array( + '/^https?:\/\/(www\.)?(nicovideo\.jp\/watch|nico\.ms)\/(sm[0-9]+)(\?[^\'"<>]*)?$/i', + '' ), array( '/^https?:\/\/(\w+\.)?(vocaroo\.com\/|voca\.ro\/)([a-zA-Z0-9]{2,12})$/i', From 8350645a702fec7a2dd7dc3c8bbfcfe4730915d2 Mon Sep 17 00:00:00 2001 From: Lorenzo Yario Date: Wed, 2 Apr 2025 02:52:44 -0500 Subject: [PATCH 13/20] we don't need kick it doesn't embed nicely --- inc/config.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/inc/config.php b/inc/config.php index db96b8eb..847a8cda 100644 --- a/inc/config.php +++ b/inc/config.php @@ -1171,10 +1171,6 @@ '/^https?:\/\/(www\.)?bitchute\.com\/(?:video|embed)\/([a-zA-Z0-9]+)(\/)?(\?[^\'"<>]*)?$/i', '' ), - array( - '/^https?:\/\/(www\.)?kick\.com\/([a-zA-Z0-9_]+)(\?[^\'"<>]*)?$/i', - '' - ), array( '/^https?:\/\/(www\.)?odysee\.com\/(?:\$\/embed\/)?(?:@[^:\/]+:[a-zA-Z0-9]+\/)?[a-zA-Z0-9\-]+:([a-zA-Z0-9]+)(\/)?(\?[^\'"<>]*)?$/i', '' From 87420966b21eed512c0fd9a17e43e24864784f92 Mon Sep 17 00:00:00 2001 From: Lorenzo Yario Date: Wed, 2 Apr 2025 03:03:58 -0500 Subject: [PATCH 14/20] kick doesn't seem all too bad anymore. Removed X/Bluesky test --- inc/config.php | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/inc/config.php b/inc/config.php index 847a8cda..f140b77d 100644 --- a/inc/config.php +++ b/inc/config.php @@ -1175,6 +1175,10 @@ '/^https?:\/\/(www\.)?odysee\.com\/(?:\$\/embed\/)?(?:@[^:\/]+:[a-zA-Z0-9]+\/)?[a-zA-Z0-9\-]+:([a-zA-Z0-9]+)(\/)?(\?[^\'"<>]*)?$/i', '' ), + array( + '/^https?:\/\/(www\.)?kick\.com\/([a-zA-Z0-9_]+)(\?[^\'"<>]*)?$/i', + '' + ), /* array( '/^https?:\/\/(www\.)?tiktok\.com\/@([a-zA-Z0-9_.]+)\/video\/([0-9]+)(\?[^\'"<>]*)?$/i', @@ -1184,14 +1188,7 @@ '/^https?:\/\/(www\.)?instagram\.com\/(p|reel|tv)\/([a-zA-Z0-9_-]+)(\/)?(\?[^\'"<>]*)?$/i', '
' ), - array( - '/^https?:\/\/(www\.)?(twitter|x)\.com\/([a-zA-Z0-9_]+)\/status\/([0-9]+)(\?[^\'"<>]*)?$/i', - '' - ), - array( - '/^https?:\/\/(www\.)?bsky\.app\/profile\/([a-zA-Z0-9_.-]+)\/post\/([a-zA-Z0-9]+)(\?[^\'"<>]*)?$/i', - '' - ),*/ + */ array( '/^https?:\/\/(www\.)?bilibili\.com\/video\/(BV[a-zA-Z0-9]+|av[0-9]+)(\/)?(\?[^\'"<>]*)?$/i', '' From 5259f88262a02431bca2a15ba047d045269681c3 Mon Sep 17 00:00:00 2001 From: Lorenzo Yario Date: Wed, 2 Apr 2025 03:46:07 -0500 Subject: [PATCH 15/20] Update config.php --- inc/config.php | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/inc/config.php b/inc/config.php index f140b77d..4f917f82 100644 --- a/inc/config.php +++ b/inc/config.php @@ -1164,7 +1164,7 @@ '' ), array( - '/^https?:\/\/(www\.)?rumble\.com\/(?:embed\/)?([a-zA-Z0-9]+)(?:\/[a-zA-Z0-9\-]+\.html)?(?:\?[^\'"<>]*)?$/i', + '/^https?:\/\/(www\.)?rumble\.com\/embed\/([a-zA-Z0-9]+)(\/\?[^\'"<>]*)?$/i', '' ), array( @@ -1172,14 +1172,15 @@ '' ), array( - '/^https?:\/\/(www\.)?odysee\.com\/(?:\$\/embed\/)?(?:@[^:\/]+:[a-zA-Z0-9]+\/)?[a-zA-Z0-9\-]+:([a-zA-Z0-9]+)(\/)?(\?[^\'"<>]*)?$/i', - '' + '/^https?:\/\/(?:www\.)?odysee\.com\/(?:@[^\/]+\/)?([-a-zA-Z0-9_]+:[a-zA-Z0-9]+)(\/)?(\?[^\'"<>]*)?$/i', + '' ), array( '/^https?:\/\/(www\.)?kick\.com\/([a-zA-Z0-9_]+)(\?[^\'"<>]*)?$/i', '' ), /* + //Both TikTok and Instagram are commented out since they contain some extra scripting you might not want natively on your website. array( '/^https?:\/\/(www\.)?tiktok\.com\/@([a-zA-Z0-9_.]+)\/video\/([0-9]+)(\?[^\'"<>]*)?$/i', '
' @@ -1189,14 +1190,6 @@ '
' ), */ - array( - '/^https?:\/\/(www\.)?bilibili\.com\/video\/(BV[a-zA-Z0-9]+|av[0-9]+)(\/)?(\?[^\'"<>]*)?$/i', - '' - ), - array( - '/^https?:\/\/(www\.)?(nicovideo\.jp\/watch|nico\.ms)\/(sm[0-9]+)(\?[^\'"<>]*)?$/i', - '' - ), array( '/^https?:\/\/(\w+\.)?(vocaroo\.com\/|voca\.ro\/)([a-zA-Z0-9]{2,12})$/i', '' From 0866adc89f8487733c8c3348a4250861545d7977 Mon Sep 17 00:00:00 2001 From: Lorenzo Yario Date: Wed, 2 Apr 2025 03:56:03 -0500 Subject: [PATCH 16/20] styling for predefined ban reasons --- stylesheets/style.css | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/stylesheets/style.css b/stylesheets/style.css index ef1abf8b..66060c64 100644 --- a/stylesheets/style.css +++ b/stylesheets/style.css @@ -1234,12 +1234,35 @@ div.mix { display: inline-block; } -.ban-reason-table .warning-reason-table tr td:first-child { - text-align: right; - padding-right: 10px; +.ban-reason-table { + margin: 10px auto; + border-collapse: collapse; + width: auto; + font-size: 10pt; } -.ban-reason-table .warning-reason-table tr:hover td { - cursor: pointer; - background-color: rgba(100%,100%,100%,0.2); +.ban-reason-table th, +.ban-reason-table td { + border: 1px solid #98E; + padding: 4px 8px; + text-align: left; +} + +.ban-reason-table th { + background-color: #98E; + color: black; + font-weight: bold; +} + +.ban-reason-table tr:nth-child(even) td { + background-color: #EEF2FF; +} + +.ban-reason-table tr:nth-child(odd) td { + background-color: #FFFFFF; +} + +.ban-reason-table tr:hover td { + background-color: #D6DAF0; + cursor: pointer; } From f27e5a6989e95862c924691c45a449fc8793bdcf Mon Sep 17 00:00:00 2001 From: Lorenzo Yario Date: Wed, 2 Apr 2025 04:04:08 -0500 Subject: [PATCH 17/20] ensure premade ban reasons are passed --- templates/mod/view_ip.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/mod/view_ip.html b/templates/mod/view_ip.html index 867312c4..e4871275 100644 --- a/templates/mod/view_ip.html +++ b/templates/mod/view_ip.html @@ -103,7 +103,7 @@
{% trans 'New ban' %} {% set redirect = '?/IP/' ~ ip|cloak_ip ~ '#bans' %} - {% include 'mod/ban_form.html' %} + {% include 'mod/ban_form.html' with { 'reasons': config.premade_ban_reasons } %}
{% endif %} From 03da3b8db0560d217a329e631fbd3c47ce71e496 Mon Sep 17 00:00:00 2001 From: Lorenzo Yario Date: Wed, 2 Apr 2025 04:27:38 -0500 Subject: [PATCH 18/20] bug fix --- templates/mod/ban_history.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/mod/ban_history.html b/templates/mod/ban_history.html index 812a3ee1..307c8929 100644 --- a/templates/mod/ban_history.html +++ b/templates/mod/ban_history.html @@ -11,7 +11,7 @@ {% trans 'IP' %} - {{ ban.cmask }} + {{ ban.mask|cloak_mask }} {% trans 'Reason' %} From 59681182310fa9fc0479e9a25cfbceacc09fe15d Mon Sep 17 00:00:00 2001 From: Lorenzo Yario Date: Wed, 2 Apr 2025 04:39:20 -0500 Subject: [PATCH 19/20] bugfix --- js/mod/ban-list.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/mod/ban-list.js b/js/mod/ban-list.js index 415934b1..07a042c9 100644 --- a/js/mod/ban-list.js +++ b/js/mod/ban-list.js @@ -60,8 +60,8 @@ var banlist_init = function(token, my_boards, inMod) { // duration? expires: {name: _("Expires"), width: "235px", fmt: function(f) { if (!f.expires || f.expires == 0) return ""+_("never")+""; - return strftime(window.post_date, new Date((f.expires|0)*1000), datelocale) + - ((f.expires < time()) ? "" : " "+_("in ")+until(f.expires|0)+""); + var formattedDate = strftime("%m/%d/%Y (%a) %H:%M:%S", new Date((f.expires|0)*1000), datelocale); + return formattedDate + ((f.expires < time()) ? "" : " "+_("in ")+until(f.expires|0)+""); } }, username: {name: _("Staff"), width: "100px", fmt: function(f) { var pre='',suf='',un=f.username; From 953635f807e562b03c23ce54a02de9defebbc384 Mon Sep 17 00:00:00 2001 From: Lorenzo Yario Date: Wed, 2 Apr 2025 04:44:51 -0500 Subject: [PATCH 20/20] Delete static/banners/.gitkeep --- static/banners/.gitkeep | 1 - 1 file changed, 1 deletion(-) delete mode 100644 static/banners/.gitkeep diff --git a/static/banners/.gitkeep b/static/banners/.gitkeep deleted file mode 100644 index 8b137891..00000000 --- a/static/banners/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -