Hi everyone
I'm setting up ZenPhoto and it's all going very well so far, I'm working from the default theme customizing left and right. I got the main page, picture page and to an extent the album pages to look the way I want but I've hit a wall with the Archive page.
What I would like, instead of the plain list of links that the default theme has, something like:
2010
January
[img] [img] [img]
February
[img] [img] [img]
etc...
Each month would list all the pictures for that month, chronologically, regardless if it's 1 image or 100. Albums should be disregarded completely here.
Surely this can't be THAT hard, can it? I've tried moving some of the functionality over from the Search page to the Archive page, but all I've really managed is to blow it up about a dozen different ways. I'm not making enough sense out of the inner workings of ZP, and the fact that PHP isn't my native language (I code in .NET, have only a basic grasp on PHP) isn't helping either.
Could someone at least point me in the right direction with this?
Comments
Essentially what you need to do is add in-line the code that the search page uses when it is passed a "date". But of course, since you have not actually caused a search to be set up, you will have to do that as part of your code. That is, you will have to instantiate a search object for each "date" and use the object methods to get the images it finds.
getCombiNews(50, 'latestimages-thumbnail', 'published');
Then you can loop through the results, and print only image results, ignoring news pages.
What I've done is take the code of the printAllDates function since that does the breakdown by month nicely (skips months with no pics) and inside of that I am trying to run an Image Loop like the album and search pages have. Where I'm hitting a wall is that I don't know how to instantiate a virtual (search) album to loop through. I already have the looped date in the $key variable, I can use that to make the search param, but how do you make an album instance explicitly in every loop iteration? The other pages all seem to do this implicitly, from the querystring, and if it's explained in the docs I haven't found it.
Sorry for being thick and thanks.
Yes, I've read the ZP object guide and the themeing tutorial and been all over the element index and the forums but still cannot figure out how to do this one thing.
I can set $_zp_current_album to any physical album and then the image loop works (with the images in that album), but can't figure out how to set it to use results of a search, in my case a date. Which is essentially what I need to do, correct?
I looked at search.php but couldn't find anything that sets up the search context, at least not explicitly.