zenphoto forums » General Zenphoto Discussion

printCustomAlbumThumbMaxSpace() random gallery image

(4 posts)
  1. weweje

    Member
    Joined: Feb '10
    Posts: 23

    Hello again.
    I'm certainly missing something here but when I use printCustomAlbumThumbMaxSpace() to display a thumb per gallery inside gallery.php, the function returns a random image extracted from each gallery.

    I don't know any way to specifie it to choose only the first image of each gallery...
    Could you help me?

    <?php while (next_album()): ?>
              <div class="album">
                <div class="thumb">
                  <a href="<?php echo htmlspecialchars(getFirstImageURL());?>" title="<?php echo gettext('>>:'); ?> <?php echo getBareAlbumTitle();?>">
    
                    <?php printCustomAlbumThumbMaxSpace(getBareAlbumTitle(), '800', '300', null, null, null); ?>
    
                    <div class="albumdesc">
                      <h3><?php printAlbumTitle(); ?></h3>
    
                      <?php echo truncate_string(getAlbumDesc(), 45); ?>
    
                    </div>
                  </a>
                </div>
              </div>
              <?php endwhile; ?>
    Posted 3 years ago #
  2. Zenphoto development team
    acrylian

    Developer
    Joined: Jul '07
    Posts: 13,341

    Albumthumbs are always randomly taken from the gallery if you don't set a fixed album thumb on the album admin page.

    Don't forget to read the Forum rules and usage resources
    Posted 3 years ago #
  3. Zenphoto development team
    sbillard

    Chief Developer
    Joined: May '07
    Posts: 9,766

    Note also that you can change the default thumbnail selection criteria from the reset thumbnails utility on the overview page

    Don't forget to read the Forum rules and usage resources
    Posted 3 years ago #
  4. weweje

    Member
    Joined: Feb '10
    Posts: 23

    yeeeeeeeeeeeeeeeeees!
    thank you!
    the "choose this image as album cover " had just done the trick.
    So evident I didn't saw it ;)
    And the shuffle mode from the reset thumbnails page is a way back.
    This way one can switch between fixed and random images with the same function.

    Each step I make into that soft proves me its totally clever conception - the code documentation is also a masterpiece.
    As a webdesigner popping out off a loads of bloated web apps, coding with zenphoto is a holyday trip.

    Thanks again Mr billard, Mr acrylian, and the others regular contributors.

    Posted 3 years ago #

RSS feed for this topic

Reply

You must log in to post.