1<?php 2/** 3 * DokuWiki DokuKIT Template 4 * 5 * This is the template for displaying image details 6 * 7 * @link http://dokuwiki.org/templates 8 * @link http://wiki.splitbrain.org/wiki:tpl:templates 9 * @author Andreas Gohr <andi@splitbrain.org> 10 * @author Klaus Vormweg <klaus.vormweg@gmx.de> 11 */ 12 13// must be run from within DokuWiki 14if (!defined('DOKU_INC')) die(); 15echo '<!DOCTYPE html> 16<html lang="', $conf['lang'], '" dir="ltr"> 17<head> 18 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 19 <title>', hsc(tpl_img_getTag('IPTC.Headline',$IMG)), ' [', strip_tags($conf['title']),'] 20 </title> 21'; 22tpl_metaheaders(); 23echo ' 24 <link rel="shortcut icon" href="', DOKU_TPL, 'images/favicon.ico" /> 25</head> 26<body> 27<div class="dokuwiki"> 28'; 29html_msgarea(); 30echo ' 31 <div class="page" style="margin-left: 1em;"> 32'; 33if($ERROR) { 34 print $ERROR; 35} else { 36 echo ' 37 <h1>', hsc(tpl_img_getTag('IPTC.Headline',$IMG)), '</h1> 38 <div class="img_big"> 39'; 40 tpl_img(900,500); 41 echo ' <p class="img_caption">'; 42 print nl2br(hsc(tpl_img_getTag('simple.title'))); 43 echo '</p> 44'; 45 echo ' </div> 46 <div class="img_detail"> 47 <dl class="img_tags"> 48'; 49 $config_files = getConfigFiles('mediameta'); 50 foreach ($config_files as $config_file) { 51 if(@file_exists($config_file)) include($config_file); 52 } 53 54 foreach($fields as $key => $tag){ 55 $t = array(); 56 if (!empty($tag[0])) $t = array($tag[0]); 57 if(is_array($tag[3])) $t = array_merge($t,$tag[3]); 58 $value = tpl_img_getTag($t); 59 if ($value) { 60 echo '<dt>'.$lang[$tag[1]].':</dt><dd>'; 61 if ($tag[2] == 'date') echo dformat($value); 62 else echo hsc($value); 63 echo '</dd>'; 64 } 65 } 66 echo ' 67 </dl> 68 </div> 69'; 70 echo ' <p class="img_footer">← ', $lang['img_backto'], ' '; 71 tpl_pagelink($ID); 72 echo '</p> 73'; 74 $imgNS = getNS($IMG); 75 $authNS = auth_quickaclcheck("$imgNS:*"); 76 if ($authNS >= AUTH_UPLOAD) { 77 echo '<p class="img_back"><a href="'.media_managerURL(array('ns' => $imgNS, 'image' => $IMG)).'">'.$lang['img_manager'].'</a></p>'; 78 } 79} 80echo ' </div> 81</div> 82</body> 83</html> 84'; 85?> 86