From d22814b2daa09799db3f723748fb0df1243cec99 Mon Sep 17 00:00:00 2001 From: nonmakina Date: Tue, 12 Jan 2021 14:21:32 -0600 Subject: [PATCH] adds news to front page --- templates/themes/categories/theme.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/themes/categories/theme.php b/templates/themes/categories/theme.php index 14072bcc..650f4e6c 100644 --- a/templates/themes/categories/theme.php +++ b/templates/themes/categories/theme.php @@ -28,13 +28,15 @@ // Build homepage public static function homepage($settings) { global $config; - + $query = query("SELECT * FROM ``news`` ORDER BY `time` DESC") or error(db_error()); + $news = $query->fetchAll(PDO::FETCH_ASSOC); return Element( 'themes/categories/frames.html', Array( 'config' => $config, 'settings' => $settings, 'categories' => Categories::getCategories($config), + 'news' => $news, 'boardlist' => createBoardlist(false) )