News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Limiting max size of posted images not working

Started by RandomUser123, July 30, 2016, 07:05:58 PM

Previous topic - Next topic

RandomUser123

Hello,

I want to make my forum automatically change the width and height of pictures when they are posted (and when you click on them they should become full-size, like on most SMF forums) so they don't turn out massive.
(I'm talking about pictures posted with the img tags)

I've set under Features and Options » Layout, Max width of posted pictures to 640 and Max height of posted pictures to 480. But that doesn't do anything at all. When a high-resolution picture is posted, it still appears huge. Anyway to fix this?

I don't see any errors about this in the error log. I'm running SMF 2.0.11. And my webhost is running PHP 5.2.

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."


RandomUser123

Thanks for your replies!

Quote from: Kindred on July 30, 2016, 09:00:40 PM
url demonstrating the issue?
I've made this [nofollow]topic to demonstrate the issue.

Quote from: Shambles on July 31, 2016, 04:09:06 AM
Didn't you resolve this issue previously?

http://www.simplemachines.org/community/index.php?topic=498693
That's true. It worked for the previous forum I had. But now those settings seems to do just nothing at all. And using CSS sure would be a nice workaround, but I would really like it if the max image size under Features and Options » Layout would just work.

Jailer


Kindred

that is odd...   the settings are not getting applied -- which means that you have something wrong with your site (since it works on my sites)

option 1- you installed a mod that broke things. What mods have you installed?
option 2- your theme broke it...   does it work if you change back to the default/curve theme?

solution x --
fix the issue with the mod or theme

solution y --
.bbc_img {
    border: 0 none;
}

add these lines...
max-width: 640px;
max-height:480px;
overflow:hidden;
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Siirist

Hi,

Just want to say to those that offer support for SMF  8) are AWESOME!!   

I don't even know how you guys find a similar topic from 2 years ago.   ;D

But yeah, I don't know how to organize my browser's bookmarks, so yeah.   :-[

Have a great weekend,    :)
Siirist


*Hope they don't add the "limit number of smileys per post" mod*
Needed information:
- What's your SMF version?, What MODs are installed? What Theme(s) are you using? Have you backed up your database?

--> At least 50% of the questions asked are answered in the Online Manual <--
Mods for ver 1.x will NOT run on ver 2.x

Arantor

Also please note that your host is massively out of date. PHP 5.2 is long since unsupported - in the last few weeks, PHP 5.5 has just become unsupported, and that's three versions later.

RandomUser123

Quote from: Kindred on July 31, 2016, 08:39:00 AM
that is odd...   the settings are not getting applied -- which means that you have something wrong with your site (since it works on my sites)

option 1- you installed a mod that broke things. What mods have you installed?
option 2- your theme broke it...   does it work if you change back to the default/curve theme?

solution x --
fix the issue with the mod or theme

solution y --
.bbc_img {
    border: 0 none;
}

add these lines...
max-width: 640px;
max-height:480px;
overflow:hidden;
Hey,

It's not because of my theme. This issue occurs on every theme installed, including curve/default.

But however, it may because of a mod. When I made my forum and did set everything up it was running on my own local webserver (running PHP7). I installed the Ohara YouTube Embed mod on my forum as well.

When my forum was ready to be used I did upload it to an external webhost, and reconfigured everything using repair_settings.php. Then I tried to reach my forum on the external webhost, but the file "OharaYTEmbed.php" was causing an error that made it impossible to load the forum. So I went to my FTP client and deleted OharaYTEmbed.php and the link for it in subs.php manually. Then I tried to remove the mod completely using the package manager. The package manager gave some errors about removing the package, but still did it. After that I tried to install the package again, but I got the message that my host requires PHP 5.3+ in order to use it.

I did just tried posting a huge picture on the forum that's still running on my local host (with the Ohara YouTube mod still installed), and pictures do resize there smoothly without any problems, like they should.

RandomUser123

#9
I'm sorry to double post, but I can't edit my previous message.

I did download my whole forum (along with the database) again to my pc, and did put it into my own local webserver. Image reszing was working smoothly again.

So I guess the problem is at my outdated host.

So I did add this CSS code to my themes
.bbc_img {
    max-width: 640px;
    max-height: 480px;
    overflow: hidden;
}


And it does the job as well. The image won't show fullsize'd when you click on it as it would with the "normal" way, but it's a nice workaround.

Thanks for the help everyone! :)

Advertisement: