Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Adding Lightbox to Attachment thumbs Details »»
Adding Lightbox to Attachment thumbs
Version: 1.00, by imranbaig imranbaig is offline
Developer Last Online: Aug 2013 Show Printable Version Email this Page

Version: 3.6.0 Rating:
Released: 08-05-2006 Last Update: Never Installs: 75
 
No support by the author.

Adding Lightbox to Attachment thumbs
Overview
Lightbox JS is a simple, unobtrusive script used to overlay images on the current page. It's a snap to setup and works on all modern browsers.

-This hack allows you to add the famous lightbox to attachment thumbnails.

- This makes users see attached images easilly, without having to open another page.

- It can be completly customised, to fit into your skin design, from css.

Installation - Very easy.

Download and upload the contents of upload folder into your forum root.

Template Edits.

Step1: Open headinclude, and insert this inside <heade></head>

Code:
<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="js/lightbox.js"></script>
<link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />
click Save.

Step2: Now Open postbit_attachmentthumbnail

Find:
Code:
<a href="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;d=$attachment[dateline]"<if condition="$show['newwindow']"> target="_blank"</if>><img class="thumbnail" src="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;stc=1&amp;thumb=1&amp;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>" /></a>
&nbsp;<if condition="$show['br']"><br /><br /></if>
Replace With:
Code:
 <a rel="lightbox" href="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;d=$attachment[dateline]"<if condition="$show['newwindow']"> target="_blank"</if>><img class="thumbnail" src="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;stc=1&amp;thumb=1&amp;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>" /></a>
&nbsp;<if condition="$show['br']"><br /><br /></if>
Thats it Enjoy The hack.

Demo: http://forums.winkeyfinder.com/showthread.php?p=1502

Note: It doesn't work if I click an image link before the page has finished loading.
The script is activated only after the page has finished loading.

Thank you!

All the Credit goes to huddletogether.com, for devloping such a beautifull script.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 08-11-2006, 06:45 PM
Ntfu2 Ntfu2 is offline
 
Join Date: Feb 2006
Posts: 1,247
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My version from 3.5 still works perfectly with 3.6, and even has some extra options and info in the thread, and doesnt have the undefined error if you are looking for a fix for that.

https://vborg.vbsupport.ru/showthread.php?t=115701
Reply With Quote
  #23  
Old 08-11-2006, 08:34 PM
effectica effectica is offline
 
Join Date: Jan 2006
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Ntfu2
My version from 3.5 still works perfectly with 3.6, and even has some extra options and info in the thread, and doesnt have the undefined error if you are looking for a fix for that.

https://vborg.vbsupport.ru/showthread.php?t=115701

Hi,
does inline editing work with your hack installed?
Reply With Quote
  #24  
Old 08-11-2006, 09:47 PM
Ntfu2 Ntfu2 is offline
 
Join Date: Feb 2006
Posts: 1,247
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes,

everything works perfect. This version of the hack is missing a few vBulletin specific items it needs to function correctly.

While mine works perfectly within the vBulletin pages
Reply With Quote
  #25  
Old 08-13-2006, 10:11 AM
aycan555 aycan555 is offline
 
Join Date: Dec 2005
Location: www.ultrapaylasim.com
Posts: 142
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Verry shine thank you...
Reply With Quote
  #26  
Old 08-14-2006, 09:18 AM
mahakala mahakala is offline
 
Join Date: Jul 2006
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

what does this plugin do when the attachment is ".rar", ".zip" or else?
Reply With Quote
  #27  
Old 08-14-2006, 10:02 AM
ForumDog ForumDog is offline
 
Join Date: Jul 2006
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by effectica
Hi imranbaig,
thanks for the help, but I've tried your mod (installed it from scratch twice) as well as other similar mods. The result has always been the same. I've also seen in the threads of these other hacks, people having the exact same problems.

I know it is not a problem of how you coded the hack. I love it and I appreciate the time you put on this, but I can only imagine that the javascript that comes with lightbox is causing problems with some vb javascript.
There are obviously problems with the way lightbox integrates with vb, since lightbox wasn't written for vb originally. So when I said "I guess it is not easy to fix" I didn't mean that as in fixing your hack. I was just saying that it is probabily not easy to modify the lightbox code so that it doesn't break certain vb features.
I know that a modification I did, which used javascript interaction with Quick-Reply, didn't work in Internet Explorer. I tried four methods of doing the same thing, same result every time. Code validated, no errors or issues. It just didnt work. IE seemed to have problems with the textarea being the target of two javascript functions from different places. It is, to be fair, a very bugged browser and it worked perfectly in every other browser for every method I tried so I could only conclude that it was some kind of issue with IE and I ended up restricting the modification with a conditional that barred it from loading in IE.

Might have been some kind of browser-specific shennanigans in the forum code itself I suppose.
Reply With Quote
  #28  
Old 08-17-2006, 07:24 PM
imranbaig imranbaig is offline
 
Join Date: Sep 2005
Location: India
Posts: 157
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

.rar and other files work fine with out a problem,..
Check it here: http://forums.winkeyfinder.com/showthread.php?t=1199
Reply With Quote
  #29  
Old 08-21-2006, 07:38 AM
upsetter upsetter is offline
 
Join Date: Aug 2006
Location: Toronto, On.
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Allan
There are a problem

Under FF, Attachment thumbs, it's ok, but with IE, Attachment thumbs don't show

and looking this:

I have the exact same problem on my forum, but my attached file shows at the bottem, and when I submit it the thumb. on the forum works perfectley but I got the same problem as you, says " undefined (undefined) "

Reply With Quote
  #30  
Old 08-21-2006, 08:37 AM
tappedout's Avatar
tappedout tappedout is offline
 
Join Date: Apr 2006
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works Great thanks!! I had the same script on my home page it ties in great now to have it on the forums! Thanks a ton!!

*Clicks install!

www.sectionviiiclan.com
Reply With Quote
  #31  
Old 08-21-2006, 11:34 AM
P.Jackson P.Jackson is offline
 
Join Date: Sep 2003
Location: Newcastle,Uk
Posts: 170
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

im getting that undefined problem aswell
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:55 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.05017 seconds
  • Memory Usage 2,312KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete