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.

97 lines
3.9 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
  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. <title>
  19. <?php echo hsc(tpl_img_getTag('IPTC.Headline',$IMG))?>
  20. [<?php echo strip_tags($conf['title'])?>]
  21. </title>
  22. <?php tpl_metaheaders()?>
  23. <meta name="viewport" content="width=device-width,initial-scale=1" />
  24. <?php echo tpl_favicon(array('favicon', 'mobile')) ?>
  25. <?php _tpl_include('meta.html') ?>
  26. </head>
  27. <body>
  28. <!--[if IE 6 ]><div id="IE6"><![endif]--><!--[if IE 7 ]><div id="IE7"><![endif]--><!--[if IE 8 ]><div id="IE8"><![endif]-->
  29. <div id="dokuwiki__detail" class="dokuwiki">
  30. <?php html_msgarea() ?>
  31. <?php if($ERROR){ print $ERROR; }else{ ?>
  32. <h1><?php echo hsc(tpl_img_getTag('IPTC.Headline',$IMG))?></h1>
  33. <div class="content">
  34. <?php tpl_img(900,700); /* parameters: maximum width, maximum height (and more) */ ?>
  35. <div class="img_detail">
  36. <h2><?php print nl2br(hsc(tpl_img_getTag('simple.title'))); ?></h2>
  37. <dl>
  38. <?php
  39. $config_files = getConfigFiles('mediameta');
  40. foreach ($config_files as $config_file) {
  41. if(@file_exists($config_file)) {
  42. include($config_file);
  43. }
  44. }
  45. foreach($fields as $key => $tag){
  46. $t = array();
  47. if (!empty($tag[0])) {
  48. $t = array($tag[0]);
  49. }
  50. if(is_array($tag[3])) {
  51. $t = array_merge($t,$tag[3]);
  52. }
  53. $value = tpl_img_getTag($t);
  54. if ($value) {
  55. echo '<dt>'.$lang[$tag[1]].':</dt><dd>';
  56. if ($tag[2] == 'date') {
  57. echo dformat($value);
  58. } else {
  59. echo hsc($value);
  60. }
  61. echo '</dd>';
  62. }
  63. }
  64. ?>
  65. </dl>
  66. <?php //Comment in for Debug// dbg(tpl_img_getTag('Simple.Raw'));?>
  67. </div>
  68. <div class="clearer"></div>
  69. </div><!-- /.content -->
  70. <p class="back">
  71. <?php
  72. $imgNS = getNS($IMG);
  73. $authNS = auth_quickaclcheck("$imgNS:*");
  74. if (($authNS >= AUTH_UPLOAD) && function_exists('media_managerURL')) {
  75. $mmURL = media_managerURL(array('ns' => $imgNS, 'image' => $IMG));
  76. echo '<a href="'.$mmURL.'">'.$lang['img_manager'].'</a><br />';
  77. }
  78. ?>
  79. &larr; <?php echo $lang['img_backto']?> <?php tpl_pagelink($ID)?>
  80. </p>
  81. <?php } ?>
  82. </div>
  83. <!--[if ( IE 6 | IE 7 | IE 8 ) ]></div><![endif]-->
  84. </body>
  85. </html>