Merge pull request #833 from iAmShorty/settings-update

[SETTINGS] show/hide donors and about page
This commit is contained in:
Sebastian Grewe 2013-11-12 01:07:08 -08:00
commit 08a59f0d96
8 changed files with 41 additions and 7 deletions

View File

@ -257,6 +257,20 @@ $aSettings['system'][] = array(
'name' => 'disable_contactform', 'value' => $setting->getValue('disable_contactform'),
'tooltip' => 'Enable or Disable Contactform. Users will not be able to use the contact form.'
);
$aSettings['system'][] = array(
'display' => 'Disable Donors Page', 'type' => 'select',
'options' => array( 0 => 'No', 1 => 'Yes'),
'default' => 1,
'name' => 'disable_donors', 'value' => $setting->getValue('disable_donors'),
'tooltip' => 'Showing Donors page in Navigation.'
);
$aSettings['system'][] = array(
'display' => 'Disable About Page', 'type' => 'select',
'options' => array( 0 => 'No', 1 => 'Yes'),
'default' => 1,
'name' => 'disable_about', 'value' => $setting->getValue('disable_about'),
'tooltip' => 'Showing About page in Navigation.'
);
$aSettings['recaptcha'][] = array(
'display' => 'Enable re-Captcha', 'type' => 'select',
'options' => array( 0 => 'No', 1 => 'Yes' ),

View File

@ -3,9 +3,15 @@
// Make sure we are called from index.php
if (!defined('SECURITY')) die('Hacking attempt');
$aDonors = $transaction->getDonations();
if ($setting->getValue('disable_donors')) {
$_SESSION['POPUP'][] = array('CONTENT' => 'Donors are currently disabled. Please try again later.', 'TYPE' => 'errormsg');
$smarty->assign("CONTENT", "disabled.tpl");
} else {
$aDonors = $transaction->getDonations();
// Tempalte specifics
$smarty->assign("DONORS", $aDonors);
$smarty->assign("CONTENT", "default.tpl");
}
// Tempalte specifics
$smarty->assign("DONORS", $aDonors);
$smarty->assign("CONTENT", "default.tpl");
?>

View File

@ -4,6 +4,12 @@
if (!defined('SECURITY'))
die('Hacking attempt');
// Tempalte specifics
$smarty->assign("CONTENT", "default.tpl");
if ($setting->getValue('disable_about')) {
$_SESSION['POPUP'][] = array('CONTENT' => 'Donors are currently disabled. Please try again later.', 'TYPE' => 'errormsg');
$smarty->assign("CONTENT", "disabled.tpl");
} else {
// Tempalte specifics
$smarty->assign("CONTENT", "default.tpl");
}
?>

View File

@ -91,6 +91,8 @@ $aGlobal['website']['email'] = $setting->getValue('website_email');
$aGlobal['website']['api']['disabled'] = $setting->getValue('disable_api');
$aGlobal['website']['blockexplorer']['disabled'] = $setting->getValue('website_blockexplorer_disabled');
$aGlobal['website']['chaininfo']['disabled'] = $setting->getValue('website_chaininfo_disabled');
$aGlobal['website']['donors']['disabled'] = $setting->getValue('disable_donors');
$aGlobal['website']['about']['disabled'] = $setting->getValue('disable_about');
$setting->getValue('website_blockexplorer_url') ? $aGlobal['website']['blockexplorer']['url'] = $setting->getValue('website_blockexplorer_url') : $aGlobal['website']['blockexplorer']['url'] = 'http://explorer.litecoin.net/block/';
$setting->getValue('website_chaininfo_url') ? $aGlobal['website']['chaininfo']['url'] = $setting->getValue('website_chaininfo_url') : $aGlobal['website']['chaininfo']['url'] = 'http://allchains.info';

View File

@ -55,11 +55,13 @@
{/if}
<li><a href="{$smarty.server.PHP_SELF}?page=gettingstarted">Getting Started</a></li>
<li><a href="{$smarty.server.PHP_SELF}?page=support">Support</a></li>
{if !$GLOBAL.website.about.disabled}
<li><a href="{$smarty.server.PHP_SELF}?page=about&action=pool">About</a>
{/if}
<ul>
<li><a href="{$smarty.server.PHP_SELF}?page=about&action=pool">This Pool</a></li>
{if !$GLOBAL.website.api.disabled}<li><a href="{$smarty.server.PHP_SELF}?page=about&action=api">API Reference</a></li>{/if}
<li><a href="{$smarty.server.PHP_SELF}?page=about&action=donors">Pool Donors</a></li>
{if !$GLOBAL.website.donors.disabled}<li><a href="{$smarty.server.PHP_SELF}?page=about&action=donors">Pool Donors</a></li>{/if}
</ul>
</li>
{if $smarty.session.AUTHENTICATED|default == 1}<li><a href="{$smarty.server.PHP_SELF}?page=logout">Logout</a></li>{else}<li><a href="{$smarty.server.PHP_SELF}?page=register">Register</a></li>{/if}

View File

@ -57,8 +57,12 @@
<h3>Help</h3>
<ul class="toggle">
<li class="icon-desktop"><a href="{$smarty.server.PHP_SELF}?page=gettingstarted">GettingStarted</a></li>
{if !$GLOBAL.website.about.disabled}
<li class="icon-doc"><a href="{$smarty.server.PHP_SELF}?page=about&action=pool">About</a></li>
{/if}
{if !$GLOBAL.website.donors.disabled}
<li class="icon-money"><a href="{$smarty.server.PHP_SELF}?page=about&action=donors">Donors</a></li>
{/if}
</ul>
<h3>Other</h3>
<ul class="toggle">