[pmwiki-users] IPTC attributes in ThumbList

Simon nzskiwi at gmail.com
Mon Jul 8 03:19:40 CDT 2013

IPTC Caption is the default field for captions used by Aperture (Apple).
In my wiki I wish to display the captions saved in the photo metadata

Thumblist has an add on recipe to extract IPTC metadada
http://tl.5ko.fr/T/IPTC (as suggested by

I've been trying to get this recipe to work.
But I have yet to get it work.

I'd like to hear from anyone who has this recipe working.

My config.php (I've tried IPTC before and after Thumblist)

## StarterPack: Activate the ThumbList2 recipe.
  $ThumbList['Px'] = 232;
  $ThumbList['tlmode'] = 1;
  $ThumbList['UseTmpl'] = 1;
  $ThumbList['ShowErrors'] = 0;
  $ThumbList['_tmpl']['captionwrap'] = '<div class="caption">%s</div>';
  $ThumbList['_tmpl']['inlinewrap']  = '<div class="thumbdiv">%s%s</div>';
  $ThumbList['_tmpl']['inlinewrapall'] = '%s';
  $ThumbList['MaxThumbs'] = 5000; # maximum number of thumbnails for the
whole wiki; if there are more, the oldest 30% of the maximum allowed number
will be purged.
  $ThumbList['DirThumbsRatio'] = 2; # maximum number of thumbnails for one
upload directory (2 means 2 times the number of uploaded pictures).
## StarterPack: Activate the IPTC metadata recipe. http://tl.5ko.fr/T/IPTC
  $ThumbList['fEXIF'] = 'uThumbMetaData';
function uThumbMetaData($filepath)
  # get core Thumblist EXIF
  $vars = ThumbExif($filepath);
  # get IPTC tags
  $img = new Image_IPTC($filepath);
  $vars = array_merge($vars, array(
    '?x_headline' => $img->getTag('Headline'),
    '?x_caption' => $img->getTag('Caption'),
    '?x_copyright' => $img->getTag('Copyright String')
  return $vars;

and I use it like this

(:thumbgallery tlmode=1 px=500 :)
P1030444.jpg | ?x_caption

The recipe does note that "not all PHP installations can extract it.", and
I'm wondering what to look out for that would tell this


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20130708/d6b29e56/attachment.html>

More information about the pmwiki-users mailing list