FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » FUDforum Suggestions » Ability to set max IMG display width
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Ability to set max IMG display width [message #159475] Fri, 05 June 2009 03:11 Go to next message
dfgngirl is currently offline  dfgngirl   United States
Messages: 87
Registered: December 2005
Karma: 0
Member
It would be great to be able to set the max width or height that can be displayed in posts.

Try as I might, the herd cannot control its desire to post massive images no matter how many requests.

Anyway, it's a wish of mine.

Thanks.
Re: Ability to set max IMG display width [message #159482 is a reply to message #159475] Fri, 05 June 2009 13:39 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Add the following to your forum.css.tmpl template and recompile your theme:
img {
   max-width: 450px;
}


You may also want to change the "Max Attachment Size" of your forums to prevent users from uploading large images.
Re: Ability to set max IMG display width [message #159485 is a reply to message #159475] Fri, 05 June 2009 14:35 Go to previous messageGo to next message
dfgngirl is currently offline  dfgngirl   United States
Messages: 87
Registered: December 2005
Karma: 0
Member
Thanks for the reply. I added your code:

img {
   max-width: 450px;
}


...at the bottom of forum.css.tmpl and I rebuilt the theme. This code seems to have no effect. Pictures linked that are 1200 wide are still 1200 wide whilst displaying.

What I was looking for was a way to make it so no image that a user want to embed can exceed a pre-set img width = in my forum's case 800 pixels.
Re: Ability to set max IMG display width [message #159486 is a reply to message #159485] Fri, 05 June 2009 15:03 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
It should work with most modern web browsers. Did you clear your browser's cache to ensure latest CSS is picked-up? If would also help if you tell us what browser and version of it you are using.
Re: Ability to set max IMG display width [message #159487 is a reply to message #159475] Fri, 05 June 2009 15:13 Go to previous messageGo to next message
dfgngirl is currently offline  dfgngirl   United States
Messages: 87
Registered: December 2005
Karma: 0
Member
Thanks, I'm using Firefox 3.0.10 and fud 2.8.1.

I'll try refreshing things...

[Updated on: Fri, 05 June 2009 15:16]

Report message to a moderator

Re: Ability to set max IMG display width [message #159489 is a reply to message #159475] Fri, 05 June 2009 15:25 Go to previous messageGo to next message
dfgngirl is currently offline  dfgngirl   United States
Messages: 87
Registered: December 2005
Karma: 0
Member
I can confirm the code has no effect. in Firefox (latest Linux and Windows versions), latest Chrome , latest IE, etc. - no joy or any restrictions gets placed on the width of images.

Are you assuming this should work, or know for sure?

Thanks again!
Re: Ability to set max IMG display width [message #159490 is a reply to message #159489] Fri, 05 June 2009 15:29 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Sorry to hear that. It's definitely working for me (FF 3.0.10 and FUDforum 2.8.1).
Re: Ability to set max IMG display width [message #159500 is a reply to message #159490] Fri, 05 June 2009 21:23 Go to previous messageGo to next message
dfgngirl is currently offline  dfgngirl   United States
Messages: 87
Registered: December 2005
Karma: 0
Member
Thanks for the confirmation! Did you just drop that code at the end of forum.css.tmpl? It's right at the end of mine.
Re: Ability to set max IMG display width [message #159501 is a reply to message #159500] Sat, 06 June 2009 07:21 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Yes, I've just did it again by placing the code at the bottom of the CSS template. Steps:

1. Install 2.8.1
2. Post an image
3. Add CSS code to bottom forum.css.tmpl (just before the {PAGE: END})
4. Rebuild the theme
5. Reload page and note that the image is smaller
Re: Ability to set max IMG display width [message #159503 is a reply to message #159475] Sat, 06 June 2009 15:07 Go to previous messageGo to next message
dfgngirl is currently offline  dfgngirl   United States
Messages: 87
Registered: December 2005
Karma: 0
Member
That is just so bizarre. I'm doing everything exactly as you say and still the images are as wide as ever. Sad

Edit: note up to now, I copied a template and used that copy "new" as my test on this. Well it got me thinking I should try this code with the default template. And now it works! Why not with the copy? I don't know.

Again, a big thanks to you Frank! I been wanting to limit the size of images for YEARS!

[Updated on: Sat, 06 June 2009 15:11]

Report message to a moderator

Re: Ability to set max IMG display width [message #160209 is a reply to message #159475] Sun, 02 August 2009 19:57 Go to previous message
dfgngirl is currently offline  dfgngirl   United States
Messages: 87
Registered: December 2005
Karma: 0
Member
Hey Frank, today I was thinking about how I haven't had to pan and scan to read posts on my forum now for weeks! Such a relief!

THANKS AGAIN!!!!!!!!! Very Happy Very Happy Very Happy Very Happy Very Happy You are awesome!!!!

Karen
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Blocking User PM's
Next Topic: Replacement/Censorship
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 11:18:38 GMT 2024

Total time taken to generate the page: 0.02434 seconds