From 532850ed047e0f35268eb1a5d4cf85c80f228dc5 Mon Sep 17 00:00:00 2001 From: Kate Arzamastseva Date: Thu, 23 Jun 2011 13:13:34 +0300 Subject: media getting metadata fix --- lib/tpl/default/detail.php | 46 ++++++++++++++++++++++------------------------ 1 file changed, 22 insertions(+), 24 deletions(-) (limited to 'lib/tpl/default') diff --git a/lib/tpl/default/detail.php b/lib/tpl/default/detail.php index 4f42b116e..f61ede043 100644 --- a/lib/tpl/default/detail.php +++ b/lib/tpl/default/detail.php @@ -52,30 +52,28 @@ if (!defined('DOKU_INC')) die();
'.$lang['img_date'].':
'.dformat($t).'
'; - - $t = tpl_img_getTag('File.Name'); - if($t) print '
'.$lang['img_fname'].':
'.hsc($t).'
'; - - $t = tpl_img_getTag(array('Iptc.Byline','Exif.TIFFArtist','Exif.Artist','Iptc.Credit')); - if($t) print '
'.$lang['img_artist'].':
'.hsc($t).'
'; - - $t = tpl_img_getTag(array('Iptc.CopyrightNotice','Exif.TIFFCopyright','Exif.Copyright')); - if($t) print '
'.$lang['img_copyr'].':
'.hsc($t).'
'; - - $t = tpl_img_getTag('File.Format'); - if($t) print '
'.$lang['img_format'].':
'.hsc($t).'
'; - - $t = tpl_img_getTag('File.NiceSize'); - if($t) print '
'.$lang['img_fsize'].':
'.hsc($t).'
'; - - $t = tpl_img_getTag('Simple.Camera'); - if($t) print '
'.$lang['img_camera'].':
'.hsc($t).'
'; - - $t = tpl_img_getTag(array('IPTC.Keywords','IPTC.Category','xmp.dc:subject')); - if($t) print '
'.$lang['img_keywords'].':
'.hsc($t).'
'; - + static $tags = null; + if(is_null($tags)){ + foreach (array('default','local') as $config_group) { + if (empty($config_cascade['mediameta'][$config_group])) continue; + foreach ($config_cascade['mediameta'][$config_group] as $config_file) { + if(@file_exists($config_file)){ + include($config_file); + } + } + } + } + foreach($tags as $key => $tag){ + $t = $tag[0]; + if (!is_array($t)) $t = array($tag[0]); + $value = tpl_img_getTag($t); + if ($value) { + echo '
'.$lang[$tag[1]].':
'; + if ($tag[2] == 'text') echo hsc($value); + if ($tag[2] == 'date') echo dformat($value); + echo '
'; + } + } ?>
-- cgit v1.2.3