![]() |
|
Get all images from an album - 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: Get all images from an album (/thread-9492.html) |
Get all images from an album - stront.w - 2012-01-16 Hi, i want to get all images from an album using the build in functions but i dont know how to do this. can anyone help? Get all images from an album - stront.w - 2012-01-16 right now im using this code: <?php define('OFFSET_PATH', true); require_once("template-functions.php"); $galleryobject = new Gallery(); $albumobject = new Album($galleryobject,$_GET['album']); makeAlbumCurrent($albumobject) ?> <?php while (next_image()): ?> <div class="image"> <a>" title="<?php echo getBareImageTitle();?>"><?php printImageThumb(getAnnotatedImageTitle()); ?></a> </div> <?php endwhile; ?> Get all images from an album - sbillard - 2012-01-17 That works. It would also be possible to use the object model: `$images = $album->getImages();` You did not really say, but it seems you are doing this outside of the Zenphoto theme context? Get all images from an album - stront.w - 2012-01-17 Yeah, im using it outside the theme context. is that a problem? and how do i use the object model you described? can you give an example? Get all images from an album - acrylian - 2012-01-17 Yes, of course outside the theme context the functions are not available. See the user guide on "zenphoto as a plugin". There is also a tutorial for the object model (of course dependent on the theme context as well). Get all images from an album - stront.w - 2012-01-17 i have followed the user guide but i cant figure it out, can you maybe write the code for me? i know im on the right track but i'm struggeling with this problem for 2 days now and i cant figure it out. Get all images from an album - sbillard - 2012-01-17 http://www.zenphoto.org/pages/paid-support |