summaryrefslogtreecommitdiff
path: root/templates/mod
diff options
context:
space:
mode:
authorAppleman1234 <applemansigloo@gmail.com>2022-09-25 13:22:40 +1000
committerAppleman1234 <applemansigloo@gmail.com>2022-09-25 13:22:40 +1000
commit92561d7f36508b7e0271926e417adf0e2e53916b (patch)
treea8588b4f70af276c5acf58836e33b1f6ff5c61e8 /templates/mod
parent6f1083e4b51fc9c4c594f6c72cf3d84ef4d0298b (diff)
Initial attempt a switch to composer and PHP-8.1 compatibility
Diffstat (limited to 'templates/mod')
-rw-r--r--templates/mod/config-editor-php.html2
-rw-r--r--templates/mod/config-editor.html6
-rw-r--r--templates/mod/inbox.html2
-rw-r--r--templates/mod/log.html2
-rw-r--r--templates/mod/merge.html2
-rw-r--r--templates/mod/move.html2
-rw-r--r--templates/mod/move_reply.html2
-rw-r--r--templates/mod/news.html2
-rw-r--r--templates/mod/noticeboard.html2
-rw-r--r--templates/mod/recent_posts.html2
-rw-r--r--templates/mod/search_results.html2
-rw-r--r--templates/mod/themes.html2
-rw-r--r--templates/mod/user.html2
-rw-r--r--templates/mod/view_ip.html14
14 files changed, 22 insertions, 22 deletions
diff --git a/templates/mod/config-editor-php.html b/templates/mod/config-editor-php.html
index 8610316b..e265df79 100644
--- a/templates/mod/config-editor-php.html
+++ b/templates/mod/config-editor-php.html
@@ -2,7 +2,7 @@
<p>
Any changes you make here will simply be appended to <code>{{ file }}</code>. If you wish to make the most of Tinyboard's customizability, you can instead edit the file directly. This page is intended for making quick changes and for those who don't have a basic understanding of PHP code.
</p>
- {% if boards|count %}
+ {% if boards|length %}
<ul>
{% if board %}
<li><a href="?/config">Edit site-wide config</a></li>
diff --git a/templates/mod/config-editor.html b/templates/mod/config-editor.html
index 411d55e6..1c3436cd 100644
--- a/templates/mod/config-editor.html
+++ b/templates/mod/config-editor.html
@@ -1,7 +1,7 @@
<p>
Any changes you make here will simply be appended to <code>{{ file }}</code>. If you wish to make the most of Tinyboard's customizability, you can instead edit the file directly. This page is intended for making quick changes and for those who don't have a basic understanding of PHP code.
</p>
-{% if boards|count %}
+{% if boards|length %}
<ul>
{% if board %}
<li><a href="?/config">Edit site-wide config</a></li>
@@ -23,7 +23,7 @@
<th>{% trans 'Description' %}</th>
</tr>
{% for var in conf if var.type != 'array' %}
- {% if var.name|count == 1 %}
+ {% if var.name|length == 1 %}
{% set name = 'cf_' ~ var.name %}
{% else %}
{% set name = 'cf_' ~ var.name|join('/') %}
@@ -31,7 +31,7 @@
<tr>
<th class="minimal">
- {% if var.name|count == 1 %}
+ {% if var.name|length == 1 %}
{{ var.name }}
{% else %}
{{ var.name|join(' &rarr; ') }}
diff --git a/templates/mod/inbox.html b/templates/mod/inbox.html
index 97afe446..db0641e4 100644
--- a/templates/mod/inbox.html
+++ b/templates/mod/inbox.html
@@ -1,4 +1,4 @@
-{% if messages|count == 0 %}
+{% if messages|length == 0 %}
<p style="text-align:center" class="unimportant">({% trans 'No private messages for you.' %})</p>
{% else %}
<table class="modlog">
diff --git a/templates/mod/log.html b/templates/mod/log.html
index a38b4af5..bb1be89e 100644
--- a/templates/mod/log.html
+++ b/templates/mod/log.html
@@ -49,7 +49,7 @@
{% endfor %}
</table>
-{% if count > logs|count %}
+{% if count > logs|length %}
<p class="unimportant" style="text-align:center;word-wrap:break-word">
{% for i in range(0, (count - 1) / config.mod.modlog_page) %}
{% if public %}
diff --git a/templates/mod/merge.html b/templates/mod/merge.html
index 5f931d10..b1f4f928 100644
--- a/templates/mod/merge.html
+++ b/templates/mod/merge.html
@@ -15,7 +15,7 @@
<ul style="list-style:none;padding:0">
{% for targetboard in boards %}
<li>
- <input type="radio" name="board" value="{{ targetboard.uri }}" id="ban-board-{{ targetboard.uri }}" {% if boards|count == 2 %}checked{% endif %}>
+ <input type="radio" name="board" value="{{ targetboard.uri }}" id="ban-board-{{ targetboard.uri }}" {% if boards|length == 2 %}checked{% endif %}>
<label style="display:inline" for="ban-board-{{ targetboard.uri }}">
{{ config.board_abbreviation|sprintf(targetboard.uri) }} - {{ targetboard.title|e }}
</label>
diff --git a/templates/mod/move.html b/templates/mod/move.html
index 59bd60f6..3fcd8c89 100644
--- a/templates/mod/move.html
+++ b/templates/mod/move.html
@@ -24,7 +24,7 @@
<ul style="list-style:none;padding:0">
{% for targetboard in boards if targetboard.uri != board %}
<li>
- <input type="radio" name="board" value="{{ targetboard.uri }}" id="ban-board-{{ targetboard.uri }}" {% if boards|count == 2 %}checked{% endif %}>
+ <input type="radio" name="board" value="{{ targetboard.uri }}" id="ban-board-{{ targetboard.uri }}" {% if boards|length == 2 %}checked{% endif %}>
<label style="display:inline" for="ban-board-{{ targetboard.uri }}">
{{ config.board_abbreviation|sprintf(targetboard.uri) }} - {{ targetboard.title|e }}
</label>
diff --git a/templates/mod/move_reply.html b/templates/mod/move_reply.html
index bf7c2f75..4f878234 100644
--- a/templates/mod/move_reply.html
+++ b/templates/mod/move_reply.html
@@ -15,7 +15,7 @@
<ul style="list-style:none;padding:0">
{% for targetboard in boards %}
<li>
- <input type="radio" name="board" value="{{ targetboard.uri }}" id="ban-board-{{ targetboard.uri }}" {% if boards|count == 2 %}checked{% endif %}>
+ <input type="radio" name="board" value="{{ targetboard.uri }}" id="ban-board-{{ targetboard.uri }}" {% if boards|length == 2 %}checked{% endif %}>
<label style="display:inline" for="ban-board-{{ targetboard.uri }}">
{{ config.board_abbreviation|sprintf(targetboard.uri) }} - {{ targetboard.title|e }}
</label>
diff --git a/templates/mod/news.html b/templates/mod/news.html
index 57058291..07b2bb86 100644
--- a/templates/mod/news.html
+++ b/templates/mod/news.html
@@ -62,7 +62,7 @@
</div>
{% endfor %}
-{% if count > news|count %}
+{% if count > news|length %}
<p class="unimportant" style="text-align:center;word-wrap:break-word">
{% for i in range(0, (count - 1) / config.mod.news_page) %}
<a href="?/news/{{ i + 1 }}">[{{ i + 1 }}]</a>
diff --git a/templates/mod/noticeboard.html b/templates/mod/noticeboard.html
index fc2e0aef..1036b129 100644
--- a/templates/mod/noticeboard.html
+++ b/templates/mod/noticeboard.html
@@ -57,7 +57,7 @@
</div>
{% endfor %}
-{% if count > noticeboard|count %}
+{% if count > noticeboard|length %}
<p class="unimportant" style="text-align:center;word-wrap:break-word">
{% for i in range(0, (count - 1) / config.mod.noticeboard_page) %}
<a href="?/noticeboard/{{ i + 1 }}">[{{ i + 1 }}]</a>
diff --git a/templates/mod/recent_posts.html b/templates/mod/recent_posts.html
index 349dcea9..c226eebd 100644
--- a/templates/mod/recent_posts.html
+++ b/templates/mod/recent_posts.html
@@ -1,5 +1,5 @@
<script src="{{ config.additional_javascript_url }}js/mod/recent-posts.js"></script>
-{% if not posts|count %}
+{% if not posts|length %}
<p style="text-align:center" class="unimportant">({% trans 'There are no active posts.' %})</p>
{% else %}
<h4>Viewing last {{ limit|e }} posts</h4>
diff --git a/templates/mod/search_results.html b/templates/mod/search_results.html
index abaad703..989b3989 100644
--- a/templates/mod/search_results.html
+++ b/templates/mod/search_results.html
@@ -259,7 +259,7 @@
</table>
{% endif %}
-{% if result_count > results|count %}
+{% if result_count > results|length %}
<p class="unimportant" style="text-align:center;word-wrap:break-word">
{% for i in range(0, (result_count - 1) / config.mod.search_page) %}
<a href="?/search/{{ search_type }}/{{ search_query_escaped }}/{{ i + 1 }}">[{{ i + 1 }}]</a>
diff --git a/templates/mod/themes.html b/templates/mod/themes.html
index b230bc48..36fbec64 100644
--- a/templates/mod/themes.html
+++ b/templates/mod/themes.html
@@ -1,4 +1,4 @@
-{% if themes|count == 0 %}
+{% if themes|length == 0 %}
<p style="text-align:center" class="unimportant">({% trans 'There are no themes available.' %})</p>
{% else %}
<table class="modlog">
diff --git a/templates/mod/user.html b/templates/mod/user.html
index 08598fe5..f30f04fe 100644
--- a/templates/mod/user.html
+++ b/templates/mod/user.html
@@ -87,7 +87,7 @@
</ul>
</form>
-{% if logs|count > 0 %}
+{% if logs|length > 0 %}
<table class="modlog" style="width:600px">
<tr>
<th>{% trans 'IP address' %}</th>
diff --git a/templates/mod/view_ip.html b/templates/mod/view_ip.html
index 4bacc7f6..e2dbf14c 100644
--- a/templates/mod/view_ip.html
+++ b/templates/mod/view_ip.html
@@ -14,11 +14,11 @@
{% if mod|hasPermission(config.mod.view_notes) %}
<fieldset id="notes">
<legend>
- {% set notes_on_record = 'note' ~ (notes|count != 1 ? 's' : '') ~ ' on record' %}
- <legend>{{ notes|count }} {% trans notes_on_record %}</legend>
+ {% set notes_on_record = 'note' ~ (notes|length != 1 ? 's' : '') ~ ' on record' %}
+ <legend>{{ notes|length }} {% trans notes_on_record %}</legend>
</legend>
- {% if notes|count > 0 %}
+ {% if notes|length > 0 %}
<table class="modlog">
<tr>
<th>{% trans 'Staff' %}</th>
@@ -81,10 +81,10 @@
</fieldset>
{% endif %}
-{% if bans|count > 0 and mod|hasPermission(config.mod.view_ban) %}
+{% if bans|length > 0 and mod|hasPermission(config.mod.view_ban) %}
<fieldset id="bans">
- {% set bans_on_record = 'ban' ~ (bans|count != 1 ? 's' : '') ~ ' on record' %}
- <legend>{{ bans|count }} {% trans bans_on_record %}</legend>
+ {% set bans_on_record = 'ban' ~ (bans|length != 1 ? 's' : '') ~ ' on record' %}
+ <legend>{{ bans|length }} {% trans bans_on_record %}</legend>
{% for ban in bans %}
<form action="" method="post" style="text-align:center">
@@ -174,7 +174,7 @@
</fieldset>
{% endif %}
-{% if logs|count > 0 %}
+{% if logs|length > 0 %}
<fieldset id="history">
<legend>History</legend>
<table class="modlog" style="width:100%">