Jump to content
DevFuse Forums
Sign in to follow this  

[IPB 2.3.x] HighSlide Intergation


[size=4][i]With the following edits to your current forum skin, you will have highslide intergation into your forum. [/i][/size]



First, download [url="http://highslide.com"]highslide[/url], extract the zip file, and upload the 'highslide' folder to your forum's jscripts folder. The directory structure should look like this:

ROOT/jscripts/highslide/graphics/
ROOT/jscripts/highslide/highslide.css
ROOT/jscripts/highslide/highslide.js
Etc.

Next, edit your skin's wrapper, find:

[code]</head>[/code]

Add above:

[code]<script type="text/javascript" src="jscripts/highslide/highslide.js"></script>
<link rel="stylesheet" type="text/css" href="jscripts/highslide/highslide.css" />
<script type="text/javascript">
// override Highslide settings here
// instead of editing the highslide.js file
hs.graphicsDir = 'jscripts/highslide/graphics/';
</script>[/code]

Save the wrapper, repeat for each skin. Next, edit your Topic View -> Show_attachments_img_thumb template, find this :

[code] <div id='ipb-attach-div-{$data['_attach_id']}'>
<div id='ipb-attach-ct-{$data['_attach_id']}'></div>
<a id='ipb-attach-url-{$data['_attach_id']}' href="{$this->ipsclass->base_url}act=attach&amp;type={$data['type']}&amp;id={$data['attach_id']}" title="{$data['location']} - {$this->ipsclass->lang['attach_size']} {$data['file_size']}, {$this->ipsclass->lang['attach_ahits']} {$data['attach_hits']}" target="_blank"><img src="{$this->ipsclass->vars['upload_url']}/{$data['t_location']}" id='ipb-attach-img-{$data['_attach_id']}' style='width:{$data['t_width']};height:{$data['t_height']}' class='attach' width="{$data['t_width']}" height="{$data['t_height']}" alt="{$this->ipsclass->lang['pic_attach']}" /></a>
<div id='ipb-attach-cb-{$data['_attach_id']}' style='margin:0px'></div>
</div>[/code]

Change it to:

[code]<a href="{$this->ipsclass->vars['upload_url']}/{$data['_location']}" class="highslide" onclick="return hs.expand(this)">
<img src="{$this->ipsclass->vars['upload_url']}/{$data['t_location']}" style='width:{$data['t_width']};height:{$data['t_height']}' width="{$data['t_width']}" height="{$data['t_height']}" alt="{$this->ipsclass->lang['pic_attach']}" />
</a>[/code]

In the same template, find and remove this:

[code]<script type='text/javascript'>
//<![CDATA[
fix_linked_image_sizes_attach_thumb( "{$data['_attach_id']}", parseInt("{$data['o_width']}"), parseInt("{$data['o_height']}"), "{$data['file_size']}" );
//]]>
</script>[/code]

Save the template, repeat for each skin. Finally, edit your sources/classes/attach/class_attach.php file, find this (on about line 475):

[code]'notinline' => $not_inline,[/code]

Add below:

[code]'_location' => $row['attach_location'],[/code]

Save and upload. Let me know if you have any problems. :)

[i]Please do not release to the public. Thank you in advance. :)[/i]


Recommended Comments

There are no comments to display.

×