diff --git a/include/config/admin_settings.inc.php b/include/config/admin_settings.inc.php index c26e314c..0a66e831 100644 --- a/include/config/admin_settings.inc.php +++ b/include/config/admin_settings.inc.php @@ -27,6 +27,13 @@ $aSettings['website'][] = array( 'name' => 'system_motd_style', 'value' => $setting->getValue('system_motd_style'), 'tooltip' => 'Set the Style what MOTD looks like.' ); +$aSettings['website'][] = array( + 'display' => 'MOTD Dismiss', 'type' => 'select', + 'options' => array( 0 => 'No', 1 => 'Yes' ), + 'default' => 0, + 'name' => 'system_motd_dismiss', 'value' => $setting->getValue('system_motd_dismiss'), + 'tooltip' => 'Set if users can hide MOTD.' +); $aSettings['website'][] = array( 'display' => 'Website Name', 'type' => 'text', 'size' => 25, diff --git a/include/smarty_globals.inc.php b/include/smarty_globals.inc.php index 86a5f1d0..4b16205f 100644 --- a/include/smarty_globals.inc.php +++ b/include/smarty_globals.inc.php @@ -188,6 +188,11 @@ if (@$_SESSION['USERDATA']['id']) { if ($setting->getValue('maintenance')) $_SESSION['POPUP'][] = array('CONTENT' => 'This pool is currently in maintenance mode.', 'TYPE' => 'alert alert-warning'); if ($motd = $setting->getValue('system_motd')) { + if ($setting->getValue('system_motd_dismiss')) { + $motd_dismiss = "yes"; + } else { + $motd_dismiss = "no"; + } switch ($setting->getValue('system_motd_style', 0)) { case 0: $motd_style = "alert-success"; @@ -204,7 +209,7 @@ if ($motd = $setting->getValue('system_motd')) { default: $motd_style = "alert-info"; } - $_SESSION['POPUP'][] = array('CONTENT' => $motd, 'DISMISS' => 'yes', 'ID' => 'motd', 'TYPE' => 'alert ' . $motd_style . ''); + $_SESSION['POPUP'][] = array('CONTENT' => $motd, 'DISMISS' => $motd_dismiss, 'ID' => 'motd', 'TYPE' => 'alert ' . $motd_style . ''); } // check for deprecated theme