I created a search page that searches for images throughout Zenphoto...everything works great except for one thing:
In my while I am trying to display which album an image is from...example: searching for "Blue" might return a picture of a crayon, underneath the picture it would read "Album: School Supplies".
My while is next_image, which is why my current code isn't working: echo getAlbumTitle()...I'm thinking because it needs to be in next_album while instead, but you cannot put a while inside a while (or at least I don't know how to)...so I'm stuck.
Any ideas?
Thanks,
Josh
acrylian,
I looked through the tutorial, but I'm not sure how to use the global variables...I tried which states that it returns the album title, but it didn't work
Thanks,
Josh
acrylian,
Sorry man, just not sure what to do here...I tried:
Guess you will have to learn. For starters look at the constructors for the album and image objects. They require parameters quite different from what you have placed in your code above.
$albumobject = $_zp_current_image->album; will get you the album object for the current image. If you are going to instantiate an image you need to use the newImage() function unless you know for sure what "kind" of image it is.
Sorry, but if you are going to step into the world of customizing your Zenphoto gallery there is no shortcut to learning about its structure and object model.
sbillard,
Ok...so, I went and looked at the newImage() function and ended up with: ``. Now, the album name is showing-up correctly...yay!!!
Thank you acrylian and sbillard!!!
Josh
acrylian,
Cool, made the change...works like a champ!!
Thanks again!!
Josh