From: Roland Häder Date: Sat, 6 Sep 2008 17:33:52 +0000 (+0000) Subject: Start of surfbar slowed down by halt second X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=commitdiff_plain;h=672960ce174197d184887e6bd280f9174cf76050 Start of surfbar slowed down by halt second --- diff --git a/surfbar.php b/surfbar.php index d2f943308d..56bcf8ccf7 100644 --- a/surfbar.php +++ b/surfbar.php @@ -64,7 +64,13 @@ if (defined('mxchange_installed') && (isBooleanConstantAndTrue('mxchange_install require_once(PATH."inc/header.php"); // Load template - LOAD_TEMPLATE("surfbar_stopped"); + if ((isset($_GET['frame'])) && ($_GET['frame'] == "start")) { + // Load template for "start" page + LOAD_TEMPLATE("surfbar_frame_start"); + } else { + // Load template for stopped surfbar + LOAD_TEMPLATE("surfbar_stopped"); + } } elseif ((isset($_GET['check'])) && (isset($_GET['id'])) && (isset($_GET['salt']))) { // Dummy next id get SURFBAR_GET_NEXT_ID($_GET['id']); diff --git a/templates/de/html/surfbar/surfbar_frame_top.tpl b/templates/de/html/surfbar/surfbar_frame_top.tpl index 0717db8ce3..5562d97ce3 100644 --- a/templates/de/html/surfbar/surfbar_frame_top.tpl +++ b/templates/de/html/surfbar/surfbar_frame_top.tpl @@ -25,7 +25,7 @@ var countDown = null; function Init() { countDown = window.setInterval("StartCounter()", 1000); - parent.surfbar_url.location.href = "$content[url]"; + window.setTimeout("InitCounter()", 500); } function Confirm() { @@ -36,6 +36,11 @@ function ReloadThis() { this.location.reload(); } +function InitCounter() { + parent.surfbar_url.location.href = "$content[url]"; + counter.innerHTML = $content[reload]; +} + function StartCounter() { if (currCounter < 1) { return false; @@ -51,7 +56,6 @@ function StartCounter() { } } -counter.innerHTML = $content[reload]; Init(); //-->