From: Andreas Unterkircher Date: Sat, 21 Jul 2007 07:34:27 +0000 (+0000) Subject: issue57, display photo counter in single photo view X-Git-Tag: phpfspot-1.2~107 X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4079ac52ab60d1d48bd79514d62955b3ee4ebe5e;p=phpfspot.git issue57, display photo counter in single photo view git-svn-id: file:///var/lib/svn/phpfspot/trunk@228 fa6a889d-dae6-447d-9e79-4ba9a3039384 --- diff --git a/phpfspot.class.php b/phpfspot.class.php index 25d144c..2df0250 100644 --- a/phpfspot.class.php +++ b/phpfspot.class.php @@ -361,6 +361,8 @@ class PHPFSPOT { $this->tmpl->assign('next_img', $next_img); } $this->tmpl->assign('mini_width', $this->cfg->mini_width); + $this->tmpl->assign('photo_number', $i); + $this->tmpl->assign('photo_count', count($all_photos)); $this->tmpl->show("single_photo.tpl"); diff --git a/templates/single_photo.tpl b/templates/single_photo.tpl index 8dfd433..0d04e17 100644 --- a/templates/single_photo.tpl +++ b/templates/single_photo.tpl @@ -3,7 +3,17 @@ Photo {$image_name}
-  {$description}
+ {if $photo_count > 0} + {$photo_number} of {$photo_count} + {if $photo_count == 1} + Photo + {else} + Photos + {/if} + {if $description} +  {$description}
+ {/if} + {/if} {if $extern_link }