diff options
| author | Benjamin Southall <applemansigloo@gmail.com> | 2016-12-19 08:47:30 +0900 |
|---|---|---|
| committer | Benjamin Southall <applemansigloo@gmail.com> | 2016-12-19 08:47:30 +0900 |
| commit | 3818830da59ed821c1cf73fecec644edbfaccaa9 (patch) | |
| tree | 302cb44524d400cf9e098875012bd3a510a77c93 /templates/themes/faq/theme.php | |
| parent | 3408907d7fd295fa461dd4f731554bd027118e30 (diff) | |
Added FAQ theme
Diffstat (limited to 'templates/themes/faq/theme.php')
| -rw-r--r-- | templates/themes/faq/theme.php | 33 |
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(), + )); + } + }; + +?> |
