1<?php
2/**
3 * DokuWiki Image Detail 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 */
10
11// must be run from within DokuWiki
12if (!defined('DOKU_INC')) die();
13
14?>
15<!DOCTYPE html>
16<html lang="<?php echo $conf['lang']?>" id="detail" dir="<?php echo $lang['direction']?>">
17<head<?php if (tpl_getConf('opengraphheading')) { ?> prefix="og: http://ogp.me/ns# article: http://ogp.me/ns/article# fb: http://ogp.me/ns/fb# place: http://ogp.me/ns/place# book: http://ogp.me/ns/book#"<?php } ?>>
18  <meta charset="utf-8" />
19  <meta name="viewport" content="width=device-width, initial-scale=1" />
20  <title>
21     <?php echo hsc(tpl_img_getTag('IPTC.Headline',$IMG))?>
22    [<?php echo strip_tags($conf['title'])?>]
23  </title>
24
25  <?php tpl_metaheaders()?>
26
27  <?php echo tpl_favicon()?>
28</head>
29
30<body>
31<div class="dokuwiki">
32  <?php html_msgarea()?>
33
34  <div class="page">
35    <?php if($ERROR){ print $ERROR; }else{ ?>
36
37    <h1><?php echo hsc(tpl_img_getTag('IPTC.Headline',$IMG))?></h1>
38
39    <div class="img_big">
40      <?php tpl_img(900,700) ?>
41    </div>
42
43    <div class="img_detail">
44      <p class="img_caption">
45        <?php print nl2br(hsc(tpl_img_getTag('simple.title'))); ?>
46      </p>
47
48      <p>&larr; <?php echo $lang['img_backto']?> <?php tpl_pagelink($ID)?></p>
49      <?php
50            $imgNS = getNS($IMG);
51            $authNS = auth_quickaclcheck("$imgNS:*");
52            if ($authNS >= AUTH_UPLOAD) {
53                echo '<p><a href="'.media_managerURL(array('ns' => $imgNS, 'image' => $IMG)).'">'.$lang['img_manager'].'</a></p>';
54            }
55      ?>
56
57      <dl class="img_tags">
58        <?php
59            $config_files = getConfigFiles('mediameta');
60            foreach ($config_files as $config_file) {
61                if(@file_exists($config_file)) include($config_file);
62            }
63
64            foreach($fields as $key => $tag){
65                $t = array();
66                if (!empty($tag[0])) $t = array($tag[0]);
67                if(is_array($tag[3])) $t = array_merge($t,$tag[3]);
68                $value = tpl_img_getTag($t);
69                if ($value) {
70                    echo '<dt>'.$lang[$tag[1]].':</dt><dd>';
71                    if ($tag[2] == 'date') echo dformat($value);
72                    else echo hsc($value);
73                    echo '</dd>';
74                }
75            }
76        ?>
77      </dl>
78      <?php //Comment in for Debug// dbg(tpl_img_getTag('Simple.Raw'));?>
79    </div>
80
81  <?php } ?>
82  </div>
83</div>
84</body>
85</html>
86
87