1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-27 17:00:52 +01:00

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 committed by Michael Foster
parent 9773416553
commit f8837ad60c
2 changed files with 9 additions and 1 deletions

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);
}