diff --git a/public/include/config/admin_settings.inc.php b/public/include/config/admin_settings.inc.php index 9e41bbd6..eeb7d035 100644 --- a/public/include/config/admin_settings.inc.php +++ b/public/include/config/admin_settings.inc.php @@ -250,6 +250,13 @@ $aSettings['acl'][] = array( 'name' => 'acl_contactform', 'value' => $setting->getValue('acl_contactform'), '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( 'display' => 'E-mail address for system error notifications', 'type' => 'text', 'size' => 25, @@ -341,6 +348,13 @@ $aSettings['system'][] = array( 'name' => 'disable_transactionsummary', 'value' => $setting->getValue('disable_transactionsummary'), '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( 'display' => 'Enable re-Captcha', 'type' => 'select', 'options' => array( 0 => 'No', 1 => 'Yes' ), diff --git a/public/include/pages/about/chat.inc.php b/public/include/pages/about/chat.inc.php new file mode 100644 index 00000000..a5150163 --- /dev/null +++ b/public/include/pages/about/chat.inc.php @@ -0,0 +1,20 @@ +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; +} diff --git a/public/include/smarty_globals.inc.php b/public/include/smarty_globals.inc.php index 8a011b5d..d36080f8 100644 --- a/public/include/smarty_globals.inc.php +++ b/public/include/smarty_globals.inc.php @@ -124,6 +124,7 @@ $aGlobal['acl']['graphs']['statistics'] = $setting->getValue('acl_graphs_statist $aGlobal['acl']['donors']['page'] = $setting->getValue('acl_donors_page'); $aGlobal['acl']['about']['page'] = $setting->getValue('acl_about_page'); $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 if (@$_SESSION['USERDATA']['id']) { diff --git a/public/site_assets/mpos/css/layout.css b/public/site_assets/mpos/css/layout.css index 2ff6631a..ceb6ce40 100644 --- a/public/site_assets/mpos/css/layout.css +++ b/public/site_assets/mpos/css/layout.css @@ -449,7 +449,7 @@ margin-bottom: 8px} .tablesorter, .tablesorterpager { width: 100%; -margin: -5px 0 0 0; +margin: -4px 0 0 0; } .tablesorter td, .tablesorterpager td{ diff --git a/public/templates/mpos/about/chat/default.tpl b/public/templates/mpos/about/chat/default.tpl new file mode 100644 index 00000000..77bd358f --- /dev/null +++ b/public/templates/mpos/about/chat/default.tpl @@ -0,0 +1,9 @@ +

If you have your own irc client feel free to connect to our channel @ IRC.FREENODE.NET {$CHATROOM|default:"#lazypoolop"}

+
+

Web Chat

+
+ + +
+
+
diff --git a/public/templates/mpos/about/chat/disabled.tpl b/public/templates/mpos/about/chat/disabled.tpl new file mode 100644 index 00000000..573541ac --- /dev/null +++ b/public/templates/mpos/about/chat/disabled.tpl @@ -0,0 +1 @@ +0 diff --git a/public/templates/mpos/global/navigation.tpl b/public/templates/mpos/global/navigation.tpl index d4666450..9d97235e 100644 --- a/public/templates/mpos/global/navigation.tpl +++ b/public/templates/mpos/global/navigation.tpl @@ -42,6 +42,7 @@
  • Getting Started
  • {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-megaphone' page='about' action='chat' name='Web Chat' acl=$GLOBAL.acl.chat.page}

    Other