![]() |
|
Is there a getLastChangeDate() function for NewsArticles and Albums? - 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: Is there a getLastChangeDate() function for NewsArticles and Albums? (/thread-10485.html) |
Is there a getLastChangeDate() function for NewsArticles and Albums? - JerryE - 2012-10-08 I have a custom theme that uses ZenPage and CombiNews. After I publish a NewsArticle or Album, I often make updates to it. In my NewsArticle list and my Album list, I would like to show the original publish date for each item as well as the date that each item was last updated. An example is found here: I found the getPageLastChangeDate() function for Pages, but I have not found anything analogous for NewsArticles, Albums, or Images. Is there a (easy) way to do this? I've written my own theme, so I'm not afraid of code, just lazy. Is there a getLastChangeDate() function for NewsArticles and Albums? - acrylian - 2012-10-08
Is there a getLastChangeDate() function for NewsArticles and Albums? - sbillard - 2012-10-08 Just a warnin on the album/image dates from the filesystem. On Unix systems there is no concept of a "creation" date and the last modified date can be updated for reasons that you might not expect. Is there a getLastChangeDate() function for NewsArticles and Albums? - JerryE - 2012-10-10 For anybody else interested here is how I did it: In my next_news() loop and news article display: Is there a getLastChangeDate() function for NewsArticles and Albums? - acrylian - 2012-10-10 Yep, that's the way to do it. As my colleague the change date is complicated for albums and images itself. If you mean changes to the title, description or similar that would work the same like with articles or pages. But that is not usually what you mean for a last change on those I guess. Is there a getLastChangeDate() function for NewsArticles and Albums? - JerryE - 2012-10-12 Acrylian: Your last comment shows me that I was not clear in what I wanted for albums and images. Actually, I do want to use the last change date for the Album/Image title/description as the last change date for the Album/Image and display that. Oh, and if an image is added to an album, that would update the last change date for the album as well. I am not interested in displaying a change date for the actual photo, the album thumbnail, the image metadata. I tried Side note: I see I just moved from "Junior" to "Member". Ye-Haw! When do I get to learn the secret handshake? Is there a getLastChangeDate() function for NewsArticles and Albums? - JerryE - 2012-10-12 While reviewing the my ZP admin page, I noticed the Database quick reference. I looked into the table definition for albums and saw "updateddate". Could this be what I want? Can I do a Darn. No time to try it until tomorrow. Is there a getLastChangeDate() function for NewsArticles and Albums? - acrylian - 2012-10-12 Yes, as my colleague said unix which the most servers use has no concept for this. You can access any database field that way. The date may not be populated for all albums. I don't remember the details but I think the value is taken from the latest image uploaded. |