From 459f442b5764497e30dcf6c00394addc052420f2 Mon Sep 17 00:00:00 2001 From: Savetheinternet Date: Wed, 13 Apr 2011 23:47:47 +1000 Subject: Some sort of theme/homepage start --- templates/homepage/frameset/theme.php | 89 +++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 templates/homepage/frameset/theme.php (limited to 'templates/homepage/frameset/theme.php') diff --git a/templates/homepage/frameset/theme.php b/templates/homepage/frameset/theme.php new file mode 100644 index 00000000..3964a469 --- /dev/null +++ b/templates/homepage/frameset/theme.php @@ -0,0 +1,89 @@ + 'Page title', + 'name' => 'title', + 'type' => 'text' + ); + + // Unique function name for building everything + $config['build_function'] = 'frameset_build'; + + function frameset_build($settings) { + Frameset::build($settings); + } + + // Wrap functions in a class so they don't interfere with normal Tinyboard operations + class Frameset { + public static function build($settings) { + global $config; + + file_put_contents($config['dir']['home'] . $config['file_index'], Frameset::homepage($settings)); + file_put_contents($config['dir']['home'] . 'sidebar.html', Frameset::sidebar($settings)); + } + + // Build homepage + public static function homepage($settings) { + global $config; + + // HTML5 + return '' + . '' + . '' + . '' + . '' . $settings['title'] . '' + . '' + // Sidebar + . '' + // Main + . '' + // Finish page + . ''; + } + + // Build sidebar + public static function sidebar($settings) { + global $config, $board; + + $body = '' + . '' + . '' + . '' + . '' . $settings['title'] . '' + . '

Boards

' + // Finish page + . ''; + + return $body; + } + }; + +?> \ No newline at end of file -- cgit v1.3