summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpfspot.class.php2
-rw-r--r--templates/single_photo.tpl12
2 files changed, 13 insertions, 1 deletions
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 @@
<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 }