Back to vBulletin 3.6 Template Modifications

Adding Lightbox to Attachment thumbs
Mod Version: 1.00, by imranbaig

This modification is in the archives.
vB Version: 3.6.0 Rating: (2 votes - 5.00 average) Installs: 75
Released: 06 Aug 2006 Last Update: Never Downloads: 398
Not Supported  

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 http://www.huddletogether.com/projects/lightbox2/, for devloping such a beautifull script.

Download

This modification is archived, downloads are still allowed.

File Type: %1$s lightbox-attachment-thumb-integration.zip (37.2 KB, 735 downloads)

Addons

Screenshots

Click image for larger version
Name:	lightbox-integration.jpg
Views:	3154
Size:	98.7 KB
ID:	51714  

Similar Mods

vBulletin Attachment Lightbox vBulletin 3.5 Template Modifications
Add-On Releases Lightbox/thickbox for attachment on CMPS module vBulletin 3.6 Template Modifications

vblts.ru supports vBulletin®, 2022-2024