diff options
| author | Benjamin Southall <applemansigloo@gmail.com> | 2017-09-03 22:19:32 +0900 |
|---|---|---|
| committer | Benjamin Southall <applemansigloo@gmail.com> | 2017-09-03 22:19:32 +0900 |
| commit | 7f8c54249dea60f624e3f90b6c29adbd1207781b (patch) | |
| tree | 3cf14b57fbaa851a624a97606e7baf0c961118a3 /templates/themes/staffapplication/theme.php | |
| parent | 8211c01d84b580abcbb57c3012f39020f1522063 (diff) | |
Add staff application theme, calendar theme and ukko4 theme
Diffstat (limited to 'templates/themes/staffapplication/theme.php')
| -rw-r--r-- | templates/themes/staffapplication/theme.php | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/templates/themes/staffapplication/theme.php b/templates/themes/staffapplication/theme.php new file mode 100644 index 00000000..a827a7f8 --- /dev/null +++ b/templates/themes/staffapplication/theme.php @@ -0,0 +1,40 @@ +<?php + require 'info.php'; + + function staffapplication_build($action, $settings, $board) { + // Possible values for $action: + // - all (rebuild everything, initialization) + // - news (news has been updated) + // - boards (board list changed) + + StaffApplication::build($action, $settings); + } + + // Wrap functions in a class so they don't interfere with normal Tinyboard operations + class StaffApplication { + public static function build($action, $settings) { + global $config; + + if ($action == 'all' || $action == 'news') + file_write($config['dir']['home'] . $settings['file'], StaffApplication::htmlpage($settings)); + file_write($config['dir']['home'] . "staffapplication.php", StaffApplication::phppage($settings)); + } + + // Build staff application page + public static function htmlpage($settings) { + global $config; + + return Element('themes/staffapplication/staffapplication.html', Array( + 'settings' => $settings, + 'config' => $config, + 'boardlist' => createBoardlist() + )); + } + public static function phppage($settings) { + global $config; + $page = file_get_contents('templates/themes/staffapplication/staffapplicationpost.php'); + return $page; + } + }; + +?> |
