implemented changes for media detail page (more flexible media meta data and link to mediamanager)
This commit is contained in:
parent
5e6cecd3a3
commit
7af3c88fac
1 changed files with 36 additions and 24 deletions
60
detail.php
60
detail.php
|
|
@ -40,30 +40,32 @@ if (!defined('DOKU_INC')) die();
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<?php
|
<?php
|
||||||
$t = tpl_img_getTag('Date.EarliestTime');
|
$config_files = getConfigFiles('mediameta');
|
||||||
if($t) print '<dt>'.$lang['img_date'].':</dt><dd>'.dformat($t).'</dd>';
|
foreach ($config_files as $config_file) {
|
||||||
|
if(@file_exists($config_file)) {
|
||||||
$t = tpl_img_getTag('File.Name');
|
include($config_file);
|
||||||
if($t) print '<dt>'.$lang['img_fname'].':</dt><dd>'.hsc($t).'</dd>';
|
}
|
||||||
|
}
|
||||||
$t = tpl_img_getTag(array('Iptc.Byline','Exif.TIFFArtist','Exif.Artist','Iptc.Credit'));
|
|
||||||
if($t) print '<dt>'.$lang['img_artist'].':</dt><dd>'.hsc($t).'</dd>';
|
|
||||||
|
|
||||||
$t = tpl_img_getTag(array('Iptc.CopyrightNotice','Exif.TIFFCopyright','Exif.Copyright'));
|
|
||||||
if($t) print '<dt>'.$lang['img_copyr'].':</dt><dd>'.hsc($t).'</dd>';
|
|
||||||
|
|
||||||
$t = tpl_img_getTag('File.Format');
|
|
||||||
if($t) print '<dt>'.$lang['img_format'].':</dt><dd>'.hsc($t).'</dd>';
|
|
||||||
|
|
||||||
$t = tpl_img_getTag('File.NiceSize');
|
|
||||||
if($t) print '<dt>'.$lang['img_fsize'].':</dt><dd>'.hsc($t).'</dd>';
|
|
||||||
|
|
||||||
$t = tpl_img_getTag('Simple.Camera');
|
|
||||||
if($t) print '<dt>'.$lang['img_camera'].':</dt><dd>'.hsc($t).'</dd>';
|
|
||||||
|
|
||||||
$t = tpl_img_getTag(array('IPTC.Keywords','IPTC.Category','xmp.dc:subject'));
|
|
||||||
if($t) print '<dt>'.$lang['img_keywords'].':</dt><dd>'.hsc($t).'</dd>';
|
|
||||||
|
|
||||||
|
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>
|
</dl>
|
||||||
<?php //Comment in for Debug// dbg(tpl_img_getTag('Simple.Raw'));?>
|
<?php //Comment in for Debug// dbg(tpl_img_getTag('Simple.Raw'));?>
|
||||||
|
|
@ -71,7 +73,17 @@ if (!defined('DOKU_INC')) die();
|
||||||
<div class="clearer"></div>
|
<div class="clearer"></div>
|
||||||
</div><!-- /.content -->
|
</div><!-- /.content -->
|
||||||
|
|
||||||
<p class="back">← <?php echo $lang['img_backto']?> <?php tpl_pagelink($ID)?></p>
|
<p class="back">
|
||||||
|
<?php
|
||||||
|
$imgNS = getNS($IMG);
|
||||||
|
$authNS = auth_quickaclcheck("$imgNS:*");
|
||||||
|
if ($authNS >= AUTH_UPLOAD) {
|
||||||
|
$mmURL = media_managerURL(array('ns' => $imgNS, 'image' => $IMG));
|
||||||
|
echo '<a href="'.$mmURL.'">'.$lang['img_manager'].'</a><br />';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
← <?php echo $lang['img_backto']?> <?php tpl_pagelink($ID)?>
|
||||||
|
</p>
|
||||||
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue