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