In the item edit page, there's a block to set the time ("Set the date and time when this image was captured").
I'd like to get this time in another tab, but I checked ItemEditItem.tpl, this block is not there. Is there a method to get the time?
PS: Is it auto syn with EXIF if the EXIF time is not null? And in reverse, can this time be written to EXIF automatically? Which table/column does it store in database?
Posts: 27300
I don't completely understand what you are after and I know zero about DB stuff so I will not be able to help with that, but here is what I have done before on the photo.tpl :
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 69
in the attached 2 imgs, nearby the submit button, there's a form, for album edit or photo edit. In the one for photo edit, it can read the EXIF data from the photo which used in Dave your code. This code of the form can't be found within ItemEditItem.tpl. So I'd like to know the how to get this time info.
Posts: 69
I edited the ItemEditItem.tpl, so it's a little different with the standard one.
Posts: 27300
I still don't understand what you want to do.
DO you want to have the album date the same as a item in the album? I don't know how to do that. The album date is set by the creation date. Creation date and origination date could be different for items. origination date/time is the time from the exif info if it has. Creation date/time is the date that the item was added to gallery.
Auto-populating the date form with a date from a item in the field would be hard as you have to create the album first before you add a item.
Seems the only way would be to do in manually.
Or am I still not understanding?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 69
Thanks Dave, so it's a creation date. Then I'd like to get the creation date of photo via a method such as "GalleryCoreApi::fetchCreationDateByItemIds($itemIds)". Does the method exist? Which file is used to show the creation date? Thanks in adv.
Posts: 27300
now you are getting over my head:
http://gallery.menalto.com/apidoc/GalleryCore/Classes/GalleryEntity.html#var$creationTimestamp
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 69
Thanks Dave. I made it!
This is to get the date in the attached images:
$originationTimestamp = $item->getOriginationTimestamp();
This is to get the EXIF date:
GalleryCoreApi::fetchOriginationTimestamp($item);
Maybe the naming was a little confusing to me.