return '<img src="' . $link . '" onload="if(largerThan(this.width,700)) {this.width=700;this.alt=\'Click here to see a large version\';}" onmouseover="if(this.alt) this.style.cursor=\'pointer\';" onclick="if(this.alt) window.open(\'' . $link . '\');" border="0" />';
Step2. Modify the common template of your template set
Add this to the headinclude section:
Code:
<script type="text/javascript">
function largerThan(a,b)
{
return a>b;
}
</script>
Well, what I don't like about this so far is that it's never working on IE for me, and it also limits the size in the signatures. I'm looking for something that is only limited in the post and the signature limits do their own work. >_<;
Well, what I don't like about this so far is that it's never working on IE for me, and it also limits the size in the signatures. I'm looking for something that is only limited in the post and the signature limits do their own work. >_<;
Mod is not working for me in IE either, only in FireFox, what gives? Can someone help!!?
Mabey it has something to do with where you place it? Vtec please post a few lines above and below where you posted the text and anything else that might help us. I cannot get it to work either on my site Firefox fine, but ie 6+ does not.
Some guide questions for users in trouble (with IE), please answer them so I could have the clue to solve your problem.
1. Can you see the demo working on IE? (Can -> 2, Cannot->3)
2. Please let me see your forum page where this mod is applied.
3. If you cannot see it working, what version of IE are you using?
return '<img src="' . $link . '" onload="if(largerThan(this.width,700)) {this.width=700;this.alt=\'Click here to see a large version\';}" onmouseover="if(this.alt) this.style.cursor=\'hand\';" onclick="if(this.alt) window.open(\'' . $link . '\');" border="0" />';
in Firefox it resizes fine in IE this is what I get..
Mabey it has something to do with where you place it? Vtec please post a few lines above and below where you posted the text and anything else that might help us. I cannot get it to work either on my site Firefox fine, but ie 6+ does not.
It's in the PHP function handle_bbcode_img_match you need to make the change. In that function it is quite clear where the change must be applied (it's a very small function).
Also, as an addition, there is no need to define the largerThan() function. Using
Code:
if (this.width > 700)
works just as well. I've tested this and it works beautifully on Firefox 1.5b2, IE6sp1, Opera 8.
I have modified the original HTML a bit, since I didn't like it. I use the title attribute instead of the alt attribute, since HTML standards state that the alt attribute is to be used by screen reading software, whereas the title attribute is usually used to display a 'tooltip' when the mouse is positioned above the element in question.
Also, the hand pointer one sees when the mouse is moved over a link is actually a cursor called pointer, not hand, in the standards.
I modified the handle_bbcode_img_match function in the file includes/class_bbcode.php.
Works in all browsers I've tested it in. If it works in Firefox but not IE, I would say the best bet is to check the IE settings. JavaScript may be fully or partially disabled.
return '<img src="' . $link . '" onload="if(largerThan(this.width,700)) {this.width=700;this.alt=\'Click here to see a large version\';}" onmouseover="if(this.alt) this.style.cursor=\'hand\';" onclick="if(this.alt) window.open(\'' . $link . '\');" border="0" />';
in Firefox it resizes fine in IE this is what I get..
I see the mod working for your site in IE. Maybe the mod is affected by some Javascript settings in IE? What version of IE are you using?
Quote:
Originally Posted by kONGO
It's in the PHP function handle_bbcode_img_match you need to make the change. In that function it is quite clear where the change must be applied (it's a very small function).
Also, as an addition, there is no need to define the largerThan() function. Using
Code:
if (this.width > 700)
works just as well. I've tested this and it works beautifully on Firefox 1.5b2, IE6sp1, Opera 8.
The ">" will cause problem when you try to edit the post.