Album Thumbnails - show multiple images

Theme in use: default/dark

I want to change the way the albums are listed in my gallery. Instead of showing 3 albums per line, I want to show 1 album per line. There should be 3 unique images shown for each album.

How can I make ZenPhoto show 3 unique album thumbnail images instead of only 1?

Also - How do you display the total number of images inside an album?
Thank you for your help.

Code - zenphoto\themes\default\album.php ------------------------
<div id="padbox">

<?php printAlbumDesc(true); ?>

<div id="albums">
<?php while (next_album()): ?>
<div class="album">

<div class="thumb">
" title="<?php echo gettext('View album:'); ?> <?php echo getAnnotatedAlbumTitle();?>"><?php printAlbumThumbImage(getAnnotatedAlbumTitle()); ?>
</div>
<div class="albumdesc">
<h3>" title="<?php echo gettext('View album:'); ?> <?php echo getAnnotatedAlbumTitle();?>"><?php printAlbumTitle(); ?></h3>
<small><?php printAlbumDate(""); ?></small>
<p><?php printAlbumDesc(); ?></p>
</div>
<p style="clear: both; "></p>
</div>
<?php endwhile; ?>
</div>

- Code -----------------------

Comments

  • There is no easy way to get three unique images--you would have to use an MySQL search to get the image names. Then you would have to make use of the Zenphoto object model to get the thumbnails and display them.

    If you are in an album context you can use getNumImages() to return you the image count within the album.

    I suggest you spend some time looking at the function guides. Generally it is pretty easy to serach for what you want to accomplish.
  • acrylian Administrator, Developer
    To clear the terminology a little: A album thumbnail is the thumb that represents the album. I think you probably want to show three thumbs of images within the album. In that case you will have to modify the theme.
  • What I want to do is call this function 3 times:
    <?php printAlbumThumbImage(getAnnotatedAlbumTitle()); ?>

    Each time the function is called it should display a different image.

    I am not a programmer and don't know much PHP. Thank you for the help.
  • acrylian Administrator, Developer
    A Zenphoto album has only one image. You probably want to use random images.

    I am not a programmer and don't know much PHP.
    Then now is the time to learn at least the basics, otherwise you probably won't get far.
  • Sorry about my last post. I was in a rush and did not have time to really think about what needed to be said.

    I am not a programmer but I do know the basics and understand the syntax of PHP and a few other languages. It ain't much but I can read and understand some of the code and make simple changes.

    I made a little diagram to help show you what I want to do. Hope it makes sense.

    || = page boarders
    [] = album/image
    A = album tn
    I = image tn

    Current theme:
    | [A] [A] [A] |
    | [A] [I] [I] |
    | [I] [I] [I] |
    | [I] [I] [I] |

    New theme:
    | [ A A A ] |
    | [ A A A ] |
    | [ A A A ] |
    | [I] [I] [I] |
    | [I] [I] [I] |

    The new theme displays albums like a banner and shows 3 images per album instead of 1. The album's details would be displays below the images.

    @sbillard
    Thank you for your post. Would it be possible to do something along these lines:

    Albums are set to display a randomly selected thumbnail. Could I alter the function used to select a random image and change it to select 3 images instead of only 1?

    I appreciate yall helping me and don't want to waste your time. If it's a matter of rewriting a function or 2 I am not afraid to try. Point me in the right direction.
  • acrylian Administrator, Developer
    The display of albums and images per page can be changed on the option > theme tab. But the CSS/HTML of the theme must reflect that. See also the normalizeColumns function on the doc.

    You could replace the albumthumb function and use the randomImages function to get three random images of that album instead.
Sign In or Register to comment.