summaryrefslogtreecommitdiff
path: root/templates/themes/faq/theme.php
diff options
context:
space:
mode:
Diffstat (limited to 'templates/themes/faq/theme.php')
-rw-r--r--templates/themes/faq/theme.php33
1 files changed, 33 insertions, 0 deletions
diff --git a/templates/themes/faq/theme.php b/templates/themes/faq/theme.php
new file mode 100644
index 00000000..28db35a2
--- /dev/null
+++ b/templates/themes/faq/theme.php
@@ -0,0 +1,33 @@
+<?php
+ require 'info.php';
+
+ function faq_build($action, $settings, $board) {
+ // Possible values for $action:
+ // - all (rebuild everything, initialization)
+ // - news (news has been updated)
+ // - boards (board list changed)
+
+ FAQ::build($action, $settings);
+ }
+
+ // Wrap functions in a class so they don't interfere with normal Tinyboard operations
+ class FAQ {
+ public static function build($action, $settings) {
+ global $config;
+
+ if ($action == 'all' || $action == 'news')
+ file_write($config['dir']['home'] . $settings['file'], FAQ::homepage($settings));
+ }
+
+ // Build FAQ page
+ public static function homepage($settings) {
+ global $config;
+ return Element('themes/faq/index.html', Array(
+ 'settings' => $settings,
+ 'config' => $config,
+ 'boardlist' => createBoardlist(),
+ ));
+ }
+ };
+
+?>