vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=236)
-   -   Show Thread Enhancements - Use Highslide in Attachment Thumbnails [ and in line with attach bbcode ] (https://vborg.vbsupport.ru/showthread.php?t=229837)

xplan2007 12-08-2009 10:00 PM

Use Highslide in Attachment Thumbnails [ and in line with attach bbcode ]
 
1 Attachment(s)
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
HTML Code:

<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
HTML Code:

<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:
HTML Code:

<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

PHP Code:

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

Replace with
PHP Code:

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 )

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=):

PHP Code:

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

and replace it with this one:

PHP Code:

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


All times are GMT. The time now is 01:18 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01934 seconds
  • Memory Usage 1,730KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_html_printable
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete