![]() |
|
Last Updated/Changed Date? - 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: Last Updated/Changed Date? (/thread-12794.html) |
Last Updated/Changed Date? - melbe - 2015-07-23 Hi, [b]Album Date: [/b]Date of an Album set Meaning: [b]There is nothing available to display " Last updated/last changed date"?[/b] What I would like to achieve:
[b]Maybe you have a recommendation [/b]how to do this? Or get the upload/file Date of the last image added? Or easier: the modification date of the album folder?(filetime) Any help is highly appreciated Last Updated/Changed Date? - acrylian - 2015-07-23 Quote:Image Date: Date of an Image (Taken from its Metadata) Some explaination how Zenphoto uses these dates and what each order means: [list] [*]publishdate => is actually the date used for scheduled (un)publishing Last Updated/Changed Date? - melbe - 2015-07-23 Thank you for the quick reply and the detailed information! I have actually the following case: Or is there something wrong with my "updated" date since it doesn't seem to be the "last modified" date of an image? Last Updated/Changed Date? - acrylian - 2015-07-23 I have to look at the code myself how updateddate is actually used in detail. As far as I remember off hand it is the date of the last image added. But if that is the embeded date it is not necessarily the date the image was uploaded itself. Which might be what you see. You could try to disable metadata importing for the date possibly to get the real mtime date. Last Updated/Changed Date? - melbe - 2015-07-23 Thanks! Yes would be interesting to know how updatedDate is used. Seems if I could get mtime I could achieve what I want - but lastimage always seems to be NULL here:? ` $latestimage = query_single_row("SELECT mtime FROM " . prefix('images') . " WHERE albumid = " . $_zp_current_album->getID() . " AND 'show' = 1 ORDER BY id DESC"); Edit: Just remembered this: http://www.zenphoto.org/support/topic.php?id=1409055 Does the new release does not include your fix from the support build? Thanks! Last Updated/Changed Date? - acrylian - 2015-07-23 Of course the release includes the fix, the support build becomes directly the next release. You normally should not use queries directly but the object model if you can avoid it. Try to add a Last Updated/Changed Date? - melbe - 2015-07-27 Thank you acrylian - I have no idea why but (If I look at the DB mtime is set.) Sorry to bother you so much with this issue - but maybe you have an idea what the problem could be **UPDATE*** Last Updated/Changed Date? - acrylian - 2015-07-27 Yes, That however should not really affect values of images themselves. To cleanup the database try the database refresh button on the overview page. That re-syncs filesystem with database entries for the gallery's albums. Last Updated/Changed Date? - melbe - 2015-07-27 Thank you! As I work while logged in as admin with unpublished albums I did not notice this right away. Now I can display the date "last modified date" The album column Seems to work only for a specific album. So in case anybody wants the same thing - I will write a custom function Thank you! Last Updated/Changed Date? - acrylian - 2015-07-27 All right. good it worked out for you!
Last Updated/Changed Date? - melbe - 2015-07-27 Thank you! For the rest (sorting by latest image mtime) - Looks like this will get to complicated and I don't want to modify to much since the actual Object model is great. I'm happy for the moment with displaying the latest image mtime along the album and sort by the albums mtime! Considering your explanation: Quote: mtime => Is the file modification date. Folders actually don't have that. Albums use the date of the latest image for the updated date. updateddate => Albums only. The date you last added something to an album (title etc changes don't count) No idea if this is possible - or to complicated, but maybe one of those two dates could be modified when an new image is uploaded? (or better: the last publish date of an image, otherwise it wil mess up if an image is still not published) Thank you for the great support and this great piece of software!!! I love ZenPhoto ))) Last Updated/Changed Date? - acrylian - 2015-07-27 My explaination was a bit off memory so I might indeed not been 100% accurat. I would have to review at the code first. You could open a ticket on GitHub so it is not forgotten. Last Updated/Changed Date? - melbe - 2015-07-27 I was about to do that BUT it seems that mtime does take into account if new images have been uploaded (even if not published) Now I was able to build a wrapper function that uses sorting by albums mtime. I will think about it and maybe open on a ticket for such a function - maybe it would be better to use the publish date of an image - because it seems updated but the no new images appear could be confusing. But for now its perfect and great with my little addition of displaying the latest image mtime Thank yoo so much acrylian! Last Updated/Changed Date? - acrylian - 2015-07-28 You actually can't use the publishdate as that is for scheduled publishing only. It is otherwise also not set. A bit complicated with images with embedded date, file date etc… |