Browse Source
Merge pull request #178 from nonmakina/bumplockIndicator
Implements fixes and changes to be able to view the bumplock status of a thread
pull/40/head
dedushka1
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with
12 additions and
8 deletions
-
inc/config.php
-
inc/instance-config.php
-
post.php
-
templates/post_thread.html
-
templates/themes/catalog/catalog.html
|
|
@ -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 |
|
|
|
|
|
@ -122,6 +122,9 @@ $config['mod']['rawhtml'] = MOD; |
|
|
|
$config['mod']['mod_board_log'] = MOD; |
|
|
|
$config['mod']['ip_recentposts'] = 350; |
|
|
|
|
|
|
|
// Allow everyone to see bumplocks |
|
|
|
$config['mod']['view_bumplock'] = -1; |
|
|
|
|
|
|
|
$config['allow_thread_deletion'] = false; |
|
|
|
|
|
|
|
// Max attachments per post |
|
|
|
|
|
@ -1374,7 +1374,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']); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -21,28 +21,28 @@ |
|
|
|
{% if config.font_awesome %} |
|
|
|
<i class="fa fa-thumb-tack" title="Sticky"></i> |
|
|
|
{% else %} |
|
|
|
<img class="icon" title="Sticky" src="{{ config.image_sticky }}" alt="Sticky" /> |
|
|
|
<img class="icon" title="Sticky" src="{{ config.root }}{{ config.image_sticky }}" alt="Sticky" /> |
|
|
|
{% endif %} |
|
|
|
{% endif %} |
|
|
|
{% if post.locked %} |
|
|
|
{% if config.font_awesome %} |
|
|
|
<i class="fa fa-lock" title="Locked"></i> |
|
|
|
{% else %} |
|
|
|
<img class="icon" title="Locked" src="{{ config.image_locked }}" alt="Locked" /> |
|
|
|
<img class="icon" title="Locked" src="{{ config.root }}{{ config.image_locked }}" alt="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 post.sage and (config.mod.view_bumplock < 0 or (post.mod and post.mod|hasPermission(config.mod.view_bumplock, board.uri))) %} |
|
|
|
{% if config.font_awesome %} |
|
|
|
<i class="fa fa-anchor" title="Bumplocked"></i> |
|
|
|
{% else %} |
|
|
|
<img class="icon" title="Bumplocked" src="{{ config.image_bumplocked }}" alt="Bumplocked" /> |
|
|
|
<img class="icon" title="Bumplocked" src="{{ config.root }}{{ config.image_bumplocked }}" alt="Bumplocked" /> |
|
|
|
{% endif %} |
|
|
|
{% endif %} |
|
|
|
{% if post.cycle %} |
|
|
|
{% if config.font_awesome %} |
|
|
|
<i class="fa fa-refresh" title="Cyclical"></i> |
|
|
|
{% else %} |
|
|
|
<img class="icon" title="Cyclical" src="{{ config.image_sticky }}" alt="Cyclical" /> |
|
|
|
<img class="icon" title="Cyclical" src="{{ config.root }}{{ config.image_cycled }}" alt="Cyclical" /> |
|
|
|
{% endif %} |
|
|
|
{% endif %} |
|
|
|
{% if index %} |
|
|
|
|
|
@ -70,7 +70,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')}}"> |
|
|
|
</a> |
|
|
|
<div class="replies"> |
|
|
|
<strong>R: {{ post.replies }} / I: {{ post.images }}{% if post.sticky %} (sticky){% endif %}{% if post.locked %} <span class="fa fa-lock"> </span>{% endif %}</strong> |
|
|
|
<strong>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 %} <span class="fa fa-lock"> </span>{% endif %}</strong> |
|
|
|
{% if post.subject %} |
|
|
|
<p class="intro"> |
|
|
|
<span class="subject"> |
|
|
|