Conflicts:
	install.php
This commit is contained in:
czaks
2013-08-18 13:16:31 -04:00
11 changed files with 60 additions and 28 deletions

View File

@@ -7,12 +7,21 @@
<tr>
<th>{{ conf.title }}</th>
<td>
<input type="text" name="{{ conf.name }}"
{% if settings[conf.name] %}value="{{ settings[conf.name] }}"{% else %}{% if conf.default %}value="{{ conf.default }}"{% endif %}{% endif %}
{% if conf.size %}
size="{{ conf.size }}"
{% if conf.type == 'checkbox' %}
<input type="checkbox" name="{{ conf.name }}"
{% if settings[conf.name] or (not settings[conf.name] is defined and conf.default) %}
checked
{% endif %}>
{% else %}
<input type="text" name="{{ conf.name }}"
{% if settings[conf.name] %}
value="{{ settings[conf.name] }}"
{% else %}
{% if conf.default %}value="{{ conf.default }}"{% endif %}{% endif %}
{% if conf.size %}
size="{{ conf.size }}"
{% endif %}>
{% endif %}
/>
{% if conf.comment %}
<span class="unimportant">{{ conf.comment }}</span>
{% endif %}

View File

@@ -91,7 +91,7 @@
)
</span>
</p>
<a href="{{ config.uri_img }}{{ post.file }}" target="_blank"{% if post.thumb == 'file' %} class="file"{% endif %}>
<a href="{{ config.uri_img }}{{ post.file }}" target="_blank"{% if post.thumb == 'file' or post.modifiers['is_file'] == '1' %} class="file"{% endif %}>
<img class="post-image" src="
{% if post.thumb == 'file' %}
{{ config.root }}

View File

@@ -41,7 +41,7 @@
{% endif %}
)
</span></p>
<a href="{{ config.uri_img }}{{ post.file }}" target="_blank"{% if post.thumb == 'file' %} class="file"{% endif %}>
<a href="{{ config.uri_img }}{{ post.file }}" target="_blank"{% if post.thumb == 'file' or post.modifiers['is_file'] == '1' %} class="file"{% endif %}>
<img class="post-image" src="
{% if post.thumb == 'file' %}
{{ config.root }}

View File

@@ -10,10 +10,10 @@ CREATE TABLE IF NOT EXISTS ``posts_{{ board }}`` (
`body_nomarkup` text,
`time` int(11) NOT NULL,
`bump` int(11) DEFAULT NULL,
`thumb` varchar(50) DEFAULT NULL,
`thumb` varchar(255) DEFAULT NULL,
`thumbwidth` int(11) DEFAULT NULL,
`thumbheight` int(11) DEFAULT NULL,
`file` varchar(50) DEFAULT NULL,
`file` varchar(255) DEFAULT NULL,
`filewidth` int(11) DEFAULT NULL,
`fileheight` int(11) DEFAULT NULL,
`filesize` int(11) DEFAULT NULL,

View File

@@ -38,5 +38,13 @@
'comment' => '(eg. "catalog.css")'
);
$theme['config'][] = Array(
'title' => 'Update on new posts',
'name' => 'update_on_posts',
'type' => 'checkbox',
'default' => false,
'comment' => 'Without this checked, the catalog only updates on new threads.'
);
// Unique function name for building everything
$theme['build_function'] = 'catalog_build';

View File

@@ -20,7 +20,7 @@
$b = new Catalog();
$b->build($settings, $board);
}
} elseif ($action == 'post-thread' && in_array($board, $boards)) {
} elseif ($action == 'post-thread' || ($settings['update_on_posts'] && $action == 'post') && in_array($board, $boards)) {
$b = new Catalog();
$b->build($settings, $board);
}