Start of surfbar slowed down by halt second
authorRoland Häder <roland@mxchange.org>
Sat, 6 Sep 2008 17:33:52 +0000 (17:33 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 6 Sep 2008 17:33:52 +0000 (17:33 +0000)
surfbar.php
templates/de/html/surfbar/surfbar_frame_top.tpl

index d2f9433..56bcf8c 100644 (file)
@@ -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']);
index 0717db8..5562d97 100644 (file)
@@ -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();
 
 //-->