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 :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
Ability to set max IMG display width [message #159475] Thu, 04 June 2009 23:11 Go to next message
dfgngirl is currently offline  dfgngirl   United States
Messages: 87
Registered: December 2005
Karma: 0
Member
add to buddy list
ignore all messages by this user
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 09:39 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3624
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
remove from buddy list
ignore all messages by this user
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 10:35 Go to previous messageGo to next message
dfgngirl is currently offline  dfgngirl   United States
Messages: 87
Registered: December 2005
Karma: 0
Member
add to buddy list
ignore all messages by this user
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 11:03 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3624
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
remove from buddy list
ignore all messages by this user
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 11:13 Go to previous messageGo to next message
dfgngirl is currently offline  dfgngirl   United States
Messages: 87
Registered: December 2005
Karma: 0
Member
add to buddy list
ignore all messages by this user
Thanks, I'm using Firefox 3.0.10 and fud 2.8.1.

I'll try refreshing things...

[Updated on: Fri, 05 June 2009 11: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 11:25 Go to previous messageGo to next message
dfgngirl is currently offline  dfgngirl   United States
Messages: 87
Registered: December 2005
Karma: 0
Member
add to buddy list
ignore all messages by this user
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 11:29 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3624
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
remove from buddy list
ignore all messages by this user
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 17:23 Go to previous messageGo to next message
dfgngirl is currently offline  dfgngirl   United States
Messages: 87
Registered: December 2005
Karma: 0
Member
add to buddy list
ignore all messages by this user
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 03:21 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3624
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
remove from buddy list
ignore all messages by this user
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 11:07 Go to previous messageGo to next message
dfgngirl is currently offline  dfgngirl   United States
Messages: 87
Registered: December 2005
Karma: 0
Member
add to buddy list
ignore all messages by this user
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 11: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 15:57 Go to previous message
dfgngirl is currently offline  dfgngirl   United States
Messages: 87
Registered: December 2005
Karma: 0
Member
add to buddy list
ignore all messages by this user
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
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
Previous Topic: Blocking User PM's
Next Topic: Replacement/Censorship
Goto Forum:
  

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

Current Time: Thu Oct 19 01:42:54 EDT 2017

Total time taken to generate the page: 0.00802 seconds