From: Andreas Unterkircher Date: Sat, 21 Jul 2007 16:16:23 +0000 (+0000) Subject: issue56, auto switch in single photo view X-Git-Tag: phpfspot-1.2~102 X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=phpfspot.git;a=commitdiff_plain;h=70704d20a135f84e7d18072a883807ca5642b1f2 issue56, auto switch in single photo view git-svn-id: file:///var/lib/svn/phpfspot/trunk@233 fa6a889d-dae6-447d-9e79-4ba9a3039384 --- diff --git a/phpfspot.js b/phpfspot.js index 9e1a932..06f20e0 100644 --- a/phpfspot.js +++ b/phpfspot.js @@ -304,16 +304,23 @@ function startSlideShow() { HTML_AJAX.grab(encodeURI('rpc.php?action=reset_slideshow')); nextSlide(); + setInterval("nextSlide()", 3000); } function nextSlide() { next_img = HTML_AJAX.grab(encodeURI('rpc.php?action=get_next_slideshow_img')); document.getElementById('slide_img').src = next_img; - setTimeout("nextSlide()", 3000); } +function autoBrowse() +{ + var next_link = document.getElementById('next_link').href; + window.location.href = next_link; + setTimeout("autoBrowse()", 5000); +} + var startup = 1; var calendar_shown = 0; var calendar_mode = ''; - +var autobrowse = 0; diff --git a/templates/single_photo.tpl b/templates/single_photo.tpl index 0d04e17..bb8c917 100644 --- a/templates/single_photo.tpl +++ b/templates/single_photo.tpl @@ -16,6 +16,7 @@ {/if} + {if $extern_link } {/if} @@ -58,7 +59,7 @@ { if $next_url == "" } last photo reached { else } - + next photo { /if} @@ -98,7 +99,7 @@ { /if} { if $next_img } photo icon Next:
- +
{ /if}