diff options
| author | Appleman1234 <applemansigloo@gmail.com> | 2016-12-15 18:25:42 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-12-15 18:25:42 +0900 |
| commit | cae526e65a20f3da2d8884c4d8e8978c54120000 (patch) | |
| tree | 2954153dd49f616f5018490058ff4bfbd17300d3 /templates/themes/stream/theme.php | |
| parent | b58fab98147a92c8e6d22f15d23684508b6bb811 (diff) | |
| parent | 5feae402cb55d49963bfd2c6f5a33d10690ecbc1 (diff) | |
Merge pull request #79 from lainchan/clean_prod_vichan_update
Merge vichan changes from upstream and changes directly applied to the site.
Diffstat (limited to 'templates/themes/stream/theme.php')
| -rw-r--r-- | templates/themes/stream/theme.php | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/templates/themes/stream/theme.php b/templates/themes/stream/theme.php new file mode 100644 index 00000000..6d11a0dc --- /dev/null +++ b/templates/themes/stream/theme.php @@ -0,0 +1,34 @@ +<?php + require 'info.php'; + + function stream_build($action, $settings, $board) { + // Possible values for $action: + // - all (rebuild everything, initialization) + // - boards (board list changed) + + Stream::build($action, $settings); + } + + // Wrap functions in a class so they don't interfere with normal Tinyboard operations + class Stream { + public static function build($action, $settings) { + global $config; + + if ($action == 'all' ) + file_write($config['dir']['home'] . $settings['file'], Stream::homepage($settings)); + } + + // Build news page + public static function homepage($settings) { + global $config; + + + return Element('themes/stream/stream.html', Array( + 'settings' => $settings, + 'config' => $config, + 'boardlist' => createBoardlist(), + )); + } + }; + +?> |
