diff --git a/public/include/config/admin_settings.inc.php b/public/include/config/admin_settings.inc.php index b48a6be6..fbc396b6 100644 --- a/public/include/config/admin_settings.inc.php +++ b/public/include/config/admin_settings.inc.php @@ -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' ), diff --git a/public/include/pages/about/moot.inc.php b/public/include/pages/about/moot.inc.php new file mode 100644 index 00000000..595c8f5e --- /dev/null +++ b/public/include/pages/about/moot.inc.php @@ -0,0 +1,20 @@ +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; +} diff --git a/public/include/smarty_globals.inc.php b/public/include/smarty_globals.inc.php index bd5df5db..0365ee32 100644 --- a/public/include/smarty_globals.inc.php +++ b/public/include/smarty_globals.inc.php @@ -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']) { diff --git a/public/templates/bootstrap/about/moot/default.tpl b/public/templates/bootstrap/about/moot/default.tpl new file mode 100644 index 00000000..9f067e16 --- /dev/null +++ b/public/templates/bootstrap/about/moot/default.tpl @@ -0,0 +1,15 @@ +
+
+
+
+ Web Chat +
+ +
+
+
diff --git a/public/templates/bootstrap/about/moot/disabled.tpl b/public/templates/bootstrap/about/moot/disabled.tpl new file mode 100644 index 00000000..573541ac --- /dev/null +++ b/public/templates/bootstrap/about/moot/disabled.tpl @@ -0,0 +1 @@ +0 diff --git a/public/templates/bootstrap/global/navigation.tpl b/public/templates/bootstrap/global/navigation.tpl index f2fc7929..d7ec51be 100644 --- a/public/templates/bootstrap/global/navigation.tpl +++ b/public/templates/bootstrap/global/navigation.tpl @@ -62,6 +62,7 @@ {acl_check page='about' action='pool' name=' About' acl=$GLOBAL.acl.about.page} {acl_check page='about' action='donors' name=' Donors' acl=$GLOBAL.acl.donors.page} {acl_check page='about' action='chat' name=' Web Chat' acl=$GLOBAL.acl.chat.page} + {acl_check page='about' action='moot' name=' Forum' acl=$GLOBAL.acl.moot.forum}