Resize IMG tag with Highslide

liesifoo

New Member
Version: 1.2.0

Install

1. Upload folder 'highslide' into forum root.

2. Edit file 'includes/class_bbcode.php'
find:
PHP:
return '<img src="' .  $link . '" border="0" alt="" />';

Replace with:
PHP:
/* Start Image RESIZE by ThaiNgoc MyTu */  

 $navigator_user_agent = ( isset( $_SERVER['HTTP_USER_AGENT'] ) ) ? strtolower( $_SERVER['HTTP_USER_AGENT'] ) : '';   
if (stristr($navigator_user_agent, "msie")) {   
    return '<a href="' .  $link . '" class="highslide" onclick="return hs.expand(this)" ><img src="' .  $link . '" border="0" alt="" style="width: expression(this.width > 340 ? 180 : true);" /></a>';   
} else {   
    return '<a href="' .  $link . '" class="highslide" onclick="return hs.expand(this)" ><img src="' .  $link . '" border="0" alt="" style="max-width: 430px;" /></a>';   
}    

/* End Image RESIZE by ThaiNgoc MyTu*/

You can change max width resize. :D

3. Import XML File: AdminCP -> Plugin System -> Manage Products -> Add / Import Product


Demo: click on picture
 

Danger

New Member
Although the demo does not work, as all images are hidden for visitors, but I will give this a try, thanks
 

Notam

New Member
Working perfectly on 3.7.2. It resize the signature file also which looks ok in FF3 but it IE7 it really resizes to very small image
 

Moegames

New Member
justed wanted to say thx.. great hack..works find on my site and i also edited alot of the stuff for my own personal taste.. lovely addon..
 
Top