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:
`
http://www.zenphoto.org/news/category/user-guide`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. <grin>
Comments
2. Albums no. No function but you could use standard PHP file system functions to get such a date.
In my next_news() loop and news article display:
`
if (getNewsType() == "news") {
global $_zp_current_zenpage_news;
$d = $_zp_current_zenpage_news->get("lastchange");
echo ", last edit: ".zpFormattedDate(DATE_FORMAT,strtotime($d));
}
`
In my pages display:
`
echo ", last edit: ";
printPageLastChangeDate();
`
I guess I don't need to show a last edit date for albums/pictures (since the info is not there). If I figure out how to submit a change request, I will ask that update date for an album and picture be supported as well.
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.
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 `get("lastchange")` for albums and it always returned the same value (Linux epoch beginning maybe?) which suggested to me that maybe the value was there but just not set. Or it could be that's what the format functions do with FALSE as input. I didn't pursue it.
Side note: I see I just moved from "Junior" to "Member". Ye-Haw! When do I get to learn the secret handshake?
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 `get("updateddate")` from the current album?
<\excitement>
Darn. No time to try it until tomorrow.