summaryrefslogtreecommitdiff
path: root/templates/themes/stream/theme.php
blob: 6d11a0dc674bc7cca9ddc3723a9349631bd04e65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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(),
			));
		}
	};
	
?>