[UPDATE] adding moot
This commit is contained in:
parent
6ce8a049e4
commit
0c75662352
@ -272,6 +272,13 @@ $aSettings['acl'][] = array(
|
||||
'name' => 'acl_chat_page', 'value' => $setting->getValue('acl_chat_page'),
|
||||
'tooltip' => 'Make the chat page private (users only) or public.'
|
||||
);
|
||||
$aSettings['acl'][] = array(
|
||||
'display' => 'MOOT Forum Page', 'type' => 'select',
|
||||
'options' => array( 0 => 'Private', 1 => 'Public', 2 => 'Disabled' ),
|
||||
'default' => 2,
|
||||
'name' => 'acl_moot_forum', 'value' => $setting->getValue('acl_moot_forum'),
|
||||
'tooltip' => 'Make the forum page private (users only) or public.'
|
||||
);
|
||||
$aSettings['system'][] = array(
|
||||
'display' => 'E-mail address for system error notifications', 'type' => 'text',
|
||||
'size' => 25,
|
||||
@ -370,6 +377,13 @@ $aSettings['system'][] = array(
|
||||
'name' => 'system_irc_chat', 'value' => $setting->getValue('system_irc_chat'),
|
||||
'tooltip' => 'Your IRC support channel name.'
|
||||
);
|
||||
$aSettings['system'][] = array(
|
||||
'display' => 'Moot Forum Channel', 'type' => 'text',
|
||||
'size' => 25,
|
||||
'default' => 'lazypoolop',
|
||||
'name' => 'system_moot_forum', 'value' => $setting->getValue('system_moot_forum'),
|
||||
'tooltip' => 'Your MOOT support forum name.'
|
||||
);
|
||||
$aSettings['recaptcha'][] = array(
|
||||
'display' => 'Enable re-Captcha', 'type' => 'select',
|
||||
'options' => array( 0 => 'No', 1 => 'Yes' ),
|
||||
|
||||
20
public/include/pages/about/moot.inc.php
Normal file
20
public/include/pages/about/moot.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_moot_forum', 2)) {
|
||||
case '0':
|
||||
if ($user->isAuthenticated()) {
|
||||
$smarty->assign('CHATROOM', $setting->getValue('system_moot_forum', 'lazypoolop'));
|
||||
$smarty->assign("CONTENT", "default.tpl");
|
||||
}
|
||||
break;
|
||||
case '1':
|
||||
$smarty->assign('CHATROOM', $setting->getValue('system_moot_forum', 'lazypoolop'));
|
||||
$smarty->assign("CONTENT", "default.tpl");
|
||||
break;
|
||||
case '2':
|
||||
$_SESSION['POPUP'][] = array('CONTENT' => 'Page currently disabled. Please try again later.', 'TYPE' => 'alert alert-danger');
|
||||
$smarty->assign("CONTENT", "disabled.tpl");
|
||||
break;
|
||||
}
|
||||
@ -133,6 +133,7 @@ $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);
|
||||
$aGlobal['acl']['moot']['forum'] = $setting->getValue('acl_moot_forum', 2);
|
||||
|
||||
// We don't want these session infos cached
|
||||
if (@$_SESSION['USERDATA']['id']) {
|
||||
|
||||
15
public/templates/bootstrap/about/moot/default.tpl
Normal file
15
public/templates/bootstrap/about/moot/default.tpl
Normal file
@ -0,0 +1,15 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-comments-o fa-fw"></i> Web Chat
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<table class="table table-bordered">
|
||||
<a class="moot" href="https://moot.it/i/{$CHATROOM|default:"lazypoolop"}">{$CHATROOM|default:"lazypoolop"}</a>
|
||||
<script src="//cdn.moot.it/1/moot.min.js"></script>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
1
public/templates/bootstrap/about/moot/disabled.tpl
Normal file
1
public/templates/bootstrap/about/moot/disabled.tpl
Normal file
@ -0,0 +1 @@
|
||||
0
|
||||
@ -62,6 +62,7 @@
|
||||
{acl_check page='about' action='pool' name='<i class="fa fa-info fa-fw"></i> About' acl=$GLOBAL.acl.about.page}
|
||||
{acl_check page='about' action='donors' name='<i class="fa fa-bitbucket fa-fw"></i> Donors' acl=$GLOBAL.acl.donors.page}
|
||||
{acl_check page='about' action='chat' name='<i class="fa fa-comments-o fa-fw"></i> Web Chat' acl=$GLOBAL.acl.chat.page}
|
||||
{acl_check page='about' action='moot' name='<i class="fa fa-ticket fa-fw"></i> Forum' acl=$GLOBAL.acl.moot.forum}
|
||||
</ul>
|
||||
<!-- /.nav-second-level -->
|
||||
</li>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user