From 672960ce174197d184887e6bd280f9174cf76050 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 6 Sep 2008 17:33:52 +0000 Subject: [PATCH] Start of surfbar slowed down by halt second --- surfbar.php | 8 +++++++- templates/de/html/surfbar/surfbar_frame_top.tpl | 8 ++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) 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(); //--> -- 2.30.2