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
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") {
Comments
any advice would be appreciated! thanks a lot, and i'm loving zenphoto so far (2 days into it). great work you guys!!
/tre
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)
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\"" : "") . " />";
}
}
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));
}
}