Jump to content

  • twitter
  • youtube
  • googleplus
  • facebook
  • rss
  • newsletter


Tutorial info Visit support topic

  • Added on: Feb 24 2009 03:37 AM
  • Views: 5670
 


[IPB 2.3.x] HighSlide Intergation

Posted by Lindsey on Feb 24 2009 03:37 AM
With the following edits to your current forum skin, you will have highslide intergation into your forum.



First, download highslide, 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:

</head>

Add above:

<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>

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

	<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>

Change it to:

<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>

In the same template, find and remove this:

<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>

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

'notinline'   => $not_inline,

Add below:

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

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

Please do not release to the public. Thank you in advance. :)

Powered by Tutorials 1.4.1 © 2012, by Michael McCune