diff options
Diffstat (limited to 'themes')
-rw-r--r-- | themes/default/templates/photo_index.tpl | 17 | ||||
-rw-r--r-- | themes/default/templates/single_photo.tpl | 7 |
2 files changed, 21 insertions, 3 deletions
diff --git a/themes/default/templates/photo_index.tpl b/themes/default/templates/photo_index.tpl index 1a1a188..bf235d3 100644 --- a/themes/default/templates/photo_index.tpl +++ b/themes/default/templates/photo_index.tpl @@ -50,7 +50,7 @@ <div class="thumb" onmouseover="setBackGrdColor(this, 'mouseover');" onmouseout="setBackGrdColor(this, 'mouseout');" style="width: { $thumb_container_width }px; height: { $thumb_container_height }px;"> <a href="javascript:showImage({$images[thumb]}, 'scrollup');" id="thumblink{$images[thumb]}" name="image{$img_id[thumb]}" class="thumblink" onclick="click(this);" title="{$img_title[thumb]}"> - <img class="thumb" id="thumbimg{$images[thumb]}" src="phpfspot_img.php?idx={$images[thumb]}&width={$width}" alt="thumb_{$images[thumb]}" width="{$img_width[thumb]}" height="{$img_height[thumb]}" /> + <img class="thumb" id="thumbimg{$images[thumb]}" width="{$img_width[thumb]}" height="{$img_height[thumb]}" /> <br /> {$img_name[thumb]} </a> @@ -101,9 +101,20 @@ </div> </div> <br class="clearboth" /> -<script type="text/javascript"> +<script type="text/javascript" language="JavaScript"> <!-- - preloadPhotos(); + { counter start=-1 } + + var current; + var image_urls = new Array(); + + {section name="thumb" loop=$thumbs step=1} + {if $images[thumb] } + image_urls[{counter}] = 'phpfspot_img.php?idx={$images[thumb]}&width={$width}'; + {/if} + {/section} + + preloadPhotos(image_urls); --> </script> <!-- /Photo Index --> diff --git a/themes/default/templates/single_photo.tpl b/themes/default/templates/single_photo.tpl index ea513d9..a16776e 100644 --- a/themes/default/templates/single_photo.tpl +++ b/themes/default/templates/single_photo.tpl @@ -103,6 +103,13 @@ <!-- if(autobrowse && document.getElementById("autobrowse_ico")) document.getElementById("autobrowse_ico").src = 'resources/32_pause.png'; + + /* lets preload to previous and the next image to speedup */ + var image_next = new Image(); + image_next.src = "phpfspot_img.php?idx={$next_img}&width={$photo_width}"; + var image_prev = new Image(); + image_prev.src = "phpfspot_img.php?idx={$prev_img}&width={$photo_width}"; + --> </script> <!-- /Single photo --> |