Member
Member
zanderography   04-03-2008, 20:40
#1

I'm assuming this needs to be done somewhere in i.php or with a custom function... I'd like to be able to restrict the height of the thumbnails to one size so that landscape and portrait images can all line up evenly in one row on the album view. I don't like the idea of cropping the images. I just want to set a 'maxheight' variable (which would then apply to the short side of a landscape image) and have all thumbnails proportionally resize down. Any ideas?

Administrator
Administrator
acrylian   04-03-2008, 21:09
#2

Try this: http://www.zenphoto.org/documentation/zenphoto/_template-functions.php.html#functionprintCustomSizedImageMaxHeight

It's meant for the sized image originally though, but you could duplicate this function and make a custom function for your theme from it.

Member
Member
zanderography   04-03-2008, 23:09
#3

Perfect, thank you.

Member
Member
zanderography   04-03-2008, 23:57
#4

Is there a reason why that works on album.php but not search.php (of the modified default template?)?

I get this error: Fatal error: Call to a member function on a non-object.

Member
Member
sbillard   05-03-2008, 01:11
#5

The function assumes that there is an album from which the image came from. However, in a search that is not the case.

Member
Member
BertSimons   05-03-2008, 10:24
#6

isnt it so that even in search there's an album from which the image came from?...
on my search page I get the album from which the image came by putting

`global $_zp_current_image;

$album = $_zp_current_image->getAlbum();

$albumtitle = $album->getTitle();`

in the `` loop;

no idea if this can be of help though

Member
Member
BertSimons   05-03-2008, 10:58
#7

and defining the max height like `

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.