summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/post_form.html8
-rw-r--r--templates/post_reply.html2
-rw-r--r--templates/post_thread.html2
-rw-r--r--templates/posts.sql2
4 files changed, 10 insertions, 4 deletions
diff --git a/templates/post_form.html b/templates/post_form.html
index 30bf9224..1727250b 100644
--- a/templates/post_form.html
+++ b/templates/post_form.html
@@ -27,12 +27,18 @@
</td>
</tr>{% endif %}
<tr>
- <th>
+ {% if not (config.field_disable_subject or (id and config.field_disable_reply_subject)) or (mod and post.mod|hasPermission(config.mod.bypass_field_disable, board.uri)) %}<th>
{% trans %}Subject{% endtrans %}
{{ antibot.html() }}
</th>
<td>
<input style="float:left;" type="text" name="subject" size="25" maxlength="100" autocomplete="off">
+ {% else %}<th>
+ {% trans %}Submit{% endtrans %}
+ {{ antibot.html() }}
+ </th>
+ <td>
+ {% endif %}
<input accesskey="s" style="margin-left:2px;" type="submit" name="post" value="{% if id %}{{ config.button_reply }}{% else %}{{ config.button_newtopic }}{% endif %}" />{% if config.spoiler_images %} <input id="spoiler" name="spoiler" type="checkbox"> <label for="spoiler">{% trans %}Spoiler Image{% endtrans %}</label>{% endif %}
</td>
</tr>
diff --git a/templates/post_reply.html b/templates/post_reply.html
index f4a20f04..73ff2c15 100644
--- a/templates/post_reply.html
+++ b/templates/post_reply.html
@@ -63,7 +63,7 @@
, {{ post.ratio }}
{% endif %}
{% endif %}
- {% if config.show_filename %}
+ {% if config.show_filename and post.filename %}
,
{% if post.filename|length > config.max_filename_display %}
<span title="{{ post.filename }}">{{ post.filename|truncate(config.max_filename_display) }}</span>
diff --git a/templates/post_thread.html b/templates/post_thread.html
index 7d4194ba..04ce1b0d 100644
--- a/templates/post_thread.html
+++ b/templates/post_thread.html
@@ -20,7 +20,7 @@
, {{ post.ratio }}
{% endif %}
{% endif %}
- {% if config.show_filename %}
+ {% if config.show_filename and post.filename %}
,
{% if post.filename|length > config.max_filename_display %}
<span title="{{ post.filename }}">{{ post.filename|truncate(config.max_filename_display) }}</span>
diff --git a/templates/posts.sql b/templates/posts.sql
index d10749f8..c766d38e 100644
--- a/templates/posts.sql
+++ b/templates/posts.sql
@@ -26,7 +26,7 @@ CREATE TABLE IF NOT EXISTS `posts_{{ board }}` (
`sage` int(1) NOT NULL,
`embed` text,
UNIQUE KEY `id` (`id`),
- KEY `thread` (`thread`),
+ KEY `thread_id` (`thread`, `id`),
KEY `time` (`time`),
FULLTEXT KEY `body` (`body`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;