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();
13if (!defined('DOKU_TPL')) define('DOKU_TPL',tpl_basedir());
14?>
15<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
16 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
17<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang']?>" lang="<?php echo $conf['lang']?>" dir="ltr">
18<head>
19  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
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  <link rel="shortcut icon" href="<?php echo DOKU_TPL?>images/favicon.ico" />
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