<a id="thumb5" href="/serendipity/uploads/photos/DSC00142.JPG" class="highslide" onclick="return hs.expand(this)">
<img src="/serendipity/uploads/photos/DSC00142.thumb.JPG" alt="Highslide JS"
title="<b>22-Aug-2006:</b> Tara being stalked by a heron in the Maldives." height="82" width="110" /></a>
<a id="thumb6" href="/serendipity/uploads/photos/DSC00379.JPG" class="highslide" onclick="return hs.expand(this)">
<img src="/serendipity/uploads/photos/DSC00379.thumb.JPG" alt="Highslide JS"
title="<b>14-May-2007:</b> The folks having fun in the sun after my brother's wedding in Cyprus." height="82" width="110" /></a>
If I know the image ID, how do I use the EXIF date information instead of hardcoding it ?
Long answer: You would need to write your own Smarty function and register that in your template's config.inc.php, and then install the "Smarty markup" event plugin so that you can use smarty markup in your static pages. Then you could enter a code like:
function makeGallery($params, &$smarty) {
global $serendipity;
$res = serendipity_db_query("SELECT * FROM {$serendipity['dbPrefix']}images WHERE CONCAT(path, '/', name, '.', extension) = '" . serendipity_db_escape_string($params['name']) . '");
// print_r($res);
// More code here, access the functions of the include/functions_images.inc.php API
}
$serendipity['smarty']->register_function('makeGallery', 'makeGallery');
The makeGallery function could use the s9y API methods to access metadata (I believe you don't need my query at all, there should be a s9y function that can fetch an image by filename).
HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Incidentally, Don was working on EXIF tags for his site. As I recall, we discovered that the PHP support for EXIF is very spotty, despite being included as a standard extension.
I wouldn't hold my breath or anything.
But maybe Don will have something to add to the discussion.
judebert wrote:Incidentally, Don was working on EXIF tags for his site. As I recall, we discovered that the PHP support for EXIF is very spotty, despite being included as a standard extension.
I wouldn't hold my breath or anything.
But maybe Don will have something to add to the discussion.
Thanks, the extended info in the media library seemed to be populated with the correct information. Guess I was lucky
I have not messed with that in awhile - as Judebert mentioned, EXIF and IPTC support seems to vary considerably from one php install to another.
However, in this case, I am wondering if sonichouse could install the serendipity_event_imageselectorplus plugin then use its smarty variable $quickblog.exif.Date_Time? ie, something like this:
<a id="thumb5" href="/serendipity/uploads/photos/DSC00142.JPG" class="highslide" onclick="return hs.expand(this)">
<img src="/serendipity/uploads/photos/DSC00142.thumb.JPG" alt="Highslide JS"
title="<b>{$quickblog.exif.Date_Time:</b>}; Tara being stalked by a heron in the Maldives." height="82" width="110" /></a>
I have no idea if that would work, but maybe its a step in the right direction (or, quite possibly, 3 steps in the WRONG direction)!! LOL
Don Chambers wrote:I have no idea if that would work, but maybe its a step in the right direction (or, quite possibly, 3 steps in the WRONG direction)!! LOL
I think at the moment this is just too far down the garden path for me as I have just started to learn to walk
However, when/if I get up to pace then I will revisit this.