Quote:
Originally Posted by SVTBlackLight01
Here is an example:

|
hey, try to use
if(screen.width-255 < this.width)
instead of
if(this.width>screen.width-255)
in the condition, that would work:
PHP Code:
function handle_bbcode_img_match($link)
{
global $vboptions;
$link = strip_smilies(str_replace('\\"', '"', $link));
// remove double spaces -- fixes issues with wordwrap
$link = str_replace(' ', '', $link);
if ($vboptions['legacypostbit'])
{
return '<a href=' . $link . ' target="_blank"><img src="' . $link . '" onload="if(screen.width-255 < this.width) {this.width=screen.width-255;this.alt=\'Full View\';}" onmouseover="if(this.alt) this.style.cursor=\'hand\';" border="0"></a>';
}
else
{
return '<a href=' . $link . ' target="_blank"><img src="' . $link . '" onload="if(screen.width-80 < this.width) {this.width=screen.width-80;this.alt=\'Full View\';}" onmouseover="if(this.alt) this.style.cursor=\'hand\';" border="0"></a>';
}
}