issue118, jumpin to a specific starting point in the photo-index
authorAndreas Unterkircher <unki@netshadow.at>
Tue, 13 May 2008 04:28:58 +0000 (06:28 +0200)
committerAndreas Unterkircher <unki@netshadow.at>
Tue, 13 May 2008 04:28:58 +0000 (06:28 +0200)
Signed-off-by: Andreas Unterkircher <unki@netshadow.at>
phpfspot.class.php

index 00b3af4a08f402fedcaf6e1ba162adf6c30bce3c..0e2ea44b7cd9ae92fcd8cbc04d13f2fced4f0228 100644 (file)
@@ -1294,7 +1294,16 @@ class PHPFSPOT {
             else
                $style = "";
 
-            $select = "<a href=\"javascript:showPhotoIndex(". (($i*$photo_per_page)-$photo_per_page) .");\"";
+            $start_with = ($i*$photo_per_page)-$photo_per_page;
+
+            if($this->is_user_friendly_url()) {
+               $select = "<a href=\"". $this->cfg->web_path ."/tag/205/". $start_with ."\"";
+            }
+            else {
+               $select = "<a href=\"". $this->cfg->web_path ."/index.php?mode=showpi&nbsp;tags=". $current_tags ."&nbsp;begin_with=". $begin_with ."\"";
+            }
+            $select.= " onclick=\"showPhotoIndex(". $start_with ."); return false;\"";
+
                if($style != "")
                   $select.= $style;
             $select.= ">". $i ."</a>&nbsp;";
@@ -3133,6 +3142,8 @@ class PHPFSPOT {
                   $this->session_cleanup();
                   $_GET['tags'] = $options[2];
                   $_SESSION['selected_tags'] = Array($options[2]);
+                  if(isset($options[3]) && is_numeric($options[3]))
+                     $_SESSION['begin_with'] = $options[3];
                   return $this->showPhotoIndex();
                }
                break;