From 6d861d1222d72bacbb7723f9df05548c76cca967 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 24 Jul 2005 22:11:11 +0200 Subject: EXIF/IPTC metadata in media popup darcs-hash:20050724201111-7ad00-81e8de6162b0e0923c08dcc7b8c750cd604c4dfd.gz --- inc/template.php | 17 +++++++++++++++-- lib/exe/media.php | 1 + lib/tpl/default/design.css | 18 ++++++++++++++++++ 3 files changed, 34 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.'
',6); + ptln('
',6); ptln(''); if($w>120){ - print ''; + print ''; }else{ - print ''; + print ''; } print ''; + + //read EXIF/IPTC data + $meta = new JpegMeta(mediaFN($item['id'])); + $t = $meta->getField('IPTC.Headline'); + if($t) print ''.$t.'
'; + $t = $meta->getField(array('IPTC.Caption','EXIF.UserComment','EXIF.TIFFImageDescription','EXIF.TIFFUserComment')); + if($t) print $t.'
'; + + $t = $meta->getField(array('IPTC.Keywords','IPTC.Category')); + if($t) print ''.$t.'
'; + + ptln('
',6); }else{ ptln ('('.filesize_h($item['size']).')',6); ptln($del,6); diff --git a/lib/exe/media.php b/lib/exe/media.php index e824150f3..14474cb0c 100644 --- a/lib/exe/media.php +++ b/lib/exe/media.php @@ -5,6 +5,7 @@ require_once(DOKU_INC.'inc/lang/en/lang.php'); require_once(DOKU_INC.'inc/lang/'.$conf['lang'].'/lang.php'); require_once(DOKU_INC.'inc/html.php'); + require_once(DOKU_INC.'inc/JpegMeta.php'); require_once(DOKU_INC.'inc/search.php'); require_once(DOKU_INC.'inc/template.php'); require_once(DOKU_INC.'inc/auth.php'); diff --git a/lib/tpl/default/design.css b/lib/tpl/default/design.css index 81558b4d2..41a34dd5f 100644 --- a/lib/tpl/default/design.css +++ b/lib/tpl/default/design.css @@ -700,3 +700,21 @@ dl.img_tags dt { dl.img_tags dd { background-color: #f5f5f5; } + +div.meta { + color: #666; + font-size: 70%; + line-height: 95%; +} + +div.meta img.thumb{ + float:left; + margin-right: 0.1em; +} + +/* -------------- Media Popup ---------------------- */ + +div.mediaselect-right li, div.uploadform { + clear: both; +} + -- cgit v1.2.3