summaryrefslogtreecommitdiffstats
path: root/phpfspot.class.php
diff options
context:
space:
mode:
authorAndreas Unterkircher <unki@netshadow.at>2007-07-01 11:58:41 +0000
committerAndreas Unterkircher <unki@netshadow.at>2007-07-01 11:58:41 +0000
commit4c5aa67169b34a02bd7c3b482f178cb93f6700f9 (patch)
tree73993c944eb29960761b2c7356f723bcda36e253 /phpfspot.class.php
parent5d397db3e6ff4dc02bf989bb64945e990d2c9da2 (diff)
issue20, use <a>-anchor to directly jump to the right photo in photo index view
git-svn-id: file:///var/lib/svn/phpfspot/trunk@156 fa6a889d-dae6-447d-9e79-4ba9a3039384
Diffstat (limited to 'phpfspot.class.php')
-rw-r--r--phpfspot.class.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/phpfspot.class.php b/phpfspot.class.php
index 980dc81..ca5f7b4 100644
--- a/phpfspot.class.php
+++ b/phpfspot.class.php
@@ -399,6 +399,8 @@ class PHPFSPOT {
$count = count($photos);
+ $anchor = $_SESSION['begin_with'];
+
if(!isset($this->cfg->rows_per_page) || $this->cfg->rows_per_page == 0) {
$begin_with = 0;
@@ -435,10 +437,12 @@ class PHPFSPOT {
$images[$rows] = Array();
$img_height[$rows] = Array();
$img_width[$rows] = Array();
+ $img_id[$rows] = Array();
for($i = $begin_with; $i < $end_with; $i++) {
$images[$rows][$cols] = $photos[$i];
+ $img_id[$rows][$cols] = $i;
$thumb_path = $this->cfg->base_path ."/thumbs/". $this->cfg->thumb_width ."_". $this->getMD5($photos[$i]);
@@ -535,10 +539,13 @@ class PHPFSPOT {
$this->tmpl->assign('images', $images);
$this->tmpl->assign('img_width', $img_width);
$this->tmpl->assign('img_height', $img_height);
+ $this->tmpl->assign('img_id', $img_id);
$this->tmpl->assign('rows', $rows);
$this->tmpl->assign('columns', $this->cfg->thumbs_per_row);
+
$this->tmpl->show("photo_index.tpl");
+ print "<script language=\"JavaScript\">self.location.hash = '#image". $anchor ."';</script>\n";
} // showPhotoIndex()