From f453fa1ee3498433476031bbb2b8b9bedde83947 Mon Sep 17 00:00:00 2001 From: Benjamin Southall Date: Tue, 25 Apr 2017 00:49:34 +0900 Subject: Add aditional overboard themes that are similar to ukko but only include certain boards instead of excluding certain boards. In order for them to work ['overboards'] needs to be configured correctly. --- templates/themes/ukko2/info.php | 55 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 templates/themes/ukko2/info.php (limited to 'templates/themes/ukko2/info.php') diff --git a/templates/themes/ukko2/info.php b/templates/themes/ukko2/info.php new file mode 100644 index 00000000..f7094697 --- /dev/null +++ b/templates/themes/ukko2/info.php @@ -0,0 +1,55 @@ + 'Board name', + 'name' => 'title', + 'type' => 'text', + 'default' => 'Ukko' + ); + $theme['config'][] = array( + 'title' => 'Board URI', + 'name' => 'uri', + 'type' => 'text', + 'default' => '*', + 'comment' => '(ukko for example)' + ); + $theme['config'][] = array( + 'title' => 'Subtitle', + 'name' => 'subtitle', + 'type' => 'text', + 'comment' => '(%s = thread limit. for example "%s freshly bumped threads")' + ); + $theme['config'][] = array( + 'title' => 'included boards', + 'name' => 'include', + 'type' => 'text', + 'comment' => '(space seperated)' + ); + $theme['config'][] = array( + 'title' => 'Number of threads', + 'name' => 'thread_limit', + 'type' => 'text', + 'default' => '15', + ); + // Unique function name for building everything + $theme['build_function'] = 'ukko2_build'; + $theme['install_callback'] = 'ukko2_install'; + + if(!function_exists('ukko2_install')) { + function ukko2_install($settings) { + if (!file_exists($settings['uri'])) + @mkdir($settings['uri'], 0777) or error("Couldn't create " . $settings['uri'] . ". Check permissions.", true); + file_write($settings['uri'] . '/ukko.js', Element('themes/ukko/ukko.js', array())); + } + } + -- cgit v1.3