Thumbnail Patch - Feedback Desired

Hello zenphoto, I just installed this great software today.

I had some difficulty with thumbnails in my theme and decided to write a patch to fix the problem. I hope someone could let me know if I did this in the right format for you.

http://www.zenphoto.org/trac/ticket/579

The one thing I'm not familiar with is where function getImageParameters() might be used in other places in the code base. It would be good to know if I broke something else by fixing this. :)

Comments

  • acrylian Administrator, Developer
    Thanks for the patch, we will test it and let you know.
  • acrylian Administrator, Developer
    Seems to work great, it's already in the svn.

    EDIT: The first two fixes are, I didn't see that there was a third for template functions.php. That was't there yesterday and we will have to take a look at that first later.
  • That extra symptom was pretty simple. The index.php and album.php files are using different thumbnail linking functions for some reason. On the index, thumb dimension attributes are never specified. On albums, they are specified if cropping is enabled, but using values that only work if the crop dimensions are smaller than the resize dimensions.

    The lack of proper thumb link attributes seems to be due to the thumb size logic being so deeply buried (it only exists within the function that creates the thumb file).

    The discrepancy between the index and album functions is beyond me. I just knew that I could delete the dimensions for the album functions to match the index functions and it would work well enough for my needs.
  • acrylian Administrator, Developer
    You are right those width and height attributes are missing on album thumbs in general.

    We actuallyshould have them always with all thumbs, since (x)html validation requires those values. Thanks that you pointed that out. We will take a look at that.
Sign In or Register to comment.