issue112, preload previous and next photo in single-photo view
authorAndreas Unterkircher <unki@netshadow.at>
Sat, 29 Mar 2008 10:44:51 +0000 (11:44 +0100)
committerAndreas Unterkircher <unki@netshadow.at>
Sat, 29 Mar 2008 10:44:51 +0000 (11:44 +0100)
Signed-off-by: Andreas Unterkircher <unki@netshadow.at>
phpfspot.class.php
themes/default/templates/single_photo.tpl

index be752eedda5fbd7368de4f6d5a08535a2790c3b2..3b4a62e9166abc2a420de0780bcd9b4fea7cb60f 100644 (file)
@@ -546,6 +546,7 @@ class PHPFSPOT {
          $this->tmpl->assign('next_img', $next_img);
       }
       $this->tmpl->assign('mini_width', $this->cfg->mini_width);
+      $this->tmpl->assign('photo_width', $this->cfg->photo_width);
       $this->tmpl->assign('photo_number', $i);
       $this->tmpl->assign('photo_count', count($all_photos));
 
index ea513d9c851d44490078837f56f2ac7b99e63451..a16776e186373db45c040add5ba2c46100cc7785 100644 (file)
 <!--
    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 -->