From dcf97d6b5b5715388412f18544c2e63f877ba19f Mon Sep 17 00:00:00 2001 From: Michael Foster Date: Sun, 18 Aug 2013 18:17:12 +1000 Subject: Add optional modifier: to tell Tinyboard that even though an image might have a thumbnail, it could still be a non-image upload --- templates/post_reply.html | 2 +- templates/post_thread.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'templates') diff --git a/templates/post_reply.html b/templates/post_reply.html index 65fd576c..bc3d36cd 100644 --- a/templates/post_reply.html +++ b/templates/post_reply.html @@ -91,7 +91,7 @@ )

- + + Date: Mon, 19 Aug 2013 02:03:54 +1000 Subject: Missing theme conf type "checkbox" --- inc/mod/pages.php | 5 ++++- templates/mod/theme_config.html | 19 ++++++++++++++----- 2 files changed, 18 insertions(+), 6 deletions(-) (limited to 'templates') diff --git a/inc/mod/pages.php b/inc/mod/pages.php index fe55b513..887be16b 100644 --- a/inc/mod/pages.php +++ b/inc/mod/pages.php @@ -2155,7 +2155,10 @@ function mod_theme_configure($theme_name) { $query = prepare("INSERT INTO ``theme_settings`` VALUES(:theme, :name, :value)"); $query->bindValue(':theme', $theme_name); $query->bindValue(':name', $conf['name']); - $query->bindValue(':value', $_POST[$conf['name']]); + if ($conf['type'] == 'checkbox') + $query->bindValue(':value', isset($_POST[$conf['name']]) ? 1 : 0); + else + $query->bindValue(':value', $_POST[$conf['name']]); $query->execute() or error(db_error($query)); } diff --git a/templates/mod/theme_config.html b/templates/mod/theme_config.html index 2dbb8397..d85b5df1 100644 --- a/templates/mod/theme_config.html +++ b/templates/mod/theme_config.html @@ -7,12 +7,21 @@ {{ conf.title }} - + {% else %} + {% endif %} - /> {% if conf.comment %} {{ conf.comment }} {% endif %} -- cgit v1.3 From f8837ad60cac5aa7ec1457819986822d14661681 Mon Sep 17 00:00:00 2001 From: ctrlcctrlv Date: Sun, 18 Aug 2013 16:26:54 +0000 Subject: Add option to update catalog on new posts as well as new threads --- templates/themes/catalog/info.php | 8 ++++++++ templates/themes/catalog/theme.php | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'templates') 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); } -- cgit v1.3