The 'Images size is longest size' option does not seem to affect the size of thumbnails. Is this supposed to be, or was I using the options in the wrong way? I ended up coding up my own hack to make it work the way I want.
Yes, that option only refers to the sized images on image.php, not to thumbnails. I guess you want to have uncropped thumbnails that fitt into a specific space? I plan to add a function to set a width and height (not sure if that will make it into the next release though). Meanwhile you could try this code snippet I posted here on album.php: http://www.zenphoto.org/support/topic.php?id=1774&replies=12
Yes, in my gallery I had some very wide but short images, and when thumbnailed conventionally they end up taking up more sideways space than all other images. I did use the 'crop thumbnail' for a while, but didn't like having images cropped.
Actually this code I posted on the other thread should do the same, it puts uncropped images into a 150x150 square. `if (getFullWidth() === getFullHeight() OR getFullWidth() > getFullHeight()) {
Just use this within the next_image() loop on the album.php of your theme. No need to hack core files, which we don't recommend since you have to do it all again with every update. BTW, this functionality will go into zenphoto in the future anyway. (probably not 1.1.7 which is due in a few days, but the following one).
Comments
I plan to add a function to set a width and height (not sure if that will make it into the next release though). Meanwhile you could try this code snippet I posted here on album.php:
http://www.zenphoto.org/support/topic.php?id=1774&replies=12
My hack in functions-image.php was as follows:
`
// Calculate proportional height and width.
$hprop = round(($h / $w) * $dim);
$wprop = round(($w / $h) * $dim);
// MW edit
//if ((!$thumb && $size && $image_use_longest_side && $h > $w) || ($thumb && $h <= $w) || $height) {<br />
if (($size && $image_use_longest_side && $h > $w) || ($h <= $w) || $height) {<br />
$newh = $dim;
$neww = $wprop;
} else {
$newh = $hprop;
$neww = $dim;
}
// MW edit
// for proportional thumbnails
if ($thumb && $neww > $dim) {
$newh = $hprop;
$neww = $dim;
}
`
`if (getFullWidth() === getFullHeight() OR getFullWidth() > getFullHeight()) {
printCustomSizedImage(getImageTitle(), null, 150, null);
} else {
printCustomSizedImage(getImageTitle(), null, null , 150);
}`
Just use this within the next_image() loop on the album.php of your theme. No need to hack core files, which we don't recommend since you have to do it all again with every update.
BTW, this functionality will go into zenphoto in the future anyway. (probably not 1.1.7 which is due in a few days, but the following one).