Skip to content
Snippets Groups Projects
Commit 6d861d12 authored by Andreas Gohr's avatar Andreas Gohr
Browse files

EXIF/IPTC metadata in media popup

darcs-hash:20050724201111-7ad00-81e8de6162b0e0923c08dcc7b8c750cd604c4dfd.gz
parent 2684e50a
No related branches found
No related tags found
No related merge requests found
......@@ -612,15 +612,28 @@ function tpl_mediafilelist(){
ptln('('.$w.'×'.$h.' '.filesize_h($item['size']).')',6);
ptln($del.'<br />',6);
ptln('<div class="meta">',6);
ptln('<a href="javascript:mediaSelect(\''.$item['id'].'\')">');
if($w>120){
print '<img src="'.DOKU_BASE.'lib/exe/fetch.php?w=120&amp;media='.urlencode($item['id']).'" width="120" />';
print '<img src="'.DOKU_BASE.'lib/exe/fetch.php?w=120&amp;media='.urlencode($item['id']).'" width="120" class="thumb" />';
}else{
print '<img src="'.DOKU_BASE.'lib/exe/fetch.php?media='.urlencode($item['id']).'" width="'.$w.'" height="'.$h.'" />';
print '<img src="'.DOKU_BASE.'lib/exe/fetch.php?media='.urlencode($item['id']).'" width="'.$w.'" height="'.$h.'" class="thumb" />';
}
print '</a>';
//read EXIF/IPTC data
$meta = new JpegMeta(mediaFN($item['id']));
$t = $meta->getField('IPTC.Headline');
if($t) print '<b>'.$t.'</b><br />';
$t = $meta->getField(array('IPTC.Caption','EXIF.UserComment','EXIF.TIFFImageDescription','EXIF.TIFFUserComment'));
if($t) print $t.'<br />';
$t = $meta->getField(array('IPTC.Keywords','IPTC.Category'));
if($t) print '<i>'.$t.'</i><br />';
ptln('</div>',6);
}else{
ptln ('('.filesize_h($item['size']).')',6);
ptln($del,6);
......
......@@ -5,6 +5,7 @@
require_once(DOKU_INC.'inc/lang/en/lang.php');
require_once(DOKU_INC.'inc/lang/'.$conf['lang'].'/lang.php');
require_once(DOKU_INC.'inc/html.php');
require_once(DOKU_INC.'inc/JpegMeta.php');
require_once(DOKU_INC.'inc/search.php');
require_once(DOKU_INC.'inc/template.php');
require_once(DOKU_INC.'inc/auth.php');
......
......@@ -700,3 +700,21 @@ dl.img_tags dt {
dl.img_tags dd {
background-color: #f5f5f5;
}
div.meta {
color: #666;
font-size: 70%;
line-height: 95%;
}
div.meta img.thumb{
float:left;
margin-right: 0.1em;
}
/* -------------- Media Popup ---------------------- */
div.mediaselect-right li, div.uploadform {
clear: both;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment