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 @@
{$NEWS[news].content}
-| Your Stats | +|
| Hashrate | +{$GLOBAL.userdata.hashrate|number_format} KH/s | +
| Round Shares | +|
| Pool Valid | +{$GLOBAL.roundshares.valid|number_format} | +
| Pool Invalid | +{$GLOBAL.roundshares.invalid|number_format} ({(100 / $GLOBAL.roundshares.valid * $GLOBAL.roundshares.invalid)|number_format:"2"}%) | +
| Your Valid | +{$GLOBAL.userdata.shares.valid|number_format} | +
| Your Invalid | +{$GLOBAL.userdata.shares.invalid|number_format} ({(100 / $GLOBAL.roundshares.valid * $GLOBAL.userdata.shares.invalid)|number_format:"2"}%) | +
| {$GLOBAL.config.currency} Round Estimate | +|
| Block | +{$GLOBAL.userdata.est_block|number_format:"3"} | +
| Fees | +{$GLOBAL.userdata.est_fee|number_format:"3"} | +
| Donation | +{$GLOBAL.userdata.est_donation|number_format:"3"} | +
| Payout | +{$GLOBAL.userdata.est_payout|number_format:"3"} | +
| {$GLOBAL.config.currency} Account Balance | |
| Confirmed | {$GLOBAL.userdata.balance.confirmed|default:"0"} |
| Unconfirmed | {$GLOBAL.userdata.balance.unconfirmed|default:"0"} |
| Your Stats | +|
| Hashrate | +{$GLOBAL.userdata.hashrate|number_format} KH/s | +
| Share Rate | +{$GLOBAL.userdata.sharerate|number_format:"2"} S/s | +
| PPS Value | +{$GLOBAL.ppsvalue} | +
| Round Shares | +|
| Pool Valid | +{$GLOBAL.roundshares.valid|number_format} | +
| Pool Invalid | +{$GLOBAL.roundshares.invalid|number_format} ({(100 / $GLOBAL.roundshares.valid * $GLOBAL.roundshares.invalid)|number_format:"2"}%) | +
| Your Invalid | +{$GLOBAL.userdata.shares.invalid|number_format} ({(100 / $GLOBAL.roundshares.valid * $GLOBAL.userdata.shares.invalid)|number_format:"2"}%) | +
| {$GLOBAL.config.currency} Estimates | |
| in 24 hours | +{($GLOBAL.userdata.sharerate * 24 * 60 * 60 * $GLOBAL.ppsvalue)|number_format:"8"} | +
| in 7 days | +{($GLOBAL.userdata.sharerate * 7 * 24 * 60 * 60 * $GLOBAL.ppsvalue)|number_format:"8"} | +
| in 14 days | +{($GLOBAL.userdata.sharerate * 14 * 24 * 60 * 60 * $GLOBAL.ppsvalue)|number_format:"8"} | +
| {$GLOBAL.config.currency} Account Balance | |
| Confirmed | {$GLOBAL.userdata.balance.confirmed|default:"0"} |
| Unconfirmed | {$GLOBAL.userdata.balance.unconfirmed|default:"0"} |
{$NEWS[news].content}
+