Merge pull request #1814 from nrpatten/next
[ADD] IRC chat, Edit Donors
This commit is contained in:
commit
2fc9056a7b
@ -250,6 +250,13 @@ $aSettings['acl'][] = array(
|
|||||||
'name' => 'acl_contactform', 'value' => $setting->getValue('acl_contactform'),
|
'name' => 'acl_contactform', 'value' => $setting->getValue('acl_contactform'),
|
||||||
'tooltip' => 'Make the contactform private (users only) or public.'
|
'tooltip' => 'Make the contactform private (users only) or public.'
|
||||||
);
|
);
|
||||||
|
$aSettings['acl'][] = array(
|
||||||
|
'display' => 'Live Chat Page', 'type' => 'select',
|
||||||
|
'options' => array( 0 => 'Private', 1 => 'Public', 2 => 'Disabled' ),
|
||||||
|
'default' => 2,
|
||||||
|
'name' => 'acl_chat_page', 'value' => $setting->getValue('acl_chat_page'),
|
||||||
|
'tooltip' => 'Make the chat page private (users only) or public.'
|
||||||
|
);
|
||||||
$aSettings['system'][] = array(
|
$aSettings['system'][] = array(
|
||||||
'display' => 'E-mail address for system error notifications', 'type' => 'text',
|
'display' => 'E-mail address for system error notifications', 'type' => 'text',
|
||||||
'size' => 25,
|
'size' => 25,
|
||||||
@ -341,6 +348,13 @@ $aSettings['system'][] = array(
|
|||||||
'name' => 'disable_transactionsummary', 'value' => $setting->getValue('disable_transactionsummary'),
|
'name' => 'disable_transactionsummary', 'value' => $setting->getValue('disable_transactionsummary'),
|
||||||
'tooltip' => 'Disable transaction summaries. Helpful with large transaction tables.'
|
'tooltip' => 'Disable transaction summaries. Helpful with large transaction tables.'
|
||||||
);
|
);
|
||||||
|
$aSettings['system'][] = array(
|
||||||
|
'display' => 'IRC Chat Channel', 'type' => 'text',
|
||||||
|
'size' => 25,
|
||||||
|
'default' => '#lazypoolop',
|
||||||
|
'name' => 'system_irc_chat', 'value' => $setting->getValue('system_irc_chat'),
|
||||||
|
'tooltip' => 'Your IRC support channel name.'
|
||||||
|
);
|
||||||
$aSettings['recaptcha'][] = array(
|
$aSettings['recaptcha'][] = array(
|
||||||
'display' => 'Enable re-Captcha', 'type' => 'select',
|
'display' => 'Enable re-Captcha', 'type' => 'select',
|
||||||
'options' => array( 0 => 'No', 1 => 'Yes' ),
|
'options' => array( 0 => 'No', 1 => 'Yes' ),
|
||||||
|
|||||||
20
public/include/pages/about/chat.inc.php
Normal file
20
public/include/pages/about/chat.inc.php
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
||||||
|
|
||||||
|
// ACL check
|
||||||
|
switch($setting->getValue('acl_chat_page', 2)) {
|
||||||
|
case '0':
|
||||||
|
if ($user->isAuthenticated()) {
|
||||||
|
$smarty->assign('CHATROOM', $setting->getValue('system_irc_chat', '#lazypoolop'));
|
||||||
|
$smarty->assign("CONTENT", "default.tpl");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case '1':
|
||||||
|
$smarty->assign('CHATROOM', $setting->getValue('system_irc_chat', '#lazypoolop'));
|
||||||
|
$smarty->assign("CONTENT", "default.tpl");
|
||||||
|
break;
|
||||||
|
case '2':
|
||||||
|
$_SESSION['POPUP'][] = array('CONTENT' => 'Page currently disabled. Please try again later.', 'TYPE' => 'errormsg');
|
||||||
|
$smarty->assign("CONTENT", "disabled.tpl");
|
||||||
|
break;
|
||||||
|
}
|
||||||
@ -124,6 +124,7 @@ $aGlobal['acl']['graphs']['statistics'] = $setting->getValue('acl_graphs_statist
|
|||||||
$aGlobal['acl']['donors']['page'] = $setting->getValue('acl_donors_page');
|
$aGlobal['acl']['donors']['page'] = $setting->getValue('acl_donors_page');
|
||||||
$aGlobal['acl']['about']['page'] = $setting->getValue('acl_about_page');
|
$aGlobal['acl']['about']['page'] = $setting->getValue('acl_about_page');
|
||||||
$aGlobal['acl']['contactform'] = $setting->getValue('acl_contactform');
|
$aGlobal['acl']['contactform'] = $setting->getValue('acl_contactform');
|
||||||
|
$aGlobal['acl']['chat']['page'] = $setting->getValue('acl_chat_page', 2);
|
||||||
|
|
||||||
// We don't want these session infos cached
|
// We don't want these session infos cached
|
||||||
if (@$_SESSION['USERDATA']['id']) {
|
if (@$_SESSION['USERDATA']['id']) {
|
||||||
|
|||||||
@ -449,7 +449,7 @@ margin-bottom: 8px}
|
|||||||
|
|
||||||
.tablesorter, .tablesorterpager {
|
.tablesorter, .tablesorterpager {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: -5px 0 0 0;
|
margin: -4px 0 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tablesorter td, .tablesorterpager td{
|
.tablesorter td, .tablesorterpager td{
|
||||||
|
|||||||
9
public/templates/mpos/about/chat/default.tpl
Normal file
9
public/templates/mpos/about/chat/default.tpl
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<h4 class="info">If you have your own irc client feel free to connect to our channel @ <b>IRC.FREENODE.NET {$CHATROOM|default:"#lazypoolop"}</b></h4>
|
||||||
|
<article class="module width_full">
|
||||||
|
<header><h3>Web Chat</h3></header>
|
||||||
|
<div class="module_content">
|
||||||
|
<table width="100%">
|
||||||
|
<iframe src="https://webchat.freenode.net/?channels={$CHATROOM|default:"#lazypoolop"}" height="768" width="100%"></iframe>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
1
public/templates/mpos/about/chat/disabled.tpl
Normal file
1
public/templates/mpos/about/chat/disabled.tpl
Normal file
@ -0,0 +1 @@
|
|||||||
|
0
|
||||||
@ -42,6 +42,7 @@
|
|||||||
<li class="icon-desktop"><a href="{$smarty.server.SCRIPT_NAME}?page=gettingstarted">Getting Started</a></li>
|
<li class="icon-desktop"><a href="{$smarty.server.SCRIPT_NAME}?page=gettingstarted">Getting Started</a></li>
|
||||||
{acl_check icon='icon-doc' page='about' action='pool' name='About' acl=$GLOBAL.acl.about.page}
|
{acl_check icon='icon-doc' page='about' action='pool' name='About' acl=$GLOBAL.acl.about.page}
|
||||||
{acl_check icon='icon-money' page='about' action='donors' name='Donors' acl=$GLOBAL.acl.donors.page}
|
{acl_check icon='icon-money' page='about' action='donors' name='Donors' acl=$GLOBAL.acl.donors.page}
|
||||||
|
{acl_check icon='icon-megaphone' page='about' action='chat' name='Web Chat' acl=$GLOBAL.acl.chat.page}
|
||||||
</ul>
|
</ul>
|
||||||
<h3>Other</h3>
|
<h3>Other</h3>
|
||||||
<ul class="toggle">
|
<ul class="toggle">
|
||||||
|
|||||||
@ -5,9 +5,9 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th align="center">Rank</th>
|
<th align="center">Rank</th>
|
||||||
<th align="right"></th>
|
<th align="center">Donor</th>
|
||||||
<th align="left" scope="col">User Name</th>
|
<th align="center" scope="col">User Name</th>
|
||||||
<th align="right" scope="col">KH/s</th>
|
<th align="right" style="padding-right: 7px;" scope="col">KH/s</th>
|
||||||
<th align="right">{$GLOBAL.config.currency}/Day</th>
|
<th align="right">{$GLOBAL.config.currency}/Day</th>
|
||||||
{if $GLOBAL.config.price.currency}<th align="right" style="padding-right: 25px;">{$GLOBAL.config.price.currency}/Day</th>{/if}
|
{if $GLOBAL.config.price.currency}<th align="right" style="padding-right: 25px;">{$GLOBAL.config.price.currency}/Day</th>{/if}
|
||||||
</tr>
|
</tr>
|
||||||
@ -19,22 +19,22 @@
|
|||||||
{math assign="estday" equation="round(reward / ( diff * pow(2,32) / ( hashrate * 1000 ) / 3600 / 24), 3)" diff=$DIFFICULTY reward=$REWARD hashrate=$CONTRIBHASHES[contrib].hashrate}
|
{math assign="estday" equation="round(reward / ( diff * pow(2,32) / ( hashrate * 1000 ) / 3600 / 24), 3)" diff=$DIFFICULTY reward=$REWARD hashrate=$CONTRIBHASHES[contrib].hashrate}
|
||||||
<tr{if $GLOBAL.userdata.username|default:""|lower == $CONTRIBHASHES[contrib].account|lower}{assign var=listed value=1} style="background-color:#99EB99;"{else} class="{cycle values="odd,even"}"{/if}>
|
<tr{if $GLOBAL.userdata.username|default:""|lower == $CONTRIBHASHES[contrib].account|lower}{assign var=listed value=1} style="background-color:#99EB99;"{else} class="{cycle values="odd,even"}"{/if}>
|
||||||
<td align="center">{$rank++}</td>
|
<td align="center">{$rank++}</td>
|
||||||
<td align="right">{if $CONTRIBHASHES[contrib].donate_percent > 0}<i class="icon-star-empty"></i>{/if}</td>
|
<td align="center">{if $CONTRIBHASHES[contrib].donate_percent > 0}<i class="icon-star-empty"></i>{else}<i class="icon-cancel"></i>{/if}</td>
|
||||||
<td>{if $CONTRIBHASHES[contrib].is_anonymous|default:"0" == 1 && $GLOBAL.userdata.is_admin|default:"0" == 0}anonymous{else}{$CONTRIBHASHES[contrib].account|escape}{/if}</td>
|
<td align="center" style="padding-right: 0px;">{if $CONTRIBHASHES[contrib].is_anonymous|default:"0" == 1 && $GLOBAL.userdata.is_admin|default:"0" == 0}anonymous{else}{$CONTRIBHASHES[contrib].account|escape}{/if}</td>
|
||||||
<td align="right">{$CONTRIBHASHES[contrib].hashrate|number_format}</td>
|
<td align="right" style="padding-right: 0px;">{$CONTRIBHASHES[contrib].hashrate|number_format}</td>
|
||||||
<td align="right">{$estday|number_format:"3"}</td>
|
<td align="right" style="padding-right: 0px;">{$estday|number_format:"3"}</td>
|
||||||
{if $GLOBAL.config.price.currency}<td align="right" style="padding-right: 25px;">{($estday * $GLOBAL.price)|default:"n/a"|number_format:"4"}</td>{/if}
|
{if $GLOBAL.config.price.currency}<td align="right" style="padding-right: 30px;">{($estday * $GLOBAL.price)|default:"n/a"|number_format:"4"}</td>{/if}
|
||||||
</tr>
|
</tr>
|
||||||
{/section}
|
{/section}
|
||||||
{if $listed != 1 && $GLOBAL.userdata.username|default:"" && $GLOBAL.userdata.rawhashrate|default:"0" > 0}
|
{if $listed != 1 && $GLOBAL.userdata.username|default:"" && $GLOBAL.userdata.rawhashrate|default:"0" > 0}
|
||||||
{math assign="myestday" equation="round(reward / ( diff * pow(2,32) / ( hashrate * 1000 ) / 3600 / 24), 3)" diff=$DIFFICULTY reward=$REWARD hashrate=$GLOBAL.userdata.rawhashrate}
|
{math assign="myestday" equation="round(reward / ( diff * pow(2,32) / ( hashrate * 1000 ) / 3600 / 24), 3)" diff=$DIFFICULTY reward=$REWARD hashrate=$GLOBAL.userdata.rawhashrate}
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center">n/a</td>
|
<td align="center">n/a</td>
|
||||||
<td align="right">{if $GLOBAL.userdata.donate_percent > 0}<i class="icon-star-empty"></i>{/if}</td>
|
<td align="center">{if $GLOBAL.userdata.donate_percent > 0}<i class="icon-star-empty"></i>{else}<i class="icon-cancel"></i>{/if}</td>
|
||||||
<td>{$GLOBAL.userdata.username|escape}</td>
|
<td align="center" style="padding-right: 0px;">{$GLOBAL.userdata.username|escape}</td>
|
||||||
<td align="right">{$GLOBAL.userdata.rawhashrate|number_format}</td>
|
<td align="right" style="padding-right: 0px;">{$GLOBAL.userdata.rawhashrate|number_format}</td>
|
||||||
<td align="right">{$myestday|number_format:"3"|default:"n/a"}</td>
|
<td align="right" style="padding-right: 0px;">{$myestday|number_format:"3"|default:"n/a"}</td>
|
||||||
{if $GLOBAL.config.price.currency}<td align="right" style="padding-right: 25px;">{($myestday * $GLOBAL.price)|default:"n/a"|number_format:"4"}</td>{/if}
|
{if $GLOBAL.config.price.currency}<td align="right" style="padding-right: 30px;">{($myestday * $GLOBAL.price)|default:"n/a"|number_format:"4"}</td>{/if}
|
||||||
</tr>
|
</tr>
|
||||||
{/if}
|
{/if}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
@ -4,9 +4,9 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th align="center">Rank</th>
|
<th align="center">Rank</th>
|
||||||
<th align="right"></th>
|
<th align="center">Donor</th>
|
||||||
<th>User Name</th>
|
<th align="center">User Name</th>
|
||||||
<th align="right" style="padding-right: 25px;">Shares</th>
|
<th align="right" style="padding-right: 30px;">Shares</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -15,17 +15,17 @@
|
|||||||
{section shares $CONTRIBSHARES}
|
{section shares $CONTRIBSHARES}
|
||||||
<tr{if $GLOBAL.userdata.username|default:""|lower == $CONTRIBSHARES[shares].account|lower}{assign var=listed value=1} style="background-color:#99EB99;"{else} class="{cycle values="odd,even"}"{/if}>
|
<tr{if $GLOBAL.userdata.username|default:""|lower == $CONTRIBSHARES[shares].account|lower}{assign var=listed value=1} style="background-color:#99EB99;"{else} class="{cycle values="odd,even"}"{/if}>
|
||||||
<td align="center">{$rank++}</td>
|
<td align="center">{$rank++}</td>
|
||||||
<td align="right">{if $CONTRIBSHARES[shares].donate_percent > 0}<i class="icon-star-empty"></i>{/if}</td>
|
<td align="center">{if $CONTRIBSHARES[shares].donate_percent > 0}<i class="icon-star-empty"></i>{else}<i class="icon-cancel"></i>{/if}</td>
|
||||||
<td>{if $CONTRIBSHARES[shares].is_anonymous|default:"0" == 1 && $GLOBAL.userdata.is_admin|default:"0" == 0}anonymous{else}{$CONTRIBSHARES[shares].account|escape}{/if}</td>
|
<td align="center">{if $CONTRIBSHARES[shares].is_anonymous|default:"0" == 1 && $GLOBAL.userdata.is_admin|default:"0" == 0}anonymous{else}{$CONTRIBSHARES[shares].account|escape}{/if}</td>
|
||||||
<td align="right" style="padding-right: 25px;">{$CONTRIBSHARES[shares].shares|number_format}</td>
|
<td align="right" style="padding-right: 30px;">{$CONTRIBSHARES[shares].shares|number_format}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{/section}
|
{/section}
|
||||||
{if $listed != 1 && $GLOBAL.userdata.username|default:"" && $GLOBAL.userdata.shares.valid|default:"0" > 0}
|
{if $listed != 1 && $GLOBAL.userdata.username|default:"" && $GLOBAL.userdata.shares.valid|default:"0" > 0}
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center">n/a</td>
|
<td align="center">n/a</td>
|
||||||
<td align="right">{if $GLOBAL.userdata.donate_percent > 0}<i class="icon-star-empty"></i>{/if}</td>
|
<td align="center">{if $GLOBAL.userdata.donate_percent > 0}<i class="icon-star-empty"></i>{else}<i class="icon-cancel"></i>{/if}</td>
|
||||||
<td>{$GLOBAL.userdata.username|escape}</td>
|
<td align="center">{$GLOBAL.userdata.username|escape}</td>
|
||||||
<td align="right" style="padding-right: 25px;">{$GLOBAL.userdata.shares.valid|number_format}</td>
|
<td align="right" style="padding-right: 30px;">{$GLOBAL.userdata.shares.valid|number_format}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{/if}
|
{/if}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user