How do I choose an album Thumb?

Hello,

I looked around here but can't find an answer. How can i choose which image to use as a thumbnail for an album? How does zen select it? randomly?

Comments

  • Found thank you! sorry :)
  • Can you post the solution?
  • For anyone else who is wondering this can be set in the Admin Panel >> Edit
  • hi - can you have a thumbnail for your album that is NOT one of the pictures inside that album. (or any other album!). what i would like is to have the album thumbs be seperate thumbs that i design to look cool - but they would not be part of the picture set that makes up the album - ya know what i mean?

    any advice would be appreciated! thanks a lot, and i'm loving zenphoto so far (2 days into it). great work you guys!!
    /tre
  • trisweb Administrator
    Hmmm... it's technically possible, yes. We need a 'hide image' from an album feature I think, that would take care of it in a rough way...
  • And is it not easy to simply add a "thumb" directory where we can store all our custom thumbnails ?
  • trisweb Administrator
    It may be easy to select in some way from any album, including a hidden 'thumb' album if you desire. I think that would allow for more useful combinations beyond just this one need.
  • Hi I just discovered Zenphoto last week (I used to pixelpost before) and really!! like it, making my gfs website now with it and when she asked to have custom thumbs i found this tread...

    how i did it:

    I upload a image to the album called logo.jpg

    then the changed printImageThumb function in template functions:
    doesn't print this image in the album;

    function printImageThumb($alt, $class=NULL, $id=NULL) {
    if (getImageTitle() == "logo") {

    } else {
    echo "<img src=\"" . htmlspecialchars(getImageThumb()) . "\" alt=\"" . htmlspecialchars($alt, ENT_QUOTES) . "\"" .
    ((zp_conf('thumb_crop')) ? " width=\"".zp_conf('thumb_crop_width')."\" height=\"".zp_conf('thumb_crop_height')."\"" : "") .
    (($class) ? " class=\"$class\"" : "") .
    (($id) ? " id=\"$id\"" : "") . " />";
    }
    }

    http://www.bertsimons.nl/site/nl/vrij_werk for example(the little plant is logo image)
  • and off course also in the printDefaultSizedImage function otherwise it will show up browsing through the image pages

    function printDefaultSizedImage($alt, $class=NULL, $id=NULL) {

    if (getImageTitle() == "logo") {

    }

    else {

    echo "<img src=\"" . htmlspecialchars(getDefaultSizedImage()) . "\" alt=\"" . htmlspecialchars($alt, ENT_QUOTES) . "\"" .
    " width=\"" . getDefaultWidth() . "\" height=\"" . getDefaultHeight() . "\"" .

    (($class) ? " class=\"$class\"" : "") .

    (($id) ? " id=\"$id\"" : "") . " />";

    }

    }
  • with above the logo image didn't show up but a blank still did.

    what i do is move the logo image to the last position in an album by sorting and by

    changing the getNextImage Url like this instead of sdhowing the blank page it goes to the first image in the album

    function getNextImageURL() {
    if(!in_context(ZP_IMAGE)) return false;
    global $_zp_current_album, $_zp_current_image;
    $nextimg = $_zp_current_image->getNextImage();

    if ($nextimg->name == "logo.jpg") {
    $firstimage = $_zp_current_album->getImage(0);
    return rewrite_path("/" . pathurlencode($_zp_current_album->name) . "/" . urlencode($firstimage->name) . im_suffix(),
    "/index.php?album=" . urlencode($_zp_current_album->name) . "&image=" . urlencode($firstimage->name));
    }

    else {
    return rewrite_path("/" . pathurlencode($_zp_current_album->name) . "/" . urlencode($nextimg->name) . im_suffix(),
    "/index.php?album=" . urlencode($_zp_current_album->name) . "&image=" . urlencode($nextimg->name));
    }
    }
Sign In or Register to comment.