diff options
-rw-r--r-- | phpfspot.class.php | 4 | ||||
-rw-r--r-- | phpfspot_cfg.php.dist | 1 | ||||
-rw-r--r-- | templates/single_photo.tpl | 13 |
3 files changed, 18 insertions, 0 deletions
diff --git a/phpfspot.class.php b/phpfspot.class.php index 92a0199..15d1302 100644 --- a/phpfspot.class.php +++ b/phpfspot.class.php @@ -217,11 +217,14 @@ class PHPFSPOT { if($previous_img) { $this->tmpl->assign('previous_url', "javascript:showImage(". $previous_img .");"); + $this->tmpl->assign('prev_img', $previous_img); } if($next_img) { $this->tmpl->assign('next_url', "javascript:showImage(". $next_img .");"); + $this->tmpl->assign('next_img', $next_img); } + $this->tmpl->assign('mini_width', $this->cfg->mini_width); $this->tmpl->show("single_photo.tpl"); @@ -798,6 +801,7 @@ class PHPFSPOT { $this->cfg->thumb_width, $this->cfg->bubble_width, $this->cfg->photo_width, + $this->cfg->mini_width, ); /* get details from F-Spot's database */ diff --git a/phpfspot_cfg.php.dist b/phpfspot_cfg.php.dist index ecb45ac..6547553 100644 --- a/phpfspot_cfg.php.dist +++ b/phpfspot_cfg.php.dist @@ -23,6 +23,7 @@ class PHPFSPOT_CFG { var $thumb_width = "150"; var $bubble_width = "200"; var $photo_width = "640"; + var $mini_width = "100"; /* how many columns in the photo index view */ var $thumbs_per_row = 4; diff --git a/templates/single_photo.tpl b/templates/single_photo.tpl index 5ad2450..5b5c7ac 100644 --- a/templates/single_photo.tpl +++ b/templates/single_photo.tpl @@ -77,6 +77,19 @@ <a class="smalltag" href="javascript:Tags('add', '{$id}');" onclick="click(this);" onclick="click(this);">{$name}</a><br /> { /foreach } { /if } + <br /> + { if $prev_img } + <u>Previous:</u><br /> + <a href="{$previous_url}" onclick="click(this);"> + <img src="phpfspot_img.php?idx={$prev_img}&width={$mini_width}" /><br /> + </a> + { /if} + { if $next_img } + <u>Next:</u><br /> + <a href="{$next_url}" onclick="click(this);"> + <img src="phpfspot_img.php?idx={$next_img}&width={$mini_width}" /><br /> + </a> + { /if} </div> </td> </tr> |