From f9f776a0156a24329c26d61e3edb44c5c1ef7ad6 Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Sat, 29 Jun 2013 15:26:16 +0200 Subject: [PATCH] Display newspage on Mobile if not authed * Do not show dashboard if user is not logged in * Show news on Mobile and Desktop by default * Show Dasboard on mobile once logged in * Make News Navbar item default for unauthed users on mobile * Add Dash Navbar item for authed users on mobile --- public/include/pages/home.inc.php | 6 +++--- public/templates/mobile/global/navigation.tpl | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/public/include/pages/home.inc.php b/public/include/pages/home.inc.php index ffd08520..ac846304 100644 --- a/public/include/pages/home.inc.php +++ b/public/include/pages/home.inc.php @@ -13,17 +13,17 @@ foreach ($aNews as $key => $aData) { $aNews[$key]['content'] = Markdown::defaultTransform($aData['content']); } -// Load news entries in case news is the homepage +// Load news entries for Desktop site and unauthenticated users $smarty->assign("NEWS", $aNews); // Tempalte specifics -if ($detect->isMobile()) { +if ($detect->isMobile() && $_SESSION['AUTHENTICATED'] == true) { if ($config['payout_system'] == 'pps') { $smarty->assign("CONTENT", "pps.tpl"); } else { $smarty->assign("CONTENT", "default.tpl"); } } else { - $smarty->assign("CONTENT", "default.tpl"); + $smarty->assign("CONTENT", "../news/default.tpl"); } ?> diff --git a/public/templates/mobile/global/navigation.tpl b/public/templates/mobile/global/navigation.tpl index 92785791..4fd17134 100644 --- a/public/templates/mobile/global/navigation.tpl +++ b/public/templates/mobile/global/navigation.tpl @@ -1,11 +1,12 @@