Merge pull request #555 from TheSerapher/issue-545

Adding Admin MOTD
This commit is contained in:
Sebastian Grewe 2013-08-05 00:20:26 -07:00
commit 680fa46013
3 changed files with 10 additions and 0 deletions

View File

@ -23,6 +23,7 @@ $smarty->assign("DISABLEINVITATIONS", $setting->getValue('disable_invitations'))
$smarty->assign("DISABLEAP", $setting->getValue('disable_ap'));
$smarty->assign("DISABLEMP", $setting->getValue('disable_mp'));
$smarty->assign("DISABLENOTIFICATIONS", $setting->getValue('disable_notifications'));
$smarty->assign("MOTD", $setting->getValue('system_motd'));
// Tempalte specifics
$smarty->assign("CONTENT", "default.tpl");

View File

@ -120,6 +120,8 @@ if (@$_SESSION['USERDATA']['id']) {
if ($setting->getValue('maintenance'))
$_SESSION['POPUP'][] = array('CONTENT' => 'This pool is currently in maintenance mode.', 'TYPE' => 'warning');
if ($motd = $setting->getValue('system_motd'))
$_SESSION['POPUP'][] = array('CONTENT' => $motd, 'TYPE' => 'info');
// Make it available in Smarty
$smarty->assign('PATH', 'site_assets/' . THEME);

View File

@ -10,6 +10,13 @@
<th>Value</th>
</thead>
<tbody>
<tr>
<td class="left">Message of the Day</td>
<td class="center"><span id='tt'><img src='{$PATH}/images/questionmark.png' height='15px' width='15px' title='Set a pool-wide message of the day.'></span></td>
<td>
<input name="data[system_motd]" value="{$MOTD|default:""}">
</td>
</tr>
<tr>
<td class="left">Maintenance Mode</td>
<td class="center"><span id='tt'><img src='{$PATH}/images/questionmark.png' height='15px' width='15px' title='Enable Maintenance Mode for mmcfe-ng. Only admins can login.'></span></td>