1 | <?php
|
---|
2 |
|
---|
3 | /**
|
---|
4 | * Image detail page
|
---|
5 | *
|
---|
6 | * See "detail.php" if you don't know how this is getting included within the
|
---|
7 | * "main.php".
|
---|
8 | *
|
---|
9 | * NOTE: Based on the detail.php out of the "starter" template by Anika Henke.
|
---|
10 | *
|
---|
11 | *
|
---|
12 | * LICENSE: This file is open source software (OSS) and may be copied under
|
---|
13 | * certain conditions. See COPYING file for details or try to contact
|
---|
14 | * the author(s) of this file in doubt.
|
---|
15 | *
|
---|
16 | * @license GPLv2 (http://www.gnu.org/licenses/gpl2.html)
|
---|
17 | * @author Andreas Haerter <[email protected]>
|
---|
18 | * @link http://andreas-haerter.com/projects/dokuwiki-template-monobook
|
---|
19 | * @link http://www.dokuwiki.org/template:monobook
|
---|
20 | * @link http://www.dokuwiki.org/devel:templates
|
---|
21 | */
|
---|
22 |
|
---|
23 | //check if we are running within the DokuWiki environment
|
---|
24 | if (!defined("DOKU_INC")){
|
---|
25 | die();
|
---|
26 | }
|
---|
27 | ?>
|
---|
28 |
|
---|
29 | <div id="dokuwiki__detail" class="dokuwiki">
|
---|
30 | <?php html_msgarea() ?>
|
---|
31 |
|
---|
32 | <?php if($ERROR){ print $ERROR; }else{ ?>
|
---|
33 |
|
---|
34 | <h1><?php echo hsc(tpl_img_getTag('IPTC.Headline',$IMG))?></h1>
|
---|
35 |
|
---|
36 | <div class="content">
|
---|
37 | <?php tpl_img(900,700) ?>
|
---|
38 |
|
---|
39 | <div class="img_detail">
|
---|
40 | <h2><?php print nl2br(hsc(tpl_img_getTag('simple.title'))); ?></h2>
|
---|
41 |
|
---|
42 | <dl>
|
---|
43 | <?php
|
---|
44 | $config_files = getConfigFiles('mediameta');
|
---|
45 | foreach ($config_files as $config_file) {
|
---|
46 | if(@file_exists($config_file)) {
|
---|
47 | include($config_file);
|
---|
48 | }
|
---|
49 | }
|
---|
50 |
|
---|
51 | foreach($fields as $key => $tag){
|
---|
52 | $t = array();
|
---|
53 | if (!empty($tag[0])) {
|
---|
54 | $t = array($tag[0]);
|
---|
55 | }
|
---|
56 | if(is_array($tag[3])) {
|
---|
57 | $t = array_merge($t,$tag[3]);
|
---|
58 | }
|
---|
59 | $value = tpl_img_getTag($t);
|
---|
60 | if ($value) {
|
---|
61 | echo '<dt>'.$lang[$tag[1]].':</dt><dd>';
|
---|
62 | if ($tag[2] == 'date') {
|
---|
63 | echo dformat($value);
|
---|
64 | } else {
|
---|
65 | echo hsc($value);
|
---|
66 | }
|
---|
67 | echo '</dd>';
|
---|
68 | }
|
---|
69 | }
|
---|
70 | ?>
|
---|
71 | </dl>
|
---|
72 | <?php //Comment in for Debug// dbg(tpl_img_getTag('Simple.Raw'));?>
|
---|
73 | </div>
|
---|
74 | <div class="clearer"></div>
|
---|
75 | </div><!-- /.content -->
|
---|
76 |
|
---|
77 | <p class="back">
|
---|
78 | <?php
|
---|
79 | $imgNS = getNS($IMG);
|
---|
80 | $authNS = auth_quickaclcheck("$imgNS:*");
|
---|
81 | if (($authNS >= AUTH_UPLOAD) && function_exists('media_managerURL')) {
|
---|
82 | $mmURL = media_managerURL(array('ns' => $imgNS, 'image' => $IMG));
|
---|
83 | echo '<a href="'.$mmURL.'">'.$lang['img_manager'].'</a><br />';
|
---|
84 | }
|
---|
85 | ?>
|
---|
86 | ← <?php echo $lang['img_backto']?> <?php tpl_pagelink($ID)?>
|
---|
87 | </p>
|
---|
88 |
|
---|
89 | <?php } ?>
|
---|
90 | </div>
|
---|
91 |
|
---|