Needs review
Project:
Image Exact Sizes
Version:
5.x-0.1
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
21 Aug 2006 at 04:41 UTC
Updated:
8 Aug 2007 at 03:28 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
gordon commentedI have made some changes to the image patch, and now the new hook is hook_image_alter(), and handles all the images including the original.
Comment #2
Anonymous (not verified) commentedYour patch is very handy for me as I will use the Image publishing module. With it, I will be able to use the Gallery Remote software to upload galleries and without your patch, Image publishing bypasses the Image exact size module.
I've applied the 79737 patch to image_exact.module and 42835 patch to image.module and I works great except for one part : it does not use the Image exact size settings correctly.
In image_exact_image_alter function you have the line :
if (isset($exact[$size])) {This is always true for every existing size. This is due to the way the Image exact size module stores its settings (in fact, it lets the form manager do everything).
If the size is checked, we have
$exact[$size]=$size.If the size in unchecked, we have
$exact[$size]=0.Thus, if you check "Use exact sizes for image-nodes" in Image exact size settings, the thumbnail checkbox will always be checked (it's not a big problem as it is generally wanted this way).
So I suggest :
if($exact[$size]==$size) {Comment #3
izaak commentedI've cleaned it up a bit. Apply this patch AFTER #75147 (currently ready to be committed).
Comment #4
gordon commentedBump, The hook_image_alter() patch has now been applied to HEAD, and 5
Comment #5
JirkaRybka commentedOops, I overlooked this issue, and made my own duplicate patch (very similar). Uploading just for reference.
I have one more thing: The new Image module on 5.x introduced
IMAGE_ORIGINALinstead of'_original'. So the original patch seen here should be probably updated, if used on 5.x. My one reflects this already.Also I change this Issue to bug-report critical status, because on fresh 5.1 install with all modules being recent version, the Image Exact doesn't work for image nodes at all. Seems that images are cropped 2 times, then blown away anyway and replaced by Image module's thumbnails. The patch is solving the issue completely.
Comment #6
bermin commentedThe previous comment confuses me a tad. I understood that the patch should have imagexact working with DRUPAL 5.2 and latest modules. It doesn't. Doesn't square the images selected.