From: Roland Häder Date: Sat, 6 Sep 2008 21:39:47 +0000 (+0000) Subject: Autostart/manual-start added to surfbar X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=commitdiff_plain;h=7b8e99bea1bd896d7d984bb5a04fdbf974890a7c Autostart/manual-start added to surfbar --- diff --git a/inc/extensions/ext-surfbar.php b/inc/extensions/ext-surfbar.php index 862fd14598..7a09feec6e 100644 --- a/inc/extensions/ext-surfbar.php +++ b/inc/extensions/ext-surfbar.php @@ -114,6 +114,7 @@ PRIMARY KEY(`id`) $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_dynamic_percent` FLOAT(10,5) UNSIGNED NOT NULL DEFAULT '10.00000'"; $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_max_order` INT(7) UNSIGNED NOT NULL DEFAULT '10'"; $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_restart_time` BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(60*6)."'"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_autostart` ENUM('Y','N') NOT NULL DEFAULT 'Y'"; // Member menus $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar',NULL,'Surfbar','Y','Y',5)"; diff --git a/inc/language/surfbar_de.php b/inc/language/surfbar_de.php index efd481e015..a49c8dc23f 100644 --- a/inc/language/surfbar_de.php +++ b/inc/language/surfbar_de.php @@ -50,6 +50,7 @@ define('ADMIN_CONFIG_SURFBAR_NOTIFY_ADMIN_UNLOCK', "Admin bei Freigabe von Mailb define('ADMIN_CONFIG_SURFBAR_DYNAMIC_PERCENT', "Prozent auf dynamische Vergütung:"); define('ADMIN_CONFIG_SURFBAR_MAX_ORDER', "Maximal durch Mitglied in Surfbar buchbare URLs:(*)"); define('ADMIN_CONFIG_SURFBAR_RESTART_TIME', "Ruhezeit der Surfbar, wenn alle URLs in Reload-Lock sind:"); +define('ADMIN_CONFIG_SURFBAR_AUTOSTART', "Surfbar soll nach Ruhezeit automatisch starten?"); define('ADMIN_SURFBAR_NOTIFY_UNLOCK_YES', "Ja, Admin(s) informieren."); define('ADMIN_SURFBAR_NOTIFY_UNLOCK_NO', "Nein, nicht informieren."); define('ADMIN_SURFBAR_NO_REF_LEVELS_FOUND', "Zur Zeit sind keine Referal-Ebenen für die Surfbar eingestellt.
\nBitte installieren Sie die Erweiterung surfbar neu."); diff --git a/inc/modules/admin/what-config_surfbar.php b/inc/modules/admin/what-config_surfbar.php index 6ad36f950f..c986d658fe 100644 --- a/inc/modules/admin/what-config_surfbar.php +++ b/inc/modules/admin/what-config_surfbar.php @@ -84,6 +84,17 @@ if (isset($_POST['ok'])) { define('__CONFIG_SURFBAR_NOTIFY_ADMIN_UNLOCK_N', " checked=\"checked\""); } + // Prepare auto-sart + if ($_CONFIG['surfbar_autostart'] == "Y") { + // Yes selected + define('__CONFIG_SURFBAR_AUTOSTART_Y' , " checked=\"checked\""); + define('__CONFIG_SURFBAR_AUTOSTART_N', ""); + } else { + // No selected + define('__CONFIG_SURFBAR_AUTOSTART_Y' , ""); + define('__CONFIG_SURFBAR_AUTOSTART_N', " checked=\"checked\""); + } + // Load template LOAD_TEMPLATE("admin_config_surfbar", false, $content); } diff --git a/surfbar.php b/surfbar.php index 677c2c1c15..cc01a06f8d 100644 --- a/surfbar.php +++ b/surfbar.php @@ -77,8 +77,9 @@ if (defined('mxchange_installed') && (isBooleanConstantAndTrue('mxchange_install } else { // Prepare content $content = array( - 'restart' => $_CONFIG['surfbar_restart_time'], - 'start' => str_repeat("X", strlen($_CONFIG['surfbar_restart_time'])) + 'restart' => $_CONFIG['surfbar_restart_time'], + 'start' => str_repeat("X", strlen($_CONFIG['surfbar_restart_time'])), + 'autostart' => ($_CONFIG['surfbar_autostart'] == "Y") ? "true" : "false" ); // Load template for stopped surfbar @@ -136,10 +137,7 @@ if (defined('mxchange_installed') && (isBooleanConstantAndTrue('mxchange_install // Update salt (double-call lock!) SURFBAR_UPDATE_SALT(); - } else { - // Change template name - $templateName = "surfbar_stopped"; - } + } // END - if } else { // Load header in frameset mode $isFrameset = true; diff --git a/templates/de/html/admin/admin_config_surfbar.tpl b/templates/de/html/admin/admin_config_surfbar.tpl index ec4b622606..bb9ffa5c89 100644 --- a/templates/de/html/admin/admin_config_surfbar.tpl +++ b/templates/de/html/admin/admin_config_surfbar.tpl @@ -104,6 +104,20 @@ {--ADMIN_SURFBAR_NOTIFY_UNLOCK_NO--} +   +   + + + {--ADMIN_CONFIG_SURFBAR_AUTOSTART--} + + +   + + + {--YES--} + {--NO--} + +   diff --git a/templates/de/html/surfbar/surfbar_stopped.tpl b/templates/de/html/surfbar/surfbar_stopped.tpl index 9e39f077fe..d08da48a3f 100644 --- a/templates/de/html/surfbar/surfbar_stopped.tpl +++ b/templates/de/html/surfbar/surfbar_stopped.tpl @@ -1,26 +1,39 @@
-
+
Surfbar angehalten!
- Keine URLs mehr verfürgbar oder Datenbankfehler liegt vor.
- Neustart in $content[start] Sekunden +
+ Keine URLs mehr verfürgbar oder Datenbankfehler liegt vor.
+ Neustart in $content[start] Sekunden +
\ No newline at end of file +