From a124189630b2d57c1620f3e9685ffc94a346051a Mon Sep 17 00:00:00 2001 From: www-data Date: Thu, 8 Oct 2015 02:27:10 +0100 Subject: [PATCH] Repurpose recent theme for homepage --- templates/themes/categories-uboachan/info.php | 42 +++++ templates/themes/categories-uboachan/theme.php | 223 +++++++++++++++++++++++++ templates/themes/categories-uboachan/thumb.png | Bin 0 -> 9965 bytes templates/themes/recent/recent.css | 154 +++++++++++++++-- templates/themes/recent/recent.html | 39 +++-- 5 files changed, 427 insertions(+), 31 deletions(-) create mode 100644 templates/themes/categories-uboachan/info.php create mode 100644 templates/themes/categories-uboachan/theme.php create mode 100644 templates/themes/categories-uboachan/thumb.png diff --git a/templates/themes/categories-uboachan/info.php b/templates/themes/categories-uboachan/info.php new file mode 100644 index 00000000..3ef9871f --- /dev/null +++ b/templates/themes/categories-uboachan/info.php @@ -0,0 +1,42 @@ + 'Title', + 'name' => 'title', + 'type' => 'text' + ); + + $theme['config'][] = Array( + 'title' => 'Slogan', + 'name' => 'subtitle', + 'type' => 'text' + ); + + // Unique function name for building everything + $theme['build_function'] = 'categories_build'; + + $theme['install_callback'] = 'categories_install'; + if(!function_exists('categories_install')) { + function categories_install($settings) { + global $config; + + if(!isset($config['boards']) || !isset($config['categories'])) { + return Array(false, '

Prerequisites not met!

' . + 'This theme requires $config[\'boards\'] and $config[\'categories\'] to be set.'); + } + } + } +?> diff --git a/templates/themes/categories-uboachan/theme.php b/templates/themes/categories-uboachan/theme.php new file mode 100644 index 00000000..296e0d06 --- /dev/null +++ b/templates/themes/categories-uboachan/theme.php @@ -0,0 +1,223 @@ +' + . '' + . '' + . '' + . '' + . '' . $settings['title'] . '' + . '' + . '' + . '' + . '' + // Sidebar + . '' + // Main + . '' + // Finish page + . ''; + } + + // Build news page + public static function news($settings) { + global $config, $board; + + // HTML5 + $body = '' + . '' + . '' + . '' + . '' + . '' + . '' . $settings['title'] . ' - News' + . ''; + + $boardlist = createBoardlist(); + + $body .= $boardlist['top'] + . '
'; + + $boards = listBoards(); + + $body .= '
Don\'t touch the lights!
'; + // Recent Posts + + $body .= '
Recent Posts
'; + + $query = ''; + foreach($boards as &$_board) { + // Block Board + if ($_board['uri'] != "aurora") { + $query .= sprintf("SELECT *, '%s' AS `board` FROM `posts_%s` UNION ALL ", $_board['uri'], $_board['uri']); + } + } + $query = preg_replace('/UNION ALL $/', 'ORDER BY `time` DESC LIMIT 15', $query); + $query = query($query) or error(db_error()); + + while($post = $query->fetch()) { + openBoard($post['board']); + + $body .= '' . $board['name'] . ': '; + $snip = pm_snippet($post['body'], 95); + if($snip === "") + { + $body .= '<empty>'; + } + else + { + $body .= $snip; + } + $body .= '
'; + } + + // News + + $body .= '
'; + + $query = query("SELECT * FROM `news` ORDER BY `time` DESC LIMIT 5") or error(db_error()); + if($query->rowCount() == 0) { + $body .= '

(No news to show.)

'; + } else { + // List news + while($news = $query->fetch()) { + $body .= '
' . + // Newer than 5 days? + (time() - $news['time'] <= 432000 ? + '*NEW* ' + : + '' + ) . + ($news['subject'] ? + $news['subject'] + : + 'no subject' + ) . + ' — by ' . + $news['name'] . + ' at ' . + strftime($config['post_date'], $news['time']) . + '
' . + $news['body'] . + '
'; + } + } + + // Finish page + $body .= '
'; + $body .= '
'; + + return $body; + } + + // Build sidebar + public static function sidebar($settings) { + global $config, $board; + + $body = '' + . '' + . '' + . '' + . '' + . '' + . '' + . '' + . '' . $settings['title'] . '' + . ''; + + $body .= '
' . $settings['title'] . '
'; + + for($cat = 0; $cat < count($config['categories']); $cat++) { + $body .= '
' . $config['categories'][$cat] . '
'; + } + + foreach($config['custom_categories'] as $name => &$group) { + $body .= '
' . $name . '
'; + } + + // Finish page + $body .= ''; + + return $body; + } + }; + +?> diff --git a/templates/themes/categories-uboachan/thumb.png b/templates/themes/categories-uboachan/thumb.png new file mode 100644 index 0000000000000000000000000000000000000000..35d747e2a138d7e0bf999ef0de942c94586be2b2 GIT binary patch literal 9965 zcmVPx#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01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pour out the Soykaf, lurk, and read the rules before posting!
+ +
+ +

Recent Images

    @@ -55,13 +65,12 @@
- -
+