Add option to update catalog on new posts as well as new threads

This commit is contained in:
ctrlcctrlv 2013-08-18 16:26:54 +00:00
parent 946c49ac5a
commit 80ade5da1f
2 changed files with 9 additions and 1 deletions

View File

@ -38,5 +38,13 @@
'comment' => '(eg. "catalog.css")' '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 // Unique function name for building everything
$theme['build_function'] = 'catalog_build'; $theme['build_function'] = 'catalog_build';

View File

@ -20,7 +20,7 @@
$b = new Catalog(); $b = new Catalog();
$b->build($settings, $board); $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 = new Catalog();
$b->build($settings, $board); $b->build($settings, $board);
} }