summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Unterkircher <unki@netshadow.at>2008-01-06 09:46:08 +0100
committerAndreas Unterkircher <unki@netshadow.at>2008-01-06 09:46:08 +0100
commit1a39ed73420a13f0728360a186a5c140a7d852ee (patch)
tree5845f37c3e9080d1509cebb1c71355357b37b249
parenta8c8bd8ee5c29db5512230eaeb65e44794e21b89 (diff)
issue92, fill alt-attribute with filename
Signed-off-by: Andreas Unterkircher <unki@netshadow.at>
-rw-r--r--phpfspot.class.php39
-rw-r--r--themes/default/stylesheet.css1
-rw-r--r--themes/default/templates/single_photo.tpl2
3 files changed, 20 insertions, 22 deletions
diff --git a/phpfspot.class.php b/phpfspot.class.php
index 0ce7393..b9ed198 100644
--- a/phpfspot.class.php
+++ b/phpfspot.class.php
@@ -472,30 +472,29 @@ class PHPFSPOT {
$this->tmpl->assign('extern_link', $extern_link);
- if(file_exists($thumb_path)) {
+ if(!file_exists($thumb_path)) {
+ $this->_error("Can't open file ". $thumb_path ."\n");
+ return;
+ }
- $info = getimagesize($thumb_path);
+ $info = getimagesize($thumb_path);
- $this->tmpl->assign('description', $details['description']);
- $this->tmpl->assign('image_name', $this->parse_uri($details['uri'], 'filename'));
+ $this->tmpl->assign('description', $details['description']);
+ $this->tmpl->assign('image_name', $this->parse_uri($details['uri'], 'filename'));
- $this->tmpl->assign('width', $info[0]);
- $this->tmpl->assign('height', $info[1]);
- $this->tmpl->assign('ExifMadeOn', $meta_date);
- $this->tmpl->assign('ExifMadeWith', $meta_make);
- $this->tmpl->assign('ExifOrigResolution', $meta_res);
- $this->tmpl->assign('ExifFileSize', $meta_size);
-
- $this->tmpl->assign('image_url', 'phpfspot_img.php?idx='. $photo ."&amp;width=". $this->cfg->photo_width);
- $this->tmpl->assign('image_url_full', 'phpfspot_img.php?idx='. $photo);
+ $this->tmpl->assign('width', $info[0]);
+ $this->tmpl->assign('height', $info[1]);
+ $this->tmpl->assign('ExifMadeOn', $meta_date);
+ $this->tmpl->assign('ExifMadeWith', $meta_make);
+ $this->tmpl->assign('ExifOrigResolution', $meta_res);
+ $this->tmpl->assign('ExifFileSize', $meta_size);
+
+ $this->tmpl->assign('image_url', 'phpfspot_img.php?idx='. $photo ."&amp;width=". $this->cfg->photo_width);
+ $this->tmpl->assign('image_url_full', 'phpfspot_img.php?idx='. $photo);
+ $this->tmpl->assign('image_filename', $this->parse_uri($details['uri'], 'filename'));
- $this->tmpl->assign('tags', $this->get_photo_tags($photo));
- $this->tmpl->assign('current', $current);
- }
- else {
- $this->_error("Can't open file ". $thumb_path ."\n");
- return;
- }
+ $this->tmpl->assign('tags', $this->get_photo_tags($photo));
+ $this->tmpl->assign('current', $current);
if($previous_img) {
$this->tmpl->assign('previous_url', "javascript:showImage(". $previous_img .");");
diff --git a/themes/default/stylesheet.css b/themes/default/stylesheet.css
index 7550311..3239fe3 100644
--- a/themes/default/stylesheet.css
+++ b/themes/default/stylesheet.css
@@ -95,7 +95,6 @@ img {
border: none;
}
-
a {
font-size: 14px;
color: #008200;
diff --git a/themes/default/templates/single_photo.tpl b/themes/default/templates/single_photo.tpl
index 39e3bf4..d7ab987 100644
--- a/themes/default/templates/single_photo.tpl
+++ b/themes/default/templates/single_photo.tpl
@@ -68,7 +68,7 @@
{ else }
<a href="{$next_url}" onclick="click(this);" title="click for the next photo">
{ /if }
- <img src="{$image_url}" width="{$width}" height="{$height}" alt="photo" />
+ <img src="{$image_url}" width="{$width}" height="{$height}" alt="{$image_filename}" />
</a>
</div>