diff options
author | Andreas Gohr <andi@splitbrain.org> | 2005-07-24 22:11:11 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2005-07-24 22:11:11 +0200 |
commit | 6d861d1222d72bacbb7723f9df05548c76cca967 (patch) | |
tree | 7f344333faa7b41d2fe17481d126c8a92aa7173d /inc/template.php | |
parent | 2684e50a0796d39e424969890c16eb97a8838151 (diff) | |
download | rpg-6d861d1222d72bacbb7723f9df05548c76cca967.tar.gz rpg-6d861d1222d72bacbb7723f9df05548c76cca967.tar.bz2 |
EXIF/IPTC metadata in media popup
darcs-hash:20050724201111-7ad00-81e8de6162b0e0923c08dcc7b8c750cd604c4dfd.gz
Diffstat (limited to 'inc/template.php')
-rw-r--r-- | inc/template.php | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/inc/template.php b/inc/template.php index 3a86930be..90fbe5a32 100644 --- a/inc/template.php +++ b/inc/template.php @@ -612,15 +612,28 @@ function tpl_mediafilelist(){ ptln('('.$w.'×'.$h.' '.filesize_h($item['size']).')',6); ptln($del.'<br />',6); + ptln('<div class="meta">',6); ptln('<a href="javascript:mediaSelect(\''.$item['id'].'\')">'); if($w>120){ - print '<img src="'.DOKU_BASE.'lib/exe/fetch.php?w=120&media='.urlencode($item['id']).'" width="120" />'; + print '<img src="'.DOKU_BASE.'lib/exe/fetch.php?w=120&media='.urlencode($item['id']).'" width="120" class="thumb" />'; }else{ - print '<img src="'.DOKU_BASE.'lib/exe/fetch.php?media='.urlencode($item['id']).'" width="'.$w.'" height="'.$h.'" />'; + print '<img src="'.DOKU_BASE.'lib/exe/fetch.php?media='.urlencode($item['id']).'" width="'.$w.'" height="'.$h.'" class="thumb" />'; } print '</a>'; + + //read EXIF/IPTC data + $meta = new JpegMeta(mediaFN($item['id'])); + $t = $meta->getField('IPTC.Headline'); + if($t) print '<b>'.$t.'</b><br />'; + $t = $meta->getField(array('IPTC.Caption','EXIF.UserComment','EXIF.TIFFImageDescription','EXIF.TIFFUserComment')); + if($t) print $t.'<br />'; + + $t = $meta->getField(array('IPTC.Keywords','IPTC.Category')); + if($t) print '<i>'.$t.'</i><br />'; + + ptln('</div>',6); }else{ ptln ('('.filesize_h($item['size']).')',6); ptln($del,6); |