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
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.
<?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.
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.
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.
You could replace the albumthumb function and use the randomImages function to get three random images of that album instead.