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)
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:
I had the first code and it worked in both IE,FF,opera and netscape.
Oh yeah, that code worked flawlessly, but what I'm trying to do is to have the image go to the maximum width it can without stretching if it causes the table to stretch. Putting 100% seems to make that work in FF, but not IE. To see what I mean, look at the below page in both IE and FF:
Yeah i know what you mean,I have been trying to do the same with the script found on a previous page but it seems the script will not accept sizes in % rather then pixels.I liked that script over the one you are looking at mainly due to the fact that it has the ability for a user to click the resized image to display the original image in a new window.It seems vB doesnt allow to many things in % in it's code not even the sizes for the text editor which would be really handy.
Yeah i know what you mean,I have been trying to do the same with the script found on a previous page but it seems the script will not accept sizes in % rather then pixels.I liked that script over the one you are looking at mainly due to the fact that it has the ability for a user to click the resized image to display the original image in a new window.It seems vB doesnt allow to many things in % in it's code not even the sizes for the text editor which would be really handy.
vB is not the problem here, what is the problem is IE, because that's what can't detect the coding. I'm not looking for a code with a clickable image if it gets too big because then you can't use the [url] BBCode with it, and that's really annoying. My philosophy is, if it's the width of the table, it's big enough for you to see anyways.
Some of you may have editted your class_bbcode.php ( as per my instructions before ) to have it work correctly. I'd now recommend you don't do that and just add a few lines to your CSS file instead.
The benefits of doing it this way are hopefully obvious. No code changes are required, so upgrading won't be an issue.
IE is the real problem here b/c they are not totally CSS2 compliant. I believe it's been fixed with IE7, but the second statement (width: expression..) is just for people using old browsers.
Some of you may have editted your class_bbcode.php ( as per my instructions before ) to have it work correctly. I'd now recommend you don't do that and just add a few lines to your CSS file instead.
The benefits of doing it this way are hopefully obvious. No code changes are required, so upgrading won't be an issue.
IE is the real problem here b/c they are not totally CSS2 compliant. I believe it's been fixed with IE7, but the second statement (width: expression..) is just for people using old browsers.
Where do we add this? What file, where? Can you elaborate?