From 9a014e855741405ad2f33047f6a27d83736dd7da Mon Sep 17 00:00:00 2001 From: Zankaria Date: Wed, 3 Apr 2024 16:11:54 +0200 Subject: [PATCH 1/5] template.php: fix deprecated string interning syntax --- inc/template.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/template.php b/inc/template.php index 0362111c..fb75aaf6 100644 --- a/inc/template.php +++ b/inc/template.php @@ -58,7 +58,7 @@ function Element($templateFile, array $options) { } // Read the template file - if (@file_get_contents("{$config['dir']['template']}/${templateFile}")) { + if (@file_get_contents("{$config['dir']['template']}/{$templateFile}")) { $body = $twig->render($templateFile, $options); if ($config['minify_html'] && preg_match('/\.html$/', $templateFile)) { @@ -67,7 +67,7 @@ function Element($templateFile, array $options) { return $body; } else { - throw new Exception("Template file '${templateFile}' does not exist or is empty in '{$config['dir']['template']}'!"); + throw new Exception("Template file '{$templateFile}' does not exist or is empty in '{$config['dir']['template']}'!"); } } From 7479360aad2764eaf34d2dd4399535b70bebb718 Mon Sep 17 00:00:00 2001 From: Zankaria Date: Wed, 3 Apr 2024 17:18:52 +0200 Subject: [PATCH 2/5] catalog.html: format template --- templates/themes/catalog/catalog.html | 68 +++++++++++++-------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/templates/themes/catalog/catalog.html b/templates/themes/catalog/catalog.html index 34202907..de7d1461 100644 --- a/templates/themes/catalog/catalog.html +++ b/templates/themes/catalog/catalog.html @@ -19,24 +19,24 @@ - {% trans 'Sort by' %}: - - - {% trans 'Image size' %}: - -
-
- {% for post in recent_posts %} -
{% trans 'Sort by' %}: + + + {% trans 'Image size' %}: + +
+
+ {% for post in recent_posts %} +
-
- +
+ {% if post.youtube %} - - -
- R: {{ post.reply_count }} / I: {{ post.image_count }}{% if post.sticky %} (sticky){% endif %} - {% if post.subject %} + 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.reply_count }} / I: {{ post.image_count }}{% if post.sticky %} (sticky){% endif %} + {% if post.subject %}

{{ post.subject|e }} @@ -66,13 +66,13 @@ {% endif %} {{ post.body }} -

-
-
- {% endfor %} -
-
- +
+
+
+ {% endfor %} +
+
+
{% include 'footer.html' %}