diff --git a/templates/themes/basic/index.html b/templates/themes/basic/index.html new file mode 100644 index 00000000..f0dc0304 --- /dev/null +++ b/templates/themes/basic/index.html @@ -0,0 +1,35 @@ +{% filter remove_whitespace %} + + +
+(No news to show.)
+ {% else %} + {% for entry in news %} +{{ entry.body }}
+ {% endfor %} + {% endif %} +Powered by Tinyboard {{ config.version }} | Tinyboard Copyright © 2010-2012 Tinyboard Development Group
+ + +{% endfilter %} diff --git a/templates/themes/basic/info.php b/templates/themes/basic/info.php index bd856655..0c5f0323 100644 --- a/templates/themes/basic/info.php +++ b/templates/themes/basic/info.php @@ -4,8 +4,8 @@ // Theme name $theme['name'] = 'Basic'; // Description (you can use Tinyboard markup here) - $theme['description'] = 'Extremely basic news listing for the homepage. It\'s suggested that you enable boardlinks for this theme.'; - $theme['version'] = 'v0.9'; + $theme['description'] = 'Extremely basic news listing for the homepage. Enabling boardlinks is recommended for this theme.'; + $theme['version'] = 'v0.9.1'; // Theme configuration $theme['config'] = Array(); @@ -24,4 +24,4 @@ // Unique function name for building everything $theme['build_function'] = 'basic_build'; -?> \ No newline at end of file +?> diff --git a/templates/themes/basic/theme.php b/templates/themes/basic/theme.php index 2513754a..8dba89cc 100644 --- a/templates/themes/basic/theme.php +++ b/templates/themes/basic/theme.php @@ -23,45 +23,15 @@ public static function homepage($settings) { global $config; - // HTML5 - $body = '' - . '' - . '' - . '(No news to show.)
'; - } else { - // List news - while($news = $query->fetch()) { - $body .= '' . $news['body'] . '
'; - } - } + $news = $query->fetchAll(PDO::FETCH_ASSOC); - $body .= 'Powered by Tinyboard'; + return Element('themes/basic/index.html', Array( + 'settings' => $settings, + 'config' => $config, + 'boardlist' => createBoardlist(), + 'news' => $news + )); return $body; }