Browse Source

updated detail.php and made call to tpl_img_meta backwards compatible

master
Anika Henke 9 years ago
parent
commit
1a5344eb63
  1. 36
      detail.php

36
detail.php

@ -36,6 +36,7 @@ header('X-UA-Compatible: IE=edge,chrome=1');
<?php if($ERROR): print $ERROR; ?>
<?php else: ?>
<?php if($REV) echo p_locale_xhtml('showrev');?>
<h1><?php echo hsc(tpl_img_getTag('IPTC.Headline', $IMG))?></h1>
<div class="content">
@ -44,7 +45,40 @@ header('X-UA-Compatible: IE=edge,chrome=1');
<div class="img_detail">
<h2><?php print nl2br(hsc(tpl_img_getTag('simple.title'))); ?></h2>
<?php tpl_img_meta(); ?>
<?php if(function_exists('tpl_img_meta')): ?>
<?php tpl_img_meta(); ?>
<?php else: /* deprecated since Release 2014-05-05 */ ?>
<dl>
<?php
$config_files = getConfigFiles('mediameta');
foreach ($config_files as $config_file) {
if(@file_exists($config_file)) {
include($config_file);
}
}
foreach($fields as $key => $tag){
$t = array();
if (!empty($tag[0])) {
$t = array($tag[0]);
}
if(is_array($tag[3])) {
$t = array_merge($t,$tag[3]);
}
$value = tpl_img_getTag($t);
if ($value) {
echo '<dt>'.$lang[$tag[1]].':</dt><dd>';
if ($tag[2] == 'date') {
echo dformat($value);
} else {
echo hsc($value);
}
echo '</dd>';
}
}
?>
</dl>
<?php endif; ?>
<?php //Comment in for Debug// dbg(tpl_img_getTag('Simple.Raw')); ?>
</div>
<div class="clearer"></div>

Loading…
Cancel
Save