summaryrefslogtreecommitdiff
path: root/templates/themes/basic/info.php
diff options
context:
space:
mode:
authorMichael Save <savetheinternet@tinyboard.org>2012-02-08 19:20:08 +1100
committerMichael Save <savetheinternet@tinyboard.org>2012-02-08 19:20:08 +1100
commit5c847c75ac9e39a386e0cd4a55164e03091b5cdd (patch)
treea196441ae5d041d469a4a7bc3f4bdcc0a59a075e /templates/themes/basic/info.php
parent658a7b43791921a06132ad5db8beacb33a6ef5dc (diff)
"# of recent entries" setting adding to basic theme
Diffstat (limited to 'templates/themes/basic/info.php')
-rw-r--r--templates/themes/basic/info.php32
1 files changed, 29 insertions, 3 deletions
diff --git a/templates/themes/basic/info.php b/templates/themes/basic/info.php
index 0c5f0323..d29a834a 100644
--- a/templates/themes/basic/info.php
+++ b/templates/themes/basic/info.php
@@ -11,7 +11,7 @@
$theme['config'] = Array();
$theme['config'][] = Array(
- 'title' => 'Title',
+ 'title' => 'Site title',
'name' => 'title',
'type' => 'text'
);
@@ -19,9 +19,35 @@
$theme['config'][] = Array(
'title' => 'Slogan',
'name' => 'subtitle',
- 'type' => 'text'
+ 'type' => 'text',
+ 'comment' => '(optional)'
+ );
+
+ $theme['config'][] = Array(
+ 'title' => 'File',
+ 'name' => 'file',
+ 'type' => 'text',
+ 'default' => $config['file_index'],
+ 'comment' => '(eg. "index.html")'
+ );
+
+ $theme['config'][] = Array(
+ 'title' => '# of recent entries',
+ 'name' => 'no_recent',
+ 'type' => 'text',
+ 'default' => 0,
+ 'size' => 3,
+ 'comment' => '(number of recent news entries to display; "0" is infinite)'
);
// Unique function name for building everything
$theme['build_function'] = 'basic_build';
-?>
+ $theme['install_callback'] = 'build_install';
+
+ if(!function_exists('build_install')) {
+ function build_install($settings) {
+ if(!is_numeric($settings['no_recent']) || $settings['no_recent'] < 0)
+ return Array(false, '<strong>' . $settings['no_recent'] . '</strong> is not a non-negative integer.');
+ }
+ }
+