From d22814b2daa09799db3f723748fb0df1243cec99 Mon Sep 17 00:00:00 2001 From: nonmakina Date: Tue, 12 Jan 2021 14:21:32 -0600 Subject: [PATCH 1/5] 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) ) From 5f27a5a0504ee67641ad5e1b6e5ac94dc75938fc Mon Sep 17 00:00:00 2001 From: nonmakina Date: Sun, 17 Jan 2021 16:47:40 -0600 Subject: [PATCH 2/5] fixes breaking changes --- templates/themes/catalog/theme.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/themes/catalog/theme.php b/templates/themes/catalog/theme.php index e2275338..74257013 100644 --- a/templates/themes/catalog/theme.php +++ b/templates/themes/catalog/theme.php @@ -27,7 +27,7 @@ $b->build($settings, $board); } } - if($settings['has_overboard']) { + if(isset($settings['has_overboard'] && $settings['has_overboard']) { $board = $settings['overboard_location']; $action = generation_strategy("sb_catalog", array($board)); if ($action == 'delete') { From 9ec85e96c2052c7d7c23e6eb86bef80c764d9eba Mon Sep 17 00:00:00 2001 From: nonmakina Date: Sun, 17 Jan 2021 16:48:34 -0600 Subject: [PATCH 3/5] fixes breaking changes --- templates/themes/catalog/theme.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/themes/catalog/theme.php b/templates/themes/catalog/theme.php index 74257013..f4f86bd5 100644 --- a/templates/themes/catalog/theme.php +++ b/templates/themes/catalog/theme.php @@ -27,7 +27,7 @@ $b->build($settings, $board); } } - if(isset($settings['has_overboard'] && $settings['has_overboard']) { + if(isset($settings['has_overboard']) && $settings['has_overboard']) { $board = $settings['overboard_location']; $action = generation_strategy("sb_catalog", array($board)); if ($action == 'delete') { From fa4630e3540186bf4b583d42d154ce02c291e6ec Mon Sep 17 00:00:00 2001 From: nonmakina Date: Sun, 17 Jan 2021 16:57:28 -0600 Subject: [PATCH 4/5] Fixes board list on homepage --- templates/themes/categories/news.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/themes/categories/news.html b/templates/themes/categories/news.html index e0c1e4a6..2f78aed2 100644 --- a/templates/themes/categories/news.html +++ b/templates/themes/categories/news.html @@ -1,6 +1,6 @@ {% filter remove_whitespace %} -{{ boardlist.top }}
+ {{ boardlist.top }}

{{ settings.title }}

{{ settings.subtitle }}
From 470662f9bf1d78501c1f9bffc84f53e1c1c78ee9 Mon Sep 17 00:00:00 2001 From: nonmakina Date: Sun, 17 Jan 2021 17:08:09 -0600 Subject: [PATCH 5/5] Adds stylesheet to news.html template --- templates/themes/categories/news.html | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/themes/categories/news.html b/templates/themes/categories/news.html index 2f78aed2..e2591f09 100644 --- a/templates/themes/categories/news.html +++ b/templates/themes/categories/news.html @@ -4,6 +4,7 @@

{{ settings.title }}

{{ settings.subtitle }}
+