issue57, display photo counter in single photo view
authorAndreas Unterkircher <unki@netshadow.at>
Sat, 21 Jul 2007 07:34:27 +0000 (07:34 +0000)
committerAndreas Unterkircher <unki@netshadow.at>
Sat, 21 Jul 2007 07:34:27 +0000 (07:34 +0000)
git-svn-id: file:///var/lib/svn/phpfspot/trunk@228 fa6a889d-dae6-447d-9e79-4ba9a3039384

phpfspot.class.php
templates/single_photo.tpl

index 25d144c2dcbe255b0cd7270b1090b13946d1c8a2..2df02508df014e28fee09c55c70d92c8d29678f4 100644 (file)
@@ -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");
 
index 8dfd4336005e52900aa31dc4d7d47d8981f5c999..0d04e17c2d4adb56672b0c1de7a45cae9ba2901f 100644 (file)
@@ -3,7 +3,17 @@
  <tr>
   <td class="content_title" style="text-align: left;">
    <b>Photo {$image_name}</b><br />
-   &nbsp;{$description}<br />
+   {if $photo_count > 0}
+    {$photo_number} of {$photo_count}
+    {if $photo_count == 1}
+     Photo
+    {else}
+     Photos
+    {/if}
+    {if $description}
+     &nbsp;{$description}<br />
+    {/if}
+   {/if}
   </td>
   <td class="index_header" style="text-align: right;">
    {if $extern_link }