Undefined array key "show_bbc" and image display re-scale not working

Started by probeman, October 10, 2024, 08:34:59 PM

Previous topic - Next topic

probeman

Quote from: vbgamer45 on October 14, 2024, 12:31:17 PMThere is no failures there. You can proceed with the uninstall.

And just to be sure, the uninstall won't delete any of the existing images in the current gallery? That is, when I then install gallery 8.0.1 those images will still all be visible?

That is, it doesn't matter that at the top of the page it says that the "Third Party Download Site" is "Unknown or Not Found"?

vbgamer45

Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

probeman

Quote from: vbgamer45 on October 14, 2024, 01:09:16 PMCorrect no files or data is deleted.


Doesn't matter.

Ok, thanks.

And on a related note: can I also just go ahead and install the ReCapthca and Stop Forum Spam mods  even with the same "Site Unknown or Not Found" warnings?

vbgamer45

Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

probeman

So I uninstalled gallery 5.6 and installed gallery 8.0.1 and I think it worked.  I uploaded an image and the "show_bbc" error no longer occurs.  Thank-you!

Now the only remaining problem is that large images don't re-display at full size when clicked on. In fact recent image uploads don't even show a "hand" cursor when the mouse is hovered over the image:

https://smf.probesoftware.com/index.php?topic=2.msg12897#msg12897

Though older images (from 2.0.17) do show the "hand" cursor, but still don't re-display to full size when clicked on:

https://smf.probesoftware.com/index.php?topic=2.msg7642#msg7642

This image click behavior did work back on SMF 2.0.17!

I can't see any settings in the 8.0.1 gallery Settings for this...  any suggestions?

vbgamer45

The first image has height/width property set. The second does not. That seems to be the difference.
Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

probeman

Quote from: vbgamer45 on October 14, 2024, 05:51:07 PMThe first image has height/width property set. The second does not. That seems to be the difference.

Yes, I noticed that also.  How does one control whether the height/width are included in the BBS code?

But more importantly why do these large images not re-scale to full pixel (1:1) scale when clicked?  And back again when clicked a 2nd time?

This image click re-size behavior always happened in 2.0.17 but no longer in 2.1.4.  Is it something our tech broke when he transferred our forum to the new host?

vbgamer45

It would have to be a change to the gallery. I don't think i ever included fixed height/width to the bbc linking codes.
Community Suite for SMF - Grow your forum with SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com - Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

probeman

Quote from: vbgamer45 on October 14, 2024, 06:09:10 PMIt would have to be a change to the gallery. I don't think i ever included fixed height/width to the bbc linking codes.

These height/width parameters were there from the v5.x gallery on our 2.0.17 SMF forum.  I swear!

You mentioned you saw the height/width values in the older posts from the v 2.0.17 forum:

https://smf.probesoftware.com/index.php?topic=2.msg7642#msg7642

I didn't add those by hand!

Can you confirm that normally, large images are sub-scaled to display, but when clicked they should re-display at full scale?  In fact, if the 1:1 image scaled so large that it exceeded the width of the browser window, a horizontal scroll bar would appear at the bottom of the post!

I definitely saw that behavior on the old 2.0.17 forum!

Arantor

SMF at one time used to check on post save for images in posts, then try to look them up to get dimensions. This is how it would put the dimensions in.

I *believe* this was discontinued in 2.1 in general because a) it was unreliable as anything for so many images, leaving you facing a white screen at times, but b) it utterly doesn't work with responsive sizing (e.g. on mobile) and was replaced with sizing CSS.

I realise this doesn't help you but it's not broken, it's working as intended for the majority use case.
Holder of controversial views, all of which my own.


probeman

Quote from: Arantor on October 15, 2024, 03:02:58 AMSMF at one time used to check on post save for images in posts, then try to look them up to get dimensions. This is how it would put the dimensions in.

I *believe* this was discontinued in 2.1 in general because a) it was unreliable as anything for so many images, leaving you facing a white screen at times, but b) it utterly doesn't work with responsive sizing (e.g. on mobile) and was replaced with sizing CSS.

I realise this doesn't help you but it's not broken, it's working as intended for the majority use case.

Thanks!  It's good to know I'm not going crazy!

So to explain better for everyone, the screen shots below show the re-scaling effect in SMF 2.0.17 when the image is clicked on. First default scaling (at ~50% scale), and then when clicked, it re-scales at 1:1 (full) scale. When at full scale, the forum somehow inserts a horizontal scroll bar if the image is too wide for the browser window.

This *was* a really cool feature!

You say this feature was "replaced with sizing CSS".  How does that work?  Can it provide a similar (large) image re-scaling so users of the forum can see the posted (large) image at full scale somehow?

Arantor

No, that's not how the sizing functionality works.

In both cases the general idea is the same: try to make sure the image doesn't break the forum layout. In days of old the only method you had was to say "load the picture at a smaller size" which is what the old code sometimes managed to do.

In the new world we just have rules to say "let the image be no more than 80% of the width of the post, or full size if that fits", and did away with the toggle option because most of the time you don't want that.

What you're asking for is a function that has been removed owing to the fact that the old method doesn't ever work correctly on mobile and the new one does, but the new one has a limitation that it doesn't have the toggle you're hoping for - and no one is interested in building it in the new way of working.
Holder of controversial views, all of which my own.


probeman

Quote from: Arantor on October 15, 2024, 12:02:58 PMIn the new world we just have rules to say "let the image be no more than 80% of the width of the post, or full size if that fits", and did away with the toggle option because most of the time you don't want that.

Sorry to be a pain, but you say the image expands to 80% of the width of the post or full size if that fits, but I'm not seeing that if I maximize the browser window.

See attached image.

Arantor

That isn't what I said.

The rule is "max-width", meaning "try to let the image be its full size, up to a maximum width of the forum size", the exact number is theme dependent.

But it won't just go to 80% (for example) if the image just isn't that big. Otherwise you'd distort small images on big screens, and that doesn't help you scale big images down for mobile.
Holder of controversial views, all of which my own.


probeman

Quote from: Arantor on October 15, 2024, 12:34:15 PMThat isn't what I said.

The rule is "max-width", meaning "try to let the image be its full size, up to a maximum width of the forum size", the exact number is theme dependent.

But it won't just go to 80% (for example) if the image just isn't that big. Otherwise you'd distort small images on big screens, and that doesn't help you scale big images down for mobile.

Yes, I get that it should not expand every image.  But this is a large image that is NOT expanding to 80% though it should be able to. It's still not at 1:1 even though there is room for it.

Did you look at the image I attached?  Please tell me what I am missing...

If it's a theme limit is there a theme setting I can change?  I've already got the image max width and height to 3000 pixels in the gallery configuration.

Arantor

The image is 1194x694, and someone has defined a max-height of 512px so it's taken the size and fitted it to fit the max height (rather than the max width which is the smaller of 100% or 512px) - this is NOT the default configuration of SMF.

It's not defined in the theme but that's how someone has configured it, and that's based on looking at the inline styling as emitted by your forum right now.

I couldn't check that before because I was at work and I only have an iPad I can safely use while at work, and it's a little bit difficult to examine the CSS on an iPad.
Holder of controversial views, all of which my own.


probeman

Quote from: Arantor on October 15, 2024, 12:57:29 PMThe image is 1194x694, and someone has defined a max-height of 512px so it's taken the size and fitted it to fit the max height (rather than the max width which is the smaller of 100% or 512px) - this is NOT the default configuration of SMF.

It's not defined in the theme but that's how someone has configured it, and that's based on looking at the inline styling as emitted by your forum right now.

I couldn't check that before because I was at work and I only have an iPad I can safely use while at work, and it's a little bit difficult to examine the CSS on an iPad.

Yes, the image is 694 x 1194. Here the BBC code for that image in that post on our forum:

[img]https://smf.probesoftware.com/gallery/1_14_10_24_1_51_29.png[/img] 

It DOES display at 1:1 (full scale) in the gallery, but NOT in the forum post.  And it does not re-size as the browser window is expanded.

Where is the max height defined as 512?  I didn't do that!

For anyone interested, here's the link to the post:

https://smf.probesoftware.com/index.php?topic=2.msg12897#msg12897

Sorry, I'm just trying to understand this new sizing code...

Arantor

Go into the admin area, use the little search box and search for 'max_image_height'.
Holder of controversial views, all of which my own.


probeman

Quote from: Arantor on October 15, 2024, 01:21:29 PMGo into the admin area, use the little search box and search for 'max_image_height'.

Yeaaaah!   That fixed it!!!

Thank-you and sorry to be such a bother.

probeman

Want to see something really cool?

With the old images from the 2.0.17 SMF forum, the in-line images now have the original image toggle click behavior back again!

https://smf.probesoftware.com/index.php?topic=2.msg10746#msg10746

Click on the image and it toggles.

But newly posted images (in 2.1.4) still have the new auto scaling as the browser window is re-sized:

https://smf.probesoftware.com/index.php?topic=2.msg12897#msg12897

Very cool!

Advertisement: