From 706a3422eb08f6396f23c867e957b812ba6ce7f3 Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Fri, 21 Jun 2013 20:25:12 +0200 Subject: [PATCH 1/2] Making news page the default homepage Addresses #232 --- public/include/pages/home.inc.php | 14 ++++++++++++-- public/include/pages/news.inc.php | 19 ------------------- public/templates/mmcFE/home/default.tpl | 8 +++++--- public/templates/mmcFE/news/default.tpl | 5 ----- 4 files changed, 17 insertions(+), 29 deletions(-) delete mode 100644 public/include/pages/news.inc.php delete mode 100644 public/templates/mmcFE/news/default.tpl diff --git a/public/include/pages/home.inc.php b/public/include/pages/home.inc.php index aecab054..38e1022d 100644 --- a/public/include/pages/home.inc.php +++ b/public/include/pages/home.inc.php @@ -1,9 +1,19 @@ getAllActive(); +foreach ($aNews as $key => $aData) { + // Transform Markdown content to HTML + $aNews[$key]['content'] = Markdown::defaultTransform($aData['content']); +} // Tempalte specifics +$smarty->assign("NEWS", $aNews); $smarty->assign("CONTENT", "default.tpl"); ?> diff --git a/public/include/pages/news.inc.php b/public/include/pages/news.inc.php deleted file mode 100644 index 38e1022d..00000000 --- a/public/include/pages/news.inc.php +++ /dev/null @@ -1,19 +0,0 @@ -getAllActive(); -foreach ($aNews as $key => $aData) { - // Transform Markdown content to HTML - $aNews[$key]['content'] = Markdown::defaultTransform($aData['content']); -} - -// Tempalte specifics -$smarty->assign("NEWS", $aNews); -$smarty->assign("CONTENT", "default.tpl"); -?> diff --git a/public/templates/mmcFE/home/default.tpl b/public/templates/mmcFE/home/default.tpl index 5e4f403f..a54859db 100644 --- a/public/templates/mmcFE/home/default.tpl +++ b/public/templates/mmcFE/home/default.tpl @@ -1,3 +1,5 @@ -{include file="global/block_header.tpl" BLOCK_HEADER="ThePool Collective"} -

Please head over to our pool page for more details. -{include file="global/block_footer.tpl"} +{section name=news loop=$NEWS} + {include file="global/block_header.tpl" BLOCK_HEADER="{$NEWS[news].header} posted {$NEWS[news].time} by {$NEWS[news].author}"} + {$NEWS[news].content} + {include file="global/block_footer.tpl"} +{/section} diff --git a/public/templates/mmcFE/news/default.tpl b/public/templates/mmcFE/news/default.tpl deleted file mode 100644 index a54859db..00000000 --- a/public/templates/mmcFE/news/default.tpl +++ /dev/null @@ -1,5 +0,0 @@ -{section name=news loop=$NEWS} - {include file="global/block_header.tpl" BLOCK_HEADER="{$NEWS[news].header} posted {$NEWS[news].time} by {$NEWS[news].author}"} - {$NEWS[news].content} - {include file="global/block_footer.tpl"} -{/section} From f39d9cca2d0b6fca321d81b8a3bb2e6d9cf81580 Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Fri, 21 Jun 2013 20:25:49 +0200 Subject: [PATCH 2/2] Removed News from navigation Fixes #232 --- public/templates/mmcFE/global/navigation.tpl | 1 - 1 file changed, 1 deletion(-) diff --git a/public/templates/mmcFE/global/navigation.tpl b/public/templates/mmcFE/global/navigation.tpl index f9a23f08..c53f61c7 100644 --- a/public/templates/mmcFE/global/navigation.tpl +++ b/public/templates/mmcFE/global/navigation.tpl @@ -15,7 +15,6 @@

{/if}