Movies
Movies
Reviews
Reviews
Awards
Awards
Mods
Mods
3dmm.com
3dmm.com
About
About
Stats
Stats
Uploader
Uploader
Links
Links
Go Back   3dmm.com > 3dmm.com > Administrative Contact
User Name
Password

Reply
 
Thread Tools Display Modes
Old 10-15-2014, 08:56 PM   #1
Pirate Balloon
Senior Member
Pirate Balloon's Avatar
Join Date: Dec 2003
Posts: 7,911
Image Resizing

S. Goat can you please add some functionality to set the width/height of an image? Regardless of how big it is in the first place. It wouldn't have to use any server resources, just throw a width/height attribute in the img tag of the html?



ta


Pirate Balloon is offline   Reply With Quote
Old 10-17-2014, 11:40 AM   #2
Space Goat
Administrator
Space Goat's Avatar
Join Date: Sep 2001
Posts: 6,042
Unfortunately, this is not as easy as you would think.

The problem is that the bbcode format does not support "named" options. Every bbcode has a parameter (the value you wrap it around, i.e. the image url) and at most one option (the value you set inside the tag itself, i.e. [color="red"] or [thread=48426]). You would really need two options to make this sensible, one for width and one for height.

A better solution is to define a max-height and max-width style on all posted images, and then add a javascript event handler that toggles them to full size when clicked on.

What exactly do you need this for, and would the javascript resize solution I mentioned work for you?
Space Goat is offline   Reply With Quote
Old 10-17-2014, 11:44 AM   #3
Space Goat
Administrator
Space Goat's Avatar
Join Date: Sep 2001
Posts: 6,042
Another solution I just thought of is to create a new "thumb" tag that takes an option value of 0-100, this being the percentage to scale the image by. That could probably work too.
Space Goat is offline   Reply With Quote
Old 10-17-2014, 11:52 AM   #4
Space Goat
Administrator
Space Goat's Avatar
Join Date: Sep 2001
Posts: 6,042
LOL, just noticed I already added a thumb tag several years ago. Have you considered just using that? It doesn't have any sizing option. It just sets a max-height and max-width of 300px, then wraps it in a hyperlink.

Space Goat is offline   Reply With Quote
Old 10-17-2014, 03:56 PM   #5
Evil Ash
Senior Member
Evil Ash's Avatar
Join Date: Apr 2003
Posts: 15,534
I think that's all we need.
Evil Ash is offline   Reply With Quote
Old 10-19-2014, 05:36 AM   #6
Slime
Senior Member
Slime's Avatar
Join Date: Oct 2001
Posts: 24,891
nice!
Slime is offline   Reply With Quote
Old 10-21-2014, 12:05 AM   #7
Fish Taco
Senior Member
Fish Taco's Avatar
Join Date: Aug 2002
Posts: 7,034
wwwoooowww this is the only reason i never post pics now solved uhh ohhhh


Fish Taco is offline   Reply With Quote
Old 10-21-2014, 05:45 PM   #8
Gorosaurus
Super Moderator
Gorosaurus's Avatar
Join Date: Jan 2002
Posts: 16,146
Haha 3dmm.com awards


We were so cute!
Gorosaurus is offline   Reply With Quote
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


3dmm.com

Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.