🌍
English
Hi,
how can I precede the image description (in the tooltip and/or under the image) with the date of the image?
IOW if the caption is "Me at home" and the image date / time is now, I would like to have a description "2017-05-21: Me at home".
TIA,
Oliver
Piwigo version: 2.9.0
Offline
this seems to be more complicated than I expected.
In the mean, I found the render_element_description trigger but I can't get easily the creation date in the handler. I would need another data base query, correct?
Is there a cleaner way?
Offline
not complicated:
add_event_handler('picture_pictures_data', 'adddate_picture_pictures_data'); function adddate_picture_pictures_data($picture) { $picture['current']['comment'] = substr($picture['current']['date_creation'],0,10) . ': ' . $picture['current']['comment']; return $picture; }
the extraction of the date could be made cleaner, but image.php uses the same.
Oliver
Offline