summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorctrlcctrlv <wizardchan@hush.com>2013-08-18 16:26:54 +0000
committerMichael Foster <savetheinternet@tinyboard.org>2013-08-19 03:08:02 +1000
commitf8837ad60cac5aa7ec1457819986822d14661681 (patch)
tree5b7de2b57506bd8969979f9a90fad6d0877ab1b2
parent977341655378c03a47a0869b32202506d0fb4088 (diff)
Add option to update catalog on new posts as well as new threads
-rw-r--r--templates/themes/catalog/info.php8
-rw-r--r--templates/themes/catalog/theme.php2
2 files changed, 9 insertions, 1 deletions
diff --git a/templates/themes/catalog/info.php b/templates/themes/catalog/info.php
index 1b9831ae..c68c9e09 100644
--- a/templates/themes/catalog/info.php
+++ b/templates/themes/catalog/info.php
@@ -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';
diff --git a/templates/themes/catalog/theme.php b/templates/themes/catalog/theme.php
index 4e2d40db..96550683 100644
--- a/templates/themes/catalog/theme.php
+++ b/templates/themes/catalog/theme.php
@@ -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);
}