The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Adding Lightbox to Attachment thumbs Details »» | |||||||||||||||||||||||||
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" /> Step2: Now Open postbit_attachmentthumbnail Find: Code:
<a href="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&d=$attachment[dateline]"<if condition="$show['newwindow']"> target="_blank"</if>><img class="thumbnail" src="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&stc=1&thumb=1&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> <if condition="$show['br']"><br /><br /></if> Code:
<a rel="lightbox" href="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&d=$attachment[dateline]"<if condition="$show['newwindow']"> target="_blank"</if>><img class="thumbnail" src="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&stc=1&thumb=1&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> <if condition="$show['br']"><br /><br /></if> 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
|
Comments |
#2
|
||||
|
||||
installed its really good i love it
|
#3
|
||||
|
||||
wicked i will be installing
|
#4
|
|||
|
|||
Where exactly are you supposed to put that in the headinclude template? At the very top?
Im also a little confused where the files are uploaded to..... |
#5
|
|||
|
|||
Thanks for this. I installed it, it's great.
When I installed it though, it didn't work. I think that the second edit should be Code:
<a rel="lightbox" .... instead of Code:
<a rel="lightbpx" .... |
#6
|
|||
|
|||
Quote:
EDIT: imranbaig has a better solution |
#7
|
|||
|
|||
Sorry for that typo error.
In the headinclude template Paste it below this. Code:
<!-- CSS Stylesheet --> $style[css] <if condition="is_browser('opera') AND !is_browser('opera', '8.0.1')"> <style type="text/css"> ul, ol { padding-left:20px; } </style> </if> <!-- / CSS Stylesheet --> |
#8
|
|||
|
|||
Thanks imranbaig.
One question. As with the other lightbox mods that can be found on this site, also yours gives the problem that the quick edit does not work. It saves the data but it doesn't close the quick edit box. Would you happen to know how to fix this? |
#9
|
|||
|
|||
Well this is due the the script, I think the author of the scriipt has few tips for Collision of scripts, Here is the link = http://www.huddletogether.com/projects/lightbox2/ Look into support part.
Also If you want to have it like gallery where it shows Next and Prev Links in lightbox, just change rel="lightbox" to rel="lightbox[whatever]" |
#10
|
||||
|
||||
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? |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|