Quote:
Originally Posted by SiMateoAko
I just replaced the code as follows and it appears to be working correctly. i'll give an explanation below for people to understand.
replace this line in your class_bbcode.php file:
Code:
return '<img src="' . $link . '" border="0" alt="" />';
With this line:
Code:
return '<img style="max-width:800px;" style= "width: expression(this.width > 800 ? 800: true);" src="' . $link . '" border="0" alt="" >';
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.