Version: 1.00, by ggiersdorf
Developer Last Online: Aug 2012
Version: 3.5.3
Rating:
Released: 12-27-2005
Last Update: Never
Installs: 100
Template Edits
Code Changes
No support by the author.
I was looking for some code that would allow an image over size x to be resized in IE, Firefox, and Opera. I tried all the variations out there without luck some would work in IE, some in Firefox, etc.. So I finally got a tweaked version of some old code that actually works flawless in IE, Firefox, and Opera. I have included it below, but It needs 1 final tweak that I'm hoping someone in the community can help with.
i am NOT taking credit for this hack, all I have done is tweak it to get it working for me..
This code has been updated as of 8:30pm with the clickable link built in now!
Step 1: Edit your class_bbcode.php file located in (root/includes)
SiMateoAko AWESOME IT WORKS PERFECT!!!!!!!!! i just opened up a new forums 1 hour ago and of course some dude had to post a image that was so FREaking big and fked up the boards so i cam ehere ran a search and bam your fix owns THANKS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!11
I recommend Simateoako's version of this mod his is posted at post number #106 its nice and short only 1 line
There is a small problem with this and I had to remove it. It seems that when someone quotes a message with images in it they do not always parse correctly for the text editor.
There is a small problem with this and I had to remove it. It seems that when someone quotes a message with images in it they do not always parse correctly for the text editor.
I'm going to have to look into it a bit more.
I just replaced the code as follows and it appears to be working correctly. i'll give an explanation below for people to understand.
I'm not sure if something is seeing is related to this hack or not but in either case, I could use a little help.
I'm seeing some weird behavior, ONLY in IE. The image in question is being resized properly but the page is still going wide...even though the image isn't even wide enough to caus that to begin with!
Here's what I've discovered. If I paste the page source into Dreamweaver and save it and preview it in IE, the page is still strtched wide, inspite of all the missing css and images...so I start debugging and find the fulcrum upon which this behavior tilts.
A style attribute in firefox is "max-width," and it does everything we want it to do. "max-height" is also a style attribute.
IE, in it's infinite wisdom, decided to not include this style attribute. As a result we have to use a java expression to resize the image.
In the past there were issues if I quoted a post with an image in it, but it appears to be better now that the two style expressions are seperate.
With any luck IE will add the "max-width" and "max-height" expression for future versions of IE.
I added this to my forum and it works great,I was wondering if i might make a request.Can someone add a code to this current code that gives the option to make the resized image clickable to view the full image in a new window?
I tryed this hack before https://vborg.vbsupport.ru/showthrea...t=99286&page=7 which does have that option but i had loads of trouble getting it to work.Sometimes it would work others it would not especially in IE6.Thanks also note im using VB 3.5.4 if thats of any relivence.
A style attribute in firefox is "max-width," and it does everything we want it to do. "max-height" is also a style attribute.
IE, in it's infinite wisdom, decided to not include this style attribute. As a result we have to use a java expression to resize the image.
In the past there were issues if I quoted a post with an image in it, but it appears to be better now that the two style expressions are seperate.
With any luck IE will add the "max-width" and "max-height" expression for future versions of IE.
Awesome code! Although I have a problem...
See, the reason I needed an image resizer was mostly for my news fetch (click here to see what I mean). I'm perfectly fine with everything, except the bbs main body is actually larger than the news fetch body, and it poses a problem with signatures. I'm ok with main body images being resized, but is there a way to keep signatures unaffected by image resizes? Or, even better, make it so that the signature images have a different resize limit?
EDIT: Nevermind, I found out how to make the image stay at it's normal size unless it stretches the page. Just replace this: