diff options
-rw-r--r-- | phpfspot.js | 11 | ||||
-rw-r--r-- | templates/single_photo.tpl | 5 |
2 files changed, 12 insertions, 4 deletions
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} </td> <td class="index_header" style="text-align: right;"> + <a href="javascript:autoBrowse();"><img src="resources/slideshow.png" /></a> {if $extern_link } <a href="{$extern_link}" title="Use this link to return to the current view"><img src="resources/link.png" /></a> {/if} @@ -58,7 +59,7 @@ { if $next_url == "" } <img src="resources/arrow_right_gray.png" alt="last photo reached" /> { else } - <a href="{$next_url}" onclick="click(this);"> + <a href="{$next_url}" onclick="click(this);" id="next_img" > <img src="resources/arrow_right.png" alt="next photo" /> </a> { /if} @@ -98,7 +99,7 @@ { /if} { if $next_img } <u><img src="resources/photo.png" alt="photo icon" /> Next:</u><br /> - <a href="{$next_url}" onclick="click(this);"> + <a href="{$next_url}" onclick="click(this);" id="next_link"> <img src="phpfspot_img.php?idx={$next_img}&width={$mini_width}" /><br /> </a> { /if} |