MobileHacks
New Member
This is small hack and easy to resize large Images in tag with using Highslide.
Work with vbb 3.6.x and 3.7.x
[b][u] Install:[/u][/b]
1. Upload folder 'highslide' into forum root.
2. Edit file 'includes/class_bbcode.php'
find: [i]inline 1940 ~ 1955
[/i][html]return '<img src="' . $link . '" border="0" alt="" />';[/html]Replace with:
[html]/* 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 */[/html]You can change max width resize.
3. Import XML File: AdminCP -> Plugin System -> Manage Products -> Add / Import Product
[b]Update: Use [i]highslide[/i] for Attachment Thumbnail[/b]
4. Open Temp. [i]postbit_attachmentthumbnail[/i]
Replace with:
[html]<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>
<if condition="$show['br']"><br /><br /></if>[/html]
Work with vbb 3.6.x and 3.7.x
[b][u] Install:[/u][/b]
1. Upload folder 'highslide' into forum root.
2. Edit file 'includes/class_bbcode.php'
find: [i]inline 1940 ~ 1955
[/i][html]return '<img src="' . $link . '" border="0" alt="" />';[/html]Replace with:
[html]/* 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 */[/html]You can change max width resize.
3. Import XML File: AdminCP -> Plugin System -> Manage Products -> Add / Import Product
[b]Update: Use [i]highslide[/i] for Attachment Thumbnail[/b]
4. Open Temp. [i]postbit_attachmentthumbnail[/i]
Replace with:
[html]<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>
<if condition="$show['br']"><br /><br /></if>[/html]