vB 3.7.0 Beta 5 Show Thread Enhancements - Resize IMG tag with Highslide

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>
&nbsp;<if condition="$show['br']"><br /><br /></if>[/html]
 

baka

New Member
Thanks, this is just what I needed.

However, what are you talking about here
Update: Use highslide for Attachment Thumbnail
4. Open Temp. postbit_attachmentthumbnail

Open Temp? Temp what, I didn't find "temp" folder...or file for that matter anywhere.
 

MobileHacks

New Member
its not a folder! it a template you edit

Update: Use highslide for Attachment Thumbnail


4. Open Temp. postbit_attachmentthumbnail

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>
&nbsp;<if condition="$show['br']"><br /><br /></if>
baka said:
Thanks, this is just what I needed.

However, what are you talking about here


Open Temp? Temp what, I didn't find "temp" folder...or file for that matter anywhere.
 
Top