Browse Source

Allow for HTML in the board subtitle

Conflicts:
	inc/config.php
pull/40/head
ctrlcctrlv 11 years ago
committed by Michael Foster
parent
commit
acb4c47a9f
  1. 3
      inc/config.php
  2. 6
      templates/index.html
  3. 8
      templates/mod/dashboard.html
  4. 8
      templates/thread.html

3
inc/config.php

@ -615,6 +615,9 @@
// Number of reports you can create at once. // Number of reports you can create at once.
$config['report_limit'] = 3; $config['report_limit'] = 3;
// Allow unfiltered HTML in board subtitles. This is useful for placing icons and links.
$config['allow_subtitle_html'] = false;
/* /*
* ==================== * ====================
* Display settings * Display settings

6
templates/index.html

@ -13,7 +13,11 @@
<h1>{{ board.url }} - {{ board.title|e }}</h1> <h1>{{ board.url }} - {{ board.title|e }}</h1>
<div class="subtitle"> <div class="subtitle">
{% if board.subtitle %} {% if board.subtitle %}
{{ board.subtitle|e }} {% if config.allow_subtitle_html %}
{{ board.subtitle }}
{% else %}
{{ board.subtitle|e }}
{% endif %}
{% endif %} {% endif %}
{% if mod %}<p><a href="?/">{% trans %}Return to dashboard{% endtrans %}</a></p>{% endif %} {% if mod %}<p><a href="?/">{% trans %}Return to dashboard{% endtrans %}</a></p>{% endif %}
</div> </div>

8
templates/mod/dashboard.html

@ -8,7 +8,13 @@
- -
{{ board.title|e }} {{ board.title|e }}
{% if board.subtitle %} {% if board.subtitle %}
<small>&mdash; {{ board.subtitle|e }}</small> <small>&mdash;
{% if config.allow_subtitle_html %}
{{ board.subtitle }}
{% else %}
{{ board.subtitle|e }}
{% endif %}
</small>
{% endif %} {% endif %}
{% if mod|hasPermission(config.mod.manageboards) %} {% if mod|hasPermission(config.mod.manageboards) %}
<a href="?/edit/{{ board.uri }}"><small>[{% trans 'edit' %}]</small></a> <a href="?/edit/{{ board.uri }}"><small>[{% trans 'edit' %}]</small></a>

8
templates/thread.html

@ -13,7 +13,11 @@
<h1>{{ board.url }} - {{ board.title|e }}</h1> <h1>{{ board.url }} - {{ board.title|e }}</h1>
<div class="subtitle"> <div class="subtitle">
{% if board.subtitle %} {% if board.subtitle %}
{{ board.subtitle|e }} {% if config.allow_subtitle_html %}
{{ board.subtitle }}
{% else %}
{{ board.subtitle|e }}
{% endif %}
{% endif %} {% endif %}
{% if mod %}<p><a href="?/">{% trans %}Return to dashboard{% endtrans %}</a></p>{% endif %} {% if mod %}<p><a href="?/">{% trans %}Return to dashboard{% endtrans %}</a></p>{% endif %}
</div> </div>
@ -42,4 +46,4 @@
ready(); ready();
{% endraw %}</script> {% endraw %}</script>
</body> </body>
</html> </html>

Loading…
Cancel
Save