Sorting by Change Date

Hi!

I know there already are some discussions (like this or this) concerning change dates of images, but I haven't found a good answer to this topic yet.
My goal is to get a list of all images changed since a certain timestamp to sync these with a remote CMS. Those changes should include editing metadata, refreshing metadata from file (EXIF, IPTC, …) and filesystem operations like moving images to another album.

Looking at the database table images I noticed the fields date and mtime, but these seem to correspond to the date/time an image was taken and the modification timestamp of the file respectively. Obviously metadata fields like EXIFDateTime aren't useable for this purpose either. The field publishdate sounded most promising, but is only used to schedule publishing an image in the future.
I also thought about using custom_data, but then it couldn't be used for anything else and couldn't even store serialized data because that would prohibit sorting.

Given that this seems to be a common question and that the topic comes up every now and then: Is there a best practice approach you guys would recommend? Is there anything planned for a future release?

Tobias

Comments

  • acrylian Administrator

    mtime should actually be the image file date if was uploaded. Not sure right now what happens if you upload an image with the exact same name to replace it (via ftp for example). Then Zenphoto would not treat it as new and might not change the mtime value.

    The question is also what is the change date here. Change to the image file or changes to the titlte, description on the Zenphoot backend. For the latter there are plans to add a last changedate as Zenpage items have already.

    You can very well use the custom data field as it is an all purpose field. You can also use one of the other standard fields if you know you don't use them otherwise.

    There is also a very inconvenient way to add further extra custom fields using the the fieldextender plugin. It requires some coding, instructioms are in zp-extensions/common/fieldextender. Handling of such extra custom fields will be largely reworked in the future (and may not be directly compatible - remember our talk about moving image meta data to a separate table).

Sign In or Register to comment.