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
  #12  
Old 08-07-2006, 04:53 PM
effectica effectica is offline
 
Join Date: Jan 2006
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by bitg
Well, I followed the instructions to the letter, yet it does not work. I uploaded all the files and made the edits. When I click on the thumbnail in my forums, it just displays it like it always did b4.

See for yourself.
http://www.pcinfoman.com/vbb350/show...?p=193#post193
Username: testing
Password: testing

Ideas?
Make you sure you used:

<a rel="lightbox" ....

instead of

<a rel="lightbpx" ....
Reply With Quote
  #13  
Old 08-07-2006, 05:47 PM
imranbaig imranbaig is offline
 
Join Date: Sep 2005
Location: India
Posts: 157
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey man, You have it like <a rel="lightbpx" , pls change it to <a rel="lightbox" this happend while I was typing it. Sorry about it.
I cant edit the above post to correct it, If any mod can it will help many others who will implement this.
Thanks.
Reply With Quote
  #14  
Old 08-07-2006, 06:38 PM
Allan's Avatar
Allan Allan is offline
 
Join Date: Jun 2003
Location: France
Posts: 1,513
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for this hack

it work for me if i put this: <a rel="lightbox" .... .... and no <a rel="lightbpx" ....

Click install ^^
Reply With Quote
  #15  
Old 08-07-2006, 07:29 PM
Allan's Avatar
Allan Allan is offline
 
Join Date: Jun 2003
Location: France
Posts: 1,513
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There are a problem

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

and looking this:

Reply With Quote
  #16  
Old 08-07-2006, 09:33 PM
Holidazed's Avatar
Holidazed Holidazed is offline
 
Join Date: May 2002
Location: Van Nuys, CA
Posts: 713
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by effectica
Make you sure you used:

<a rel="lightbox" ....

instead of

<a rel="lightbpx" ....
D'Oh!! Thanks. That fixed it.
Reply With Quote
  #17  
Old 08-07-2006, 09:39 PM
effectica effectica is offline
 
Join Date: Jan 2006
Posts: 14
Благодарил(а): 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:

Yes, same problem here. I guess it is not an easy thing to fix :surprised:
Reply With Quote
  #18  
Old 08-08-2006, 01:59 AM
mvigod mvigod is offline
 
Join Date: Dec 2001
Location: Jersey
Posts: 159
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

We looked at this lightbox script awhile ago but the filesize payload on those .js files is way too heavy. Take a look at them and decide if you want members to pay that download hit when viewing your site. I wouldn't use it on high traffic site or for sites where users are not on broadband
Reply With Quote
  #19  
Old 08-08-2006, 11:47 AM
imranbaig imranbaig is offline
 
Join Date: Sep 2005
Location: India
Posts: 157
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by effectica
Yes, same problem here. I guess it is not an easy thing to fix :surprised:
This problem is nothing to do with hack, You are effectively adding one rel tag to yur anchor tag, thats all and nothing.
Try removing the hack, and see if it still has the same problem.

Can you give me access to your admincp, I will try and fix it?

mvigod, You can easilly creat a Conditional statement which will enable this hack only for a certain group of members.
If you want help in this pm me.
Reply With Quote
  #20  
Old 08-08-2006, 12:40 PM
effectica effectica is offline
 
Join Date: Jan 2006
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by imranbaig
This problem is nothing to do with hack, You are effectively adding one rel tag to yur anchor tag, thats all and nothing.
Try removing the hack, and see if it still has the same problem.

Can you give me access to your admincp, I will try and fix it?

mvigod, You can easilly creat a Conditional statement which will enable this hack only for a certain group of members.
If you want help in this pm me.
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.

Quote:
You are effectively adding one rel tag to yur anchor tag
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.

Quote:
Try removing the hack, and see if it still has the same problem.
Yes, by removing the hack everything turns back to normal.

Support on the lightbox authors site, about various issues, is not helpful in this case.

Anyway, thanks for the hack and support. I didn't mean to be unappreciative towards your work.
Reply With Quote
  #21  
Old 08-11-2006, 01:38 PM
Allan's Avatar
Allan Allan is offline
 
Join Date: Jun 2003
Location: France
Posts: 1,513
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No fix bug ?
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 11:22 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.06085 seconds
  • Memory Usage 2,315KB
  • 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
  • (7)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
  • (3)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