You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

98 lines
4.0 KiB

14 years ago
14 years ago
14 years ago
14 years ago
14 years ago
14 years ago
14 years ago
14 years ago
14 years ago
  1. <?php
  2. /**
  3. * DokuWiki Image Detail Page
  4. *
  5. * @author Andreas Gohr <andi@splitbrain.org>
  6. * @author Anika Henke <anika@selfthinker.org>
  7. * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
  8. */
  9. // must be run from within DokuWiki
  10. if (!defined('DOKU_INC')) die();
  11. @require_once(dirname(__FILE__).'/tpl_functions.php'); /* include hook for template functions */
  12. ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  13. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  14. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang']?>"
  15. lang="<?php echo $conf['lang']?>" dir="<?php echo $lang['direction'] ?>">
  16. <head>
  17. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  18. <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><![endif]-->
  19. <title>
  20. <?php echo hsc(tpl_img_getTag('IPTC.Headline',$IMG))?>
  21. [<?php echo strip_tags($conf['title'])?>]
  22. </title>
  23. <?php tpl_metaheaders()?>
  24. <meta name="viewport" content="width=device-width,initial-scale=1" />
  25. <?php echo tpl_favicon(array('favicon', 'mobile')) ?>
  26. <?php tpl_includeFile('meta.html') ?>
  27. </head>
  28. <body>
  29. <!--[if IE 6 ]><div id="IE6"><![endif]--><!--[if IE 7 ]><div id="IE7"><![endif]--><!--[if IE 8 ]><div id="IE8"><![endif]-->
  30. <div id="dokuwiki__detail" class="dokuwiki">
  31. <?php html_msgarea() ?>
  32. <?php if($ERROR){ print $ERROR; }else{ ?>
  33. <h1><?php echo hsc(tpl_img_getTag('IPTC.Headline',$IMG))?></h1>
  34. <div class="content">
  35. <?php tpl_img(900,700); /* parameters: maximum width, maximum height (and more) */ ?>
  36. <div class="img_detail">
  37. <h2><?php print nl2br(hsc(tpl_img_getTag('simple.title'))); ?></h2>
  38. <dl>
  39. <?php
  40. $config_files = getConfigFiles('mediameta');
  41. foreach ($config_files as $config_file) {
  42. if(@file_exists($config_file)) {
  43. include($config_file);
  44. }
  45. }
  46. foreach($fields as $key => $tag){
  47. $t = array();
  48. if (!empty($tag[0])) {
  49. $t = array($tag[0]);
  50. }
  51. if(is_array($tag[3])) {
  52. $t = array_merge($t,$tag[3]);
  53. }
  54. $value = tpl_img_getTag($t);
  55. if ($value) {
  56. echo '<dt>'.$lang[$tag[1]].':</dt><dd>';
  57. if ($tag[2] == 'date') {
  58. echo dformat($value);
  59. } else {
  60. echo hsc($value);
  61. }
  62. echo '</dd>';
  63. }
  64. }
  65. ?>
  66. </dl>
  67. <?php //Comment in for Debug// dbg(tpl_img_getTag('Simple.Raw'));?>
  68. </div>
  69. <div class="clearer"></div>
  70. </div><!-- /.content -->
  71. <p class="back">
  72. <?php
  73. $imgNS = getNS($IMG);
  74. $authNS = auth_quickaclcheck("$imgNS:*");
  75. if (($authNS >= AUTH_UPLOAD) && function_exists('media_managerURL')) {
  76. $mmURL = media_managerURL(array('ns' => $imgNS, 'image' => $IMG));
  77. echo '<a href="'.$mmURL.'">'.$lang['img_manager'].'</a><br />';
  78. }
  79. ?>
  80. &larr; <?php echo $lang['img_backto']?> <?php tpl_pagelink($ID)?>
  81. </p>
  82. <?php } ?>
  83. </div>
  84. <!--[if ( IE 6 | IE 7 | IE 8 ) ]></div><![endif]-->
  85. </body>
  86. </html>