![]() |
|
Include Zenpage Posts in the Albums-Page - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: Plugins (https://forum.zenphoto.org/forum-6.html) +--- Thread: Include Zenpage Posts in the Albums-Page (/thread-10226.html) |
Include Zenpage Posts in the Albums-Page - lamy - 24-07-2012 Hi! I want to include the Zenpage posts in the Albums-View as follows: and so on. I have already managed to collect the timestamps and names of the zenpage posts and the albums and I have sorted them by the timestamps. The resulting array looks like this: array(3) { [0]=> array(3) { Now I am looking for a function like makeAlbumCurrent(); that I can use to output the albums. Any suggestions? Cheers! lamy Include Zenpage Posts in the Albums-Page - acrylian - 24-07-2012 I am not sure I exactly understand what you are trying to do. You want to list articles with the same date as an album on that album's page? Or do you just want to list articles and albums togehter as a kind of news page? Then the easiest is to do that on the news page and use the combinews mode "latest albums". In any case you should take a look at the object model. Include Zenpage Posts in the Albums-Page - sbillard - 24-07-2012 I presume you mean a function you can use to make a news item current since
NOTE: this code has not been tested! Include Zenpage Posts in the Albums-Page - lamy - 25-07-2012 Hey, thank you for your replies, I appreciate them. However, I have decided not to pursue that idea but to use ZenPages included functionality instead (pagination was too complicated for me). $_zp_current_zenpage_news->getAlbumThumb(); Is it somehow possible to get a custom album thumbnail? Thank you! Include Zenpage Posts in the Albums-Page - acrylian - 25-07-2012 If you are using the COmbiNews mode you can set several things via the options that then are put out by You can of course skip that and use the object model directly to do all manually. If the news item is an album object as in this case you can use all album class methods. Please see the functions documentation. Include Zenpage Posts in the Albums-Page - lamy - 27-07-2012 Thanks for your reply! I have already tried everything I could think of to get it right, but I just can't. There is no method in the album class that returns me the custom thumbnail that I want. (920x400px). Letting the theme handling it is for various reasons not an option. Do you have another idea for me? Include Zenpage Posts in the Albums-Page - sbillard - 27-07-2012 There is no method for that in the album class. However, the album class does have a method to return the thumbnail image and the image class does have a custom size method that can return a thumb the size you want. BTW, not sure about that size being a "thumb" even though you can do it. The difference between thumbnails and normal sized images (other than size) is the watermarking choices. Include Zenpage Posts in the Albums-Page - lamy - 30-07-2012 Okay, apparentyl, I am too dumb for this :-(. $img = newImage($_zp_current_zenpage_news, $_zp_current_zenpage_news->getAlbumThumb()); Thanks! Include Zenpage Posts in the Albums-Page - acrylian - 30-07-2012 You need to read the documentation correctly: If Include Zenpage Posts in the Albums-Page - lamy - 30-07-2012 FINALLY!!! Thank you very much for your patience! Include Zenpage Posts in the Albums-Page - acrylian - 30-07-2012 There was a typo actually. The first is "getAlbumThumb()" the 2nd should have been "getAlbumThumbImage()" of course. |