From c483e1258cb5d168812a6e509e982a172f6c36c6 Mon Sep 17 00:00:00 2001 From: copypaste Date: Sun, 27 Apr 2014 15:48:47 +0200 Subject: multiimage posting --- templates/main.js | 1 + templates/post/fileinfo.html | 38 ++++++++++++++++++++++++++++++++++++++ templates/post_reply.html | 34 ++-------------------------------- templates/post_thread.html | 34 ++-------------------------------- templates/posts.sql | 12 +++--------- templates/themes/catalog/theme.php | 5 ++++- templates/themes/recent/theme.php | 12 ++++++++---- templates/themes/ukko/theme.php | 4 ++-- 8 files changed, 60 insertions(+), 80 deletions(-) create mode 100644 templates/post/fileinfo.html (limited to 'templates') diff --git a/templates/main.js b/templates/main.js index 7796565c..953d8849 100644 --- a/templates/main.js +++ b/templates/main.js @@ -291,6 +291,7 @@ function ready() { {% endraw %} var post_date = "{{ config.post_date }}"; +var max_images = {{ config.max_images }}; onready(init); diff --git a/templates/post/fileinfo.html b/templates/post/fileinfo.html new file mode 100644 index 00000000..2136169b --- /dev/null +++ b/templates/post/fileinfo.html @@ -0,0 +1,38 @@ + {% if post.embed %} + {{ post.embed }} + {% else %} +
+ {% for file in post.files %} +
+ {% if file.file == 'deleted' %} + + {% else %} +

File: {{ file.file }} + ( + {% if file.thumb == 'spoiler' %} + {% trans %}Spoiler Image{% endtrans %}, + {% endif %} + {{ file.size|filesize }} + {% if file.width and file.height %} + , {{ file.width}}x{{ file.height }} + {% if config.show_ratio %} + , {{ ratio(file.width, file.height) }} + {% endif %} + {% endif %} + {% if config.show_filename and file.filename %} + , + {% if file.filename|length > config.max_filename_display %} + {{ file.filename|truncate(config.max_filename_display)|bidi_cleanup }} + {% else %} + {{ file.filename|e|bidi_cleanup }} + {% endif %} + {% endif %} + {% include "post/image_identification.html" %} + ) +

+ {% include "post/image.html" with {'post':file} %} + {% endif %} +
+ {% endfor %} +
+ {% endif %} diff --git a/templates/post_reply.html b/templates/post_reply.html index 90ac5065..3d860872 100644 --- a/templates/post_reply.html +++ b/templates/post_reply.html @@ -1,7 +1,6 @@ {% filter remove_whitespace %} {# tabs and new lines will be ignored #}
-

- {% if post.embed %} - {{ post.embed }} - {% elseif post.file == 'deleted' %} - - {% elseif post.file and post.file %} -

File: {{ post.file }} - ( - {% if post.thumb == 'spoiler' %} - {% trans %}Spoiler Image{% endtrans %}, - {% endif %} - {{ post.filesize|filesize }} - {% if post.filewidth and post.fileheight %} - , {{ post.filewidth}}x{{ post.fileheight }} - {% if config.show_ratio %} - , {{ post.ratio }} - {% endif %} - {% endif %} - {% if config.show_filename and post.filename %} - , - {% if post.filename|length > config.max_filename_display %} - {{ post.filename|truncate(config.max_filename_display)|bidi_cleanup }} - {% else %} - {{ post.filename|e|bidi_cleanup }} - {% endif %} - {% endif %} - {% include "post/image_identification.html" %} - ) -

- {% include "post/image.html" %} - {% endif %} + {% include 'post/fileinfo.html' %} {{ post.postControls }} -
+
1 %}style="clear:both"{% endif %}> {% endfilter %}{% if index %}{{ post.body|truncate_body(post.link) }}{% else %}{{ post.body }}{% endif %}{% filter remove_whitespace %} {% if post.modifiers['ban message'] %} {{ config.mod.ban_message|sprintf(post.modifiers['ban message']) }} diff --git a/templates/post_thread.html b/templates/post_thread.html index f74427e4..a5bf8e08 100644 --- a/templates/post_thread.html +++ b/templates/post_thread.html @@ -2,38 +2,8 @@ {# tabs and new lines will be ignored #}
- -{% if post.embed %} - {{ post.embed }} -{% elseif post.file == 'deleted' %} - -{% elseif post.file and post.file %} -

{% trans %}File:{% endtrans %} {{ post.file }} - ( - {% if post.thumb == 'spoiler' %} - {% trans %}Spoiler Image{% endtrans %}, - {% endif %} - {{ post.filesize|filesize }} - {% if post.filewidth and post.fileheight %} - , {{ post.filewidth}}x{{ post.fileheight }} - {% if config.show_ratio %} - , {{ post.ratio }} - {% endif %} - {% endif %} - {% if config.show_filename and post.filename %} - , - {% if post.filename|length > config.max_filename_display %} - {{ post.filename|truncate(config.max_filename_display)|bidi_cleanup }} - {% else %} - {{ post.filename|e|bidi_cleanup }} - {% endif %} - {% endif %} - {% include "post/image_identification.html" %} - ) -

- {% include "post/image.html" %} -{% endif %} -

+{% include 'post/fileinfo.html' %} +

1%}style='clear:both'{%endif%}>