Resize IMG tag with Highslide!

SpeedRazors

New Member
Install:
1. Upload folder 'highslide' into forum root.

2. Edit file 'includes/class_bbcode.php'
find: inline 1940 ~ 1955
Code:
Code:
return '<img src="' .  $link . '" border="0" alt="" />';
Replace with:
Code:
Code:
/* Start Image RESIZE */  

 $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 */
You can change max width resize.

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

Update: Use highslide for Attachment Thumbnail
4. Open Temp. postbit_attachmentthumbnail
Replace with:
PHP Code:
Code:
<a href="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&d=$attachment[dateline]" class="highslide" onclick="return hs.expand(this)" id="attachment$attachment[attachmentid]"><img class="thumbnail" src="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&stc=1&thumb=1&d=$attachment[thumbnail_dateline]" border="0" alt="<phrase 1="$attachment[filename]" 2="$attachment[counter]" 3="$attachment[filesize]" 4="$attachment[attachmentid]">$vbphrase[image_larger_version_x_y_z]</phrase>" style="width: expression(this.width > 140 ? 80 : true);" /></a>
&nbsp;<if condition="$show['br']"><br /><br /></if>
That´s all
Have fun!
 
Top