From f6242f2c740b74c8c5a2d7db01b4943d9699a23a Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Sat, 29 Jun 2013 21:26:58 +0200 Subject: [PATCH] Adding swipable sidebar * Login to mobile version to enable sidebar * Swipe right to display your old dashboard * Modified `home.inc.php` to default to news at all times again * Modified sidebar implementation to change via config setting * Modified mobile navigation bar and header * Added `sidebar_prop.tpl` file for both themes Some breaking changes might be introduced here if you are running your own template implementation. Please ensure that `home/default.tpl` will display the news posts. `sidebar.tpl` is now `sidebar_prop.tpl`. If the files are missing you will get a PHP error. Check your logs what file is missing and create them from my original samples. Fixes #283 --- public/include/pages/home.inc.php | 12 +--- .../global/{sidebar.tpl => sidebar_prop.tpl} | 0 public/templates/mmcFE/master.tpl | 7 +-- public/templates/mmcFE/news/default.tpl | 5 -- public/templates/mobile/global/navigation.tpl | 8 ++- .../{home/pps.tpl => global/sidebar_pps.tpl} | 16 ++--- .../templates/mobile/global/sidebar_prop.tpl | 54 +++++++++++++++++ public/templates/mobile/home/default.tpl | 59 +++---------------- public/templates/mobile/master.tpl | 30 +++++++++- public/templates/mobile/news/default.tpl | 8 --- 10 files changed, 107 insertions(+), 92 deletions(-) rename public/templates/mmcFE/global/{sidebar.tpl => sidebar_prop.tpl} (100%) delete mode 100644 public/templates/mmcFE/news/default.tpl rename public/templates/mobile/{home/pps.tpl => global/sidebar_pps.tpl} (71%) create mode 100644 public/templates/mobile/global/sidebar_prop.tpl delete mode 100644 public/templates/mobile/news/default.tpl diff --git a/public/include/pages/home.inc.php b/public/include/pages/home.inc.php index ac846304..2d0f5b23 100644 --- a/public/include/pages/home.inc.php +++ b/public/include/pages/home.inc.php @@ -15,15 +15,5 @@ foreach ($aNews as $key => $aData) { // Load news entries for Desktop site and unauthenticated users $smarty->assign("NEWS", $aNews); - -// Tempalte specifics -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", "../news/default.tpl"); -} +$smarty->assign("CONTENT", "default.tpl"); ?> diff --git a/public/templates/mmcFE/global/sidebar.tpl b/public/templates/mmcFE/global/sidebar_prop.tpl similarity index 100% rename from public/templates/mmcFE/global/sidebar.tpl rename to public/templates/mmcFE/global/sidebar_prop.tpl diff --git a/public/templates/mmcFE/master.tpl b/public/templates/mmcFE/master.tpl index 8709e974..de478b38 100644 --- a/public/templates/mmcFE/master.tpl +++ b/public/templates/mmcFE/master.tpl @@ -47,11 +47,8 @@