I am currently trying to create an image loop for a particular album using the <?php while (next_image()): ?> 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.
Comments
<?php $albumobject = new Album($galleryobject,"slideshow"); ?>
<?php $albumobj = new Album($_zp_gallery, "slideshow"); ?>
Seams to work!
Which is the correct code?
But i cannot pass the <?php while (next_image()): ?> Loop with this??
Here is my code:
<?php $albumobj = new Album($_zp_gallery, "slideshow"); ?>
<?php makeAlbumCurrent("slideshow"); ?>
<?php while (next_image()): ?>
<div class="image">
</div>
<?php endwhile; ?>
makeAlbumCurrent() requires the album OBJECT, not the name. Pass the object you just setup with $albumobject.
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:
<?php $galleryobject = new Gallery(); ?>
<?php $albumobject = new Album($galleryobject,"<folder name of the album>"); ?>
<?php makeAlbumCurrent($albumobject); ?>
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.
<?php while (next_image()): ?>
<img src="/albums<?php echo html_encode(getImageLinkURL());?>" alt="" />
<?php endwhile; ?>
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