Browse Source

Implements fixes and changes to be able to view the bumplock status of a thread

pull/40/head
nonmakina 3 years ago
parent
commit
906ed844d3
  1. 3
      inc/config.php
  2. 3
      inc/instance-config.php
  3. 2
      post.php
  4. 8
      templates/post_thread.html
  5. 2
      templates/themes/catalog/catalog.html

3
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

3
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

2
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']);
}

8
templates/post_thread.html

@ -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 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 %}

2
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')}}">
</a>
<div class="replies">
<strong>R: {{ post.replies }} / I: {{ post.images }}{% if post.sticky %} (sticky){% endif %}{% if post.locked %} <span class="fa fa-lock">&nbsp;</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">&nbsp;</span>{% endif %}</strong>
{% if post.subject %}
<p class="intro">
<span class="subject">

Loading…
Cancel
Save