![]() |
|
image loop - 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: image loop (/thread-9168.html) |
image loop - iamonstage - 2011-10-17 I am currently trying to create an image loop for a particular album using the loop with no success. I am making this on the index page of the theme I am creating. I believe that the function makeAlbumCurrent is setting to define the album for the images. image loop - acrylian - 2011-10-17 Yes, make makeAlbumCurrent() is the right function to use. But you need to create an object of the album you wish to use and pass that to that function. See the documentation of the function and also read the object model tutorial. All on the user guide. image loop - iamonstage - 2011-10-18 Thank you acrylian. But i am getting the error "Bad gallery in instantiation of album slideshow" image loop - iamonstage - 2011-10-18 The code above I took from the Object Model Guide, but I found in the forums: Seams to work! But i cannot pass the Loop with this?? Here is my code: image loop - acrylian - 2011-10-18 $_zp_gallery is a standard global object variable that contains the gallery object on themes so you don't need to create it. "$galleryobject" did not work because it does not contain the gallery object. You would need to create it first. makeAlbumCurrent() requires the album OBJECT, not the name. Pass the object you just setup with $albumobject. image loop - iamonstage - 2011-10-18 Thank you acrylian, looks like i need to brush up on my object skills in php! For the attention of other forum uses (as I know i was searching around for this code for a while) this is how i selected a particular album: I could then run the while loop to list the images in a particular album which enable me to use nivo slider from a zenphoto album. image loop - acrylian - 2011-10-18 You don't need to setup the gallery object, it is already on all theme pages and containted in image loop - iamonstage - 2011-10-18 I did suspect that, but it works better with it in. If I don't have that line in I get this error message: Notice: Bad gallery in instantiation of album slideshow. in C:\Users\Tom\My Dreamweaver\Project Folder\Zen Photo Trial\www\zp-core\class-album.php on line 48 image loop - acrylian - 2011-10-18 Of course you would have to replace |