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.
 
 
 
 
 

99 lines
3.7 KiB

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