![]() |
|
using individual metadata (ie, times) - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: using individual metadata (ie, times) (/thread-12759.html) |
using individual metadata (ie, times) - cbrace - 2015-06-23 Hi, I was wondering whether it would be possible to display "original date taken" under the thumbnail on an album. Looking at the source of image.php, I see that image metadata is retrieved by a single function call:
and in the browser I see that this is rendered in a table, leading me to think it may not be possible to retrieve and display solely the date taken. Along similar lines, it would be nice display the date an image was added on the home page configured to display Latest pictures (I'm adapting the Paradigm theme). Any ideas how I might go about doing this? Disclaimer: I'm not a PHP programmer, just a tweaker using individual metadata (ie, times) - acrylian - 2015-06-23 I don't know where But you can get respectively print any field using these: using individual metadata (ie, times) - cbrace - 2015-06-24 Ah... sounds like I thought it would be helpful to see those two functions in action, so I switched to the default Basic theme. On the image page, "Original Time Taken" which is what I am after. I open image.php in an editor and these seem to be the lines: What is "colorbox_meta"? using individual metadata (ie, times) - acrylian - 2015-06-24 Again, get/printImageMetaData() do not get respectively print individual fields but all meta data fields. General function ruel: getXXX = returns data (how depends), printXXX = outputs data, often with predefined html. Which is why there is a get equivalent. 'colorbox_meta" triggers the lightbox display of the meta data table output some official themes use. If you want a specific field you need to use the functions I linked above. using individual metadata (ie, times) - fretzl - 2015-06-24 You would need something like this:
using individual metadata (ie, times) - cbrace - 2015-06-25 Well, lo and behold, it appears that the Paradigm template already supports this! If you select a home page displaying the latest images, this is generated by this call:
I looked in the functions.php file and found this:
The only slightly disconcerting thing is that the Latest here is latest added, but the the creation date is displayed, so if you add a picture you took a few years ago, it nonetheless appears on the home page under Latest. Seems to me the date displayed under Latest should be the date added to the site If anyone wants to see what it looks like in action, here is the site I am building (work very much in progress): I'm going to work now on formatting those dates, among other stuff. using individual metadata (ie, times) - cbrace - 2015-06-26 @fretzl: Thanks for the helpful information. Although I have some basic programming experience and I am comfortable editing PHP files, it is difficult for me to learn the specific syntax simply from looking at the documentation. This works fine here: ` ` Using this page as a reference: http://us2.php.net/manual/en/function.strftime.php I thought that something like this would look nice: %d %B %Y But adding this as a parameter has no effect: ` ` I am trying to add the DateTime to the template's _imagethumbnail.php page, which isn't possible using the option I mention above that is available for the latest image display. Thanks for your patience using individual metadata (ie, times) - acrylian - 2015-06-26 Zenphoto imports the date set within the meta data of the image. You can disable the import on the image options for any meta data field. Of course How to read the documentation is explained here: You have to put the value into a variable first using the using individual metadata (ie, times) - fretzl - 2015-06-26 For my own education I managed to put this together: using individual metadata (ie, times) - cbrace - 2015-06-26 @acrylian: I understand completely. @fretzl: Very helpful, thanks; got it working. I see now that my scanned 35mm pics don't have that date field and I will be adding it with exiftool. |