Custom sized thumbs

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.

Comments

  • 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 while loop you can just have a conditional statement that says that if it's the middle image, use a getCustomImageURL() with a larger size.
  • Geert Member
    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.
  • Geert Member
    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.
Sign In or Register to comment.