diff --git a/public/include/config/global.inc.dist.php b/public/include/config/global.inc.dist.php index 173a47b7..0634101d 100644 --- a/public/include/config/global.inc.dist.php +++ b/public/include/config/global.inc.dist.php @@ -246,9 +246,10 @@ $config['payout_system'] = 'prop'; $config['archive']['maxrounds'] = 10; $config['archive']['maxage'] = 60 * 24; -// URL prefix for block searches, used for block links, default: `http://explorer.litecoin.net/search?q=` -// If empty, the block link to the block information page will be removed -$config['blockexplorer'] = 'http://explorer.litecoin.net/search?q='; +// URL prefix for block searches, used for block links, default: `http://explorer.litecoin.net/block/` +// The Blockhash is appended on the templates to this URL +// If this config is empty, the block link to the block information page will be removed +$config['blockexplorer'] = 'http://explorer.litecoin.net/block/'; // Link to blockchain information, used for difficulty link, default: `http://allchains.info` // If empty, the difficulty link to the chain information will be removed diff --git a/public/include/pages/statistics/pool.inc.php b/public/include/pages/statistics/pool.inc.php index 256d4edf..b8872293 100644 --- a/public/include/pages/statistics/pool.inc.php +++ b/public/include/pages/statistics/pool.inc.php @@ -11,6 +11,7 @@ if (!$smarty->isCached('master.tpl', $smarty_cache_key)) { if (is_array($dDifficulty) && array_key_exists('proof-of-work', $dDifficulty)) $dDifficulty = $dDifficulty['proof-of-work']; $iBlock = $bitcoin->getblockcount(); + $sBlockHash = $bitcoin->query('getblockhash', $iBlock); } else { $dDifficulty = 1; $iBlock = 0; @@ -51,7 +52,13 @@ if (!$smarty->isCached('master.tpl', $smarty_cache_key)) { $smarty->assign("CONTRIBSHARES", $aContributorsShares); $smarty->assign("CONTRIBHASHES", $aContributorsHashes); $smarty->assign("CURRENTBLOCK", $iBlock); - count($aBlockData) > 0 ? $smarty->assign("LASTBLOCK", $aBlockData['height']) : $smarty->assign("LASTBLOCK", 0); + $smarty->assign("CURRENTBLOCKHASH", $sBlockHash); + if (count($aBlockData) > 0) { + $smarty->assign("LASTBLOCK", $aBlockData['height']); + $smarty->assign("LASTBLOCKHASH", $aBlockData['blockhash']); + } else { + $smarty->assign("LASTBLOCK", 0); + } $smarty->assign("DIFFICULTY", $dDifficulty); $smarty->assign("REWARD", $config['reward']); } else { diff --git a/public/templates/mmcFE/statistics/pool/authenticated.tpl b/public/templates/mmcFE/statistics/pool/authenticated.tpl index 8d35df1a..832cecf3 100644 --- a/public/templates/mmcFE/statistics/pool/authenticated.tpl +++ b/public/templates/mmcFE/statistics/pool/authenticated.tpl @@ -22,7 +22,7 @@ {if $GLOBAL.blockexplorer} Next Network Block - {$CURRENTBLOCK + 1}    (Current: {$CURRENTBLOCK}) + {$CURRENTBLOCK + 1}    (Current: {$CURRENTBLOCK}) {else} @@ -32,7 +32,7 @@ {/if} Last Block Found - {if $GLOBAL.blockexplorer}{$LASTBLOCK|default:"0"}{else}{$LASTBLOCK|default:"0"}{/if} + {if $GLOBAL.blockexplorer}{$LASTBLOCK|default:"0"}{else}{$LASTBLOCK|default:"0"}{/if} Current Difficulty diff --git a/public/templates/mobile/statistics/pool/authenticated.tpl b/public/templates/mobile/statistics/pool/authenticated.tpl index 0889347c..a7025779 100644 --- a/public/templates/mobile/statistics/pool/authenticated.tpl +++ b/public/templates/mobile/statistics/pool/authenticated.tpl @@ -27,7 +27,7 @@ {if $GLOBAL.blockexplorer} Next Network Block - {$CURRENTBLOCK + 1}    (Current: {$CURRENTBLOCK}) + {$CURRENTBLOCK + 1}    (Current: {$CURRENTBLOCK}) {else} @@ -37,7 +37,7 @@ {/if} Last Block Found - {if $GLOBAL.blockexplorer}{$LASTBLOCK|default:"0"}{else}{$LASTBLOCK|default:"0"}{/if} + {if $GLOBAL.blockexplorer}{$LASTBLOCK|default:"0"}{else}{$LASTBLOCK|default:"0"}{/if} {if $GLOBAL.chaininfo}