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