Log in

View Full Version : Show Thread Enhancements - Use Highslide in Attachment Thumbnails [ and in line with attach bbcode ]


xplan2007
12-08-2009, 10:00 PM
First Download newest version of HS from: http://highslide.com/download.php.
Upload highslide directory to your Forums root. ( I use Highslide 4.1.8 )

For attachment

Template edits:

Postbit Templates >> postbit_attachmentthumbnail
Find this

<a href="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;d=$attachment[dateline]" rel="Lightbox_$post[postid]" id="attachment$attachment[attachmentid]"<if condition="$show['newwindow']"> target="_blank"</if>

Replace with

<a href="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;d=$attachment[dateline]" <if condition="$show['newwindow']"> target="_blank"</if>class="highslide" onclick="return hs.expand(this)">


Open headinclude, somewhere add:

<script type="text/javascript" src="highslide/highslide.js"></script>
<link rel="stylesheet" type="text/css" href="highslide/highslide.css" />

<script type="text/javascript">
hs.graphicsDir = 'highslide/graphics/';
hs.wrapperClassName = 'wide-border';
</script>

---------------------------------------------------------------
For Attac in line [attach] bbcode in post

open \include\class_bbcode.php

line 1905
Find


rel=\"Lightbox_" . $this->containerid . "\" id=\"attachment\\1\"


Replace with

class=\"highslide\" onclick=\"return hs.expand(this)\"


For Highslide css you need to be edit by yourself

Credit thank to luki who is make this first ( his modification for 3.7.4 (https://vborg.vbsupport.ru/showthread.php?t=197901) )

Taurus1
12-11-2009, 11:45 AM
This is really awesome!! The only problem I have is the last PHP code edit. When I do this I get a line error and just a black screen. Can you please advise on this!!

Thank you!

xplan2007
12-13-2009, 05:52 PM
be careful when edit php code , it's very sensitive
please show your code

Taurus1
12-23-2009, 03:55 AM
This is my code in the php code: rel=\"Lightbox_" . $this->containerid . "\" id=\"attachment\\1\"

I see a backslash in there that yours don't have!

I get this error when doing the php code:

Parse error: syntax error, unexpected T_STRING in /home/thebull/public_html/forums/includes/class_bbcode.php on line 1905

Taurus1
12-23-2009, 04:34 AM
OK, I figured this out. You have to find this code (with the backslash after the rel=):

rel=\"Lightbox_" . $this->containerid . "\" id=\"attachment\\1\"

and replace it with this one:

class=\"highslide\" onclick=\"return hs.expand(this)\"

add a backslash after class=

Then it works great!!

angeljs
10-10-2010, 10:26 PM
Works great...just what I've been looking for :)