Get all images from an album

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?

Comments

  • 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">
    " title="<?php echo getBareImageTitle();?>"><?php printImageThumb(getAnnotatedImageTitle()); ?>
    </div>
    <?php endwhile; ?>
  • 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?
  • 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?
  • acrylian Administrator, Developer
    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).
  • 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.
Sign In or Register to comment.