From 906ed844d3d3bbbedd04b3aba094dd1b357d2bbf Mon Sep 17 00:00:00 2001 From: nonmakina Date: Sun, 17 Jan 2021 21:31:06 -0600 Subject: [PATCH] Implements fixes and changes to be able to view the bumplock status of a thread --- inc/config.php | 3 ++- inc/instance-config.php | 3 +++ post.php | 2 +- templates/post_thread.html | 8 ++++---- templates/themes/catalog/catalog.html | 2 +- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/inc/config.php b/inc/config.php index b5178fc4..80f3c01f 100644 --- a/inc/config.php +++ b/inc/config.php @@ -1223,7 +1223,8 @@ // $config['font_awesome'] is false (default). // $config['image_sticky'] = 'static/sticky.png'; // $config['image_locked'] = 'static/locked.gif'; - // $config['image_bumplocked'] = 'static/sage.png'. + // $config['image_bumplocked'] = 'static/sage.png'; + // $config['image_cycled'] = 'static/cycled.png'; // If you want to put images and other dynamic-static stuff on another (preferably cookieless) domain. // This will override $config['root'] and $config['dir']['...'] directives. "%s" will get replaced with diff --git a/inc/instance-config.php b/inc/instance-config.php index c752938f..d9b75721 100644 --- a/inc/instance-config.php +++ b/inc/instance-config.php @@ -120,6 +120,9 @@ $config['mod']['editpost'] = MOD; $config['mod']['rawhtml'] = MOD; $config['mod']['mod_board_log'] = MOD; +// Allow everyone to see bumplocks +$config['mod']['view_bumplock'] = -1; + $config['allow_thread_deletion'] = false; // Max attachments per post diff --git a/post.php b/post.php index bf42d052..70ba29e2 100644 --- a/post.php +++ b/post.php @@ -1357,7 +1357,7 @@ function handle_post(){ query('INSERT INTO ``cites`` VALUES ' . implode(', ', $insert_rows)) or error(db_error()); } - if (!$post['op'] && strtolower($post['email']) != 'sage' && !$thread['sage'] && ($config['reply_limit'] == 0 || $numposts['replies']+1 < $config['reply_limit'])) { + if (!$post['op'] && strtolower($post['email']) != 'sage' && !$thread['sage'] && ($config['reply_limit'] == 0 || $numposts['replies'] < $config['reply_limit'])) { bumpThread($post['thread']); } diff --git a/templates/post_thread.html b/templates/post_thread.html index 6b114f6b..3838d515 100644 --- a/templates/post_thread.html +++ b/templates/post_thread.html @@ -21,28 +21,28 @@ {% if config.font_awesome %} {% else %} - Sticky + Sticky {% endif %} {% endif %} {% if post.locked %} {% if config.font_awesome %} {% else %} - Locked + Locked {% endif %} {% endif %} {% if post.bumplocked and (config.mod.view_bumplock < 0 or (post.mod and post.mod|hasPermission(config.mod.view_bumplock, board.uri))) %} {% if config.font_awesome %} {% else %} - Bumplocked + Bumplocked {% endif %} {% endif %} {% if post.cycle %} {% if config.font_awesome %} {% else %} - Cyclical + Cyclical {% endif %} {% endif %} {% if index %} diff --git a/templates/themes/catalog/catalog.html b/templates/themes/catalog/catalog.html index e39debee..6a8e819e 100644 --- a/templates/themes/catalog/catalog.html +++ b/templates/themes/catalog/catalog.html @@ -65,7 +65,7 @@ id="img-{{ post.id }}" data-subject="{% if post.subject %}{{ post.subject|e }}{% endif %}" data-name="{{ post.name|e }}" data-muhdifference="{{ post.muhdifference }}" class="{{post.board}} thread-image" title="{{post.bump|date('%b %d %H:%M')}}">
- R: {{ post.replies }} / I: {{ post.images }}{% if post.sticky %} (sticky){% endif %}{% if post.locked %}  {% endif %} + R: {{ post.replies }} / I: {{ post.images }}{% if post.sticky %} (sticky){% endif %}{% if post.sage %} (sage){% endif %}{% if (config.reply_limit > 0) and (post.replies >= config.reply_limit) %} (full){% endif %}{% if post.locked %}  {% endif %} {% if post.subject %}