News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

All images give the finger

Started by Krashsite, February 04, 2014, 03:01:11 PM

Previous topic - Next topic

Sir Osis of Liver


Re: this topic, have replicated the problem in 2.0.6 here.  Cursor changes to pointer when mouseover any image, regardless of whether it is over or under max size settings.  Code for all pics contains this -



class="bbc_img resized"



Apparently the 'resized' attribute makes the pointer, and it is added to all images.  OP found it in 2.0.7.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Arantor

Congratulations, you've proved what I said already; it does not work properly unless both dimensions are set and by your post, they are not.

Sir Osis of Liver


Look again.  I set max height and width to 260, reposted the pics, and it's still doing it.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Arantor

And what is the actual bbcode currently in the message?

Sir Osis of Liver




[center]
Actual size 600x450
[img width=260 height=195]http://www.thekrashsite.com/pics/cat.jpg[/img][/center]


[center]
Actual size 150x112
[img width=150 height=112]http://www.thekrashsite.com/pics/cat2.jpg[/img][/center]

Settings are now:  Max width-260, Max height-260



Width and height in the img tags were added by SMF.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Arantor

So SMF is doing exactly as it is supposed to, then.

If a max size is set, it downloads the image when the post is made and inserts the parameters into the bbcode (done at save time for performance). The actual size of the lower one is less than the size set, sure, but at the time SMF does not know that's actually the case.

Since you can put in size parameters whether or not the image is oversized, and SMF does not at that point know if the size is correct or not (since it doesn't get the image except only at posting), it has to assume that all images with size parameters have been resized. And then inserts the resized class which triggers the resizing JavaScript.

Again, there is no bug here. SMF is doing exactly what it was designed to do.

Sir Osis of Liver


I didn't put in any size parameters, just posted the images, SMF added the parameters to the tags.  It is incorrectly coding all images as resized, even if they aren't, and showing a pointer that does nothing.  If it's doing what it's designed to do, then it's poorly designed.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Arantor

-sigh- You put in a size limit. SMF put the parameters in. It is NOT incorrectly coded because when you first made the post, the second image was bigger than the limit you specified. You HAVE to put in both a max width and a max height otherwise it doesn't work properly.

But still, you're the one who is all knowledgeable about how it's designed, you fix it, because I'm done with this crap.

Sir Osis of Liver


You're not paying attention.  I did set a max width and max height, as indicated in the second post on my test forum, and as stated above.  SMF is marking all images as resized, regardless of their actual dimensions.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Arantor

No, trust me, you're the one not paying attention. The first time you saved the image, it was larger than the size you set. Those values are now stored in the post. And yes, it marks them as oversized BECAUSE IT DOESN'T KNOW THEY'RE NOT.

The fact you misconfigured it to start with does not make it a bug. The fact that the values are stored in the post after the fact is still not a bug.

But like I said, I'm done here. You don't like it, you go fix it.

Sir Osis of Liver


As you can see, I reposted in a new post (second test post) after changing settings, clearing and closing the browser.  If I post only the small image (third post), there's no pointer, it's correct.  If I post both images, small one first (fourth post), there's no pointer on the first one, and there is a pointer on the second one, both are correct.  It's only wrong when the larger (resized) image is posted first.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Arantor


Advertisement: