From 36df6fa3069d55db3c35724c4f465bde9c50b53a Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 31 Jul 2005 18:35:54 +0200 Subject: image metadata editor This patch adds an meta data editor for JPEG files. Currently title, caption, artist, copyright and keywords can be saved. The data is saved to the apropriate IPTC fields. Additional fields can be added in the appropriate template. Compatibility testing with other programs is needed! darcs-hash:20050731163554-7ad00-dd936ec19549203dcf72de8774309c0b17d0b679.gz --- inc/template.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'inc/template.php') diff --git a/inc/template.php b/inc/template.php index 23123b452..b48a591f8 100644 --- a/inc/template.php +++ b/inc/template.php @@ -665,12 +665,21 @@ function tpl_mediafilelist(){ $t = $item['meta']->getField('IPTC.Headline'); if($t) print ''.$t.'
'; - $t = $item['meta']->getField(array('IPTC.Caption','EXIF.UserComment','EXIF.TIFFImageDescription','EXIF.TIFFUserComment')); + $t = $item['meta']->getField(array('IPTC.Caption','EXIF.UserComment', + 'EXIF.TIFFImageDescription', + 'EXIF.TIFFUserComment')); if($t) print $t.'
'; $t = $item['meta']->getField(array('IPTC.Keywords','IPTC.Category')); if($t) print ''.$t.'
'; + //add edit button + if($AUTH >= AUTH_UPLOAD && $item['meta']->getField('File.Mime') == 'image/jpeg'){ + print ''; + print ''.$lang['metaedit'].''; + print ''; + } + ptln('',6); }else{ ptln ('('.filesize_h($item['size']).')',6); @@ -771,7 +780,7 @@ function tpl_pagetitle($id=null){ * and _iptcTagNames() in inc/jpeg.php (You need to prepend IPTC * to the names of the latter one) * - * Only allowed in: detail.php + * Only allowed in: detail.php, mediaedit.php * * @author Andreas Gohr */ -- cgit v1.2.3