1<?php 2 3/** 4 * DokuWiki Mikio Template Image Detail Page 5 * 6 * @link http://dokuwiki.org/template:mikio 7 * @author James Collins <james.collins@outlook.com.au> 8 * @license GPLv2 (http://www.gnu.org/licenses/gpl-2.0.html) 9 * 10 * Based on DokuWiki Theme Template 11 */ 12 13if (defined('DOKU_INC') === false) { 14 die(); 15} 16//require_once(dirname(__FILE__).'/tpl_functions.php'); /* include hook for template functions */ 17header('X-UA-Compatible: IE=edge,chrome=1'); 18 19global $conf; 20global $lang; 21global $IMG; 22global $REV; 23global $ERROR; 24global $fields; 25 26?><!DOCTYPE html> 27<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang']?>" 28 lang="<?php echo $conf['lang']?>" dir="<?php echo $lang['direction'] ?>" class="no-js"> 29<head> 30 <meta charset="UTF-8" /> 31 <title> 32 <?php echo hsc(tpl_img_getTag('IPTC.Headline', $IMG))?> 33 [<?php echo strip_tags($conf['title'])?>] 34 </title> 35 <script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script> 36 <?php tpl_metaheaders()?> 37 <meta name="viewport" content="width=device-width,initial-scale=1" /> 38 <?php echo tpl_favicon(['favicon', 'mobile']) ?> 39 <?php tpl_includeFile('meta.html') ?> 40 <?php 41 $baseDir = tpl_basedir(); 42 echo '<link type="text/css" rel="stylesheet" href="' . $baseDir . 'css.php?css=assets/mikio.less">'; 43 echo '<script type="text/javascript" src="' . $baseDir . 'assets/mikio.js"></script>'; 44 ?> 45</head> 46 47<body> 48 <!--[if lte IE 8 ]><div id="IE8"><![endif]--> 49 <div id="dokuwiki__detail" class="<?php echo tpl_classes(); ?>"> 50 <?php html_msgarea() ?> 51 52 <?php if (strlen($ERROR) !== 0) : 53 echo $ERROR; ?> 54 <?php else : ?> 55 <?php if (strlen($REV) !== 0 && strcmp($REV, '0') !== 0) { 56 echo p_locale_xhtml('showrev'); 57 }?> 58 <h1><?php echo hsc(tpl_img_getTag('IPTC.Headline', $IMG))?></h1> 59 60 <div class="content group"> 61 <?php tpl_img(900, 700); /* the image; parameters: maximum width, maximum height (and more) */ ?> 62 63 <div class="img_detail"> 64 <h2><?php echo nl2br(hsc(tpl_img_getTag('simple.title'))); ?></h2> 65 66 <?php if (function_exists('tpl_img_meta') === true) : ?> 67 <?php tpl_img_meta(); ?> 68 <?php else : /* deprecated since Release 2014-05-05 */ ?> 69 <dl> 70 <?php 71 $config_files = getConfigFiles('mediameta'); 72 foreach ($config_files as $config_file) { 73 if (@file_exists($config_file) === true) { 74 include($config_file); 75 } 76 } 77 78 foreach ($fields as $key => $tag) { 79 $t = []; 80 if (empty($tag[0]) === false) { 81 $t = [$tag[0]]; 82 } 83 if (is_array($tag[3]) === true) { 84 $t = array_merge($t, $tag[3]); 85 } 86 $value = tpl_img_getTag($t); 87 if ($value !== '') { 88 echo '<dt>' . $lang[$tag[1]] . ':</dt><dd>'; 89 if ($tag[2] === 'date') { 90 echo dformat($value); 91 } else { 92 echo hsc($value); 93 } 94 echo '</dd>'; 95 } 96 } 97 ?> 98 </dl> 99 <?php endif; ?> 100 <?php //Comment in for Debug// dbg(tpl_img_getTag('Simple.Raw')); ?> 101 </div> 102 </div><!-- /.content --> 103 104 <p class="back"> 105 <?php tpl_action('mediaManager', 1) ?><br /> 106 ← <?php tpl_action('img_backto', 1) ?> 107 </p> 108 109 <?php endif; ?> 110 </div> 111 <!--[if lte IE 8 ]></div><![endif]--> 112</body> 113</html> 114