diff --git a/public/include/pages/home.inc.php b/public/include/pages/home.inc.php index 38e1022d..ffd08520 100644 --- a/public/include/pages/home.inc.php +++ b/public/include/pages/home.inc.php @@ -13,7 +13,17 @@ foreach ($aNews as $key => $aData) { $aNews[$key]['content'] = Markdown::defaultTransform($aData['content']); } -// Tempalte specifics +// Load news entries in case news is the homepage $smarty->assign("NEWS", $aNews); -$smarty->assign("CONTENT", "default.tpl"); + +// Tempalte specifics +if ($detect->isMobile()) { + if ($config['payout_system'] == 'pps') { + $smarty->assign("CONTENT", "pps.tpl"); + } else { + $smarty->assign("CONTENT", "default.tpl"); + } +} else { + $smarty->assign("CONTENT", "default.tpl"); +} ?> diff --git a/public/include/pages/news.inc.php b/public/include/pages/news.inc.php new file mode 100644 index 00000000..38e1022d --- /dev/null +++ b/public/include/pages/news.inc.php @@ -0,0 +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/templates/mmcFE/news/default.tpl b/public/templates/mmcFE/news/default.tpl new file mode 100644 index 00000000..e898af86 --- /dev/null +++ b/public/templates/mmcFE/news/default.tpl @@ -0,0 +1,5 @@ +{section name=news loop=$NEWS} + {include file="global/block_header.tpl" BLOCK_HEADER="{$NEWS[news].header}, posted {$NEWS[news].time|date_format:"%b %e, %Y at %H:%M"} by {$NEWS[news].author}"} + {$NEWS[news].content} + {include file="global/block_footer.tpl"} +{/section} diff --git a/public/templates/mobile/global/navigation.tpl b/public/templates/mobile/global/navigation.tpl index 2821454f..92785791 100644 --- a/public/templates/mobile/global/navigation.tpl +++ b/public/templates/mobile/global/navigation.tpl @@ -1,6 +1,7 @@