ZenphotoCMS Forum
Custom sized thumbs - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: Custom sized thumbs (/thread-610.html)



Custom sized thumbs - Geert - 2006-06-21

In my theme I am using printCustomSizedImage to be sure the thumbs and full images are exactly as I want them to be (besides from what is stated in the zp_config file).

I am also using the previous and next thumb in my navigation. Is there a way to get custom sized thumbs with the functions getPrevImageThumb and getNextImageThumb? (Without changing the core functions of course.) Because those functions are still getting their size form the zp_config file.




Custom sized thumbs - DarrellD - 2006-06-21

No, there's no way to easily do that, but I have a work-around for you.

Say for example, in your design (most likely album.php) you want the main picture in the middle of the page, then a thumbnail of the previous image to the left of the main picture and a preview of the next image to the right of the main picutre.

What you can do is have people set
$conf['images_per_page']
to three (the preview on the left, the middle picture, and the preview on the right).

Then inside your image [b]while loop[/b] you can just have a conditional statement that says that if it's the middle image, use a getCustomImageURL() with a larger size.




Custom sized thumbs - Geert - 2006-06-22

That is a good idea. Except that I am using the album page too of course. But maybe I can try to use a similar workaround for the image page.




Custom sized thumbs - Geert - 2006-06-22

Okay, I did it another way. I tweaked some of the core functions (printCustomSizedImage, getCustomImageURL and getSizeCustomImage) and added them to my theme. It seems to be working fine now.