The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
![]() |
|||||||||||||||||||||||||
//////////////////////////////////////////////////////////////////\
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\/ ****LightBox for vBulletin Attachments By: Dave @ FightRice.com**** \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\/ //////////////////////////////////////////////////////////////////\ Ogrinal Version: ALl credit should go there, I Simply ported to vBulletin by myself ![]() View Second Post In Thread for more modifications: What this hack does is add a nice CSS and Javascript lightbox effect to your forums attachments. Attachments must be set to shown as thumb- nails and not inline. Attachments can not be posted using the [attach] id[/attach] bbCode at this time. Working Demo(s): (Send me your URL once you get it working) http://www.fightrice.com/forums/showthread.php?t=124 Now Lets Get Started 1. Open your adminCP - Styles and Templates - Template Manager - Postbit Templates - postbit OR postbit_legacy (only edit both if you use both) At The Very Top Add Code:
<!--LightBox By Dave At FightRice --> <if condition="$show['thumbnailattachment']"> <script type="text/javascript" src="clientscript/prototype.js"></script> <script type="text/javascript" src="clientscript/scriptaculous.js?load=effects"></script> <script type="text/javascript" src="clientscript/lightbox.js"></script> <!-- / Light Box --> <else /> <!-- Nothing To Load Here--> </if> <!-- /LightBox --> 2. Next open postbit_attachmentthumbnail find <a after add Code:
rel="lightbox[attachment]" 3. Next Open the headinclude template Find Code:
<!-- / CSS Stylesheet --> Code:
<link rel="stylesheet" href="clientscript/vbulletin_css/lightbox.css" type="text/css" media="screen" /> <!-- / CSS Stylesheet --> Thats all for template edits: Now upload the contents of the clientscript into your forums. You should end up with this structure /forums/clientscript/vbulletin_css/lightbox.css /forums/clientscript/ - All the .js files go inside this folder Next Upload the images into the webroot.ex http://www.yoursite.com/images/lightboximages.gif (note this isnt an actual image, its an example) Thats all there should be User Configuration Options below If you do not feel comfortable doing this, dont its not neccasary. if you come up with a cool effect please share it. |||||||||||||||||||||||||||||||||||||||||||||||||| ||||||||||||||||||||||||||||| ------------------------------------------------------------------------------- In the clientscript/lightbox.js file these lines you can config to suite your needs __________________________________________________ _________________________________ Code:
var fileLoadingImage = "/images/loading.gif"; var fileBottomNavCloseImage = "/images/closelabel.gif"; var resizeSpeed = 7; // controls the speed of the image resizing (1=slowest and 10=fastest) var borderSize = 10; //if you adjust the padding in the CSS, you will need to update this variable clientscript/vbulletin_css/lightbox.css Of Course can also be edited to make it unique to your needs. Thats All, Make sure you click install, and nominate for Hack Of The Month! If you like and wish to see other cool releases please donate via paypal, marcia@secondhomekennel.com or a simple link back will rock as well Code:
<a href="http://www.FightRice.com" target="_blank">Fight Rice</a> CLICK INSTALL TO GET SUPPORT! also a nomination for hack of the month wouldnt hurt ![]() THIS IS FOR THE IMAGE RESIZE VERSION - USE lightboxresize.zip DO NOT USE BOTH! /////////////////////////////////////////////////////////////\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\/ Dynamic Lightbox auto resize - and image overlay. /////////////////////////////////////////////////////////////\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\/ If using a previous version of this hack, please remove all instances, delete all old files and undo any templae edits. easy way is to simply follow the old instructions, and simply remove things instead of add. This lightbox will automatically resize images to your screen, and all for full size viewing. Feel free to edit as you see fit. First Step. open lightbox_plus.js at the very end find Code:
// === PLEASE EDIT TO MATCH YOUR SITE === addEvent(window,"load",function() { var lightbox = new LightBox({ loadingimg:'http://www.YOURSITE.com/images/loading.gif', expandimg:'http://www.YOURSITE.com/images/expand.gif', shrinkimg:'http://www.YOURSITE.com/images/shrink.gif', effectimg:'http://www.YOURSITE.com/images/zzoop.gif', effectpos:{x:-40,y:-20}, effectclass:'effects', closeimg:'http://www.YOURSITE.com/images/close.gif' }); }); Save and close. Create the zzoop.gif image to match your site, Upload lightbox_plus.js to the /yourforumlocation/clientscript folder Upload lightbox.css into /yourforumlocation/clientscript/vbulletin_css folder Upload all images into http://www.YOURSITE.com/images *MAKE SURE ALL PREVIOUS INSTALLATIONS ARE REMOVED AT THIS POINT* Login to AdminCP -> Styles Templates -> headinclude template add at the very end. Code:
<link rel="stylesheet" href="clientscript/vbulletin_css/lightbox.css" type="text/css" media="screen,tv" /> Next open the postbit_attachmentthumbnail After <a add Code:
rel="lightbox" Code:
class="effects" in the postbit_legacy or postbit, place this code at the very top Code:
<script type="text/javascript" src="clientscript/lightbox_plus.js"></script> Enjoy it. Show Your Support
|
Comments |
#192
|
|||
|
|||
![]()
perfect for this
|
#193
|
||||
|
||||
![]()
Does anyone have this working without breaking the Quick Edit feature?
|
#194
|
|||
|
|||
![]() Quote:
I concur. Noticed it too. Any inclusion of prototype.js also breaks the internal vbulletin's js iteration. Eg: if you attempt to del thread and such, under the Go() button, the counter does not update correctly. On Firefox, the QWSIWYG editor also behaves weirdly. |
#195
|
|||
|
|||
![]()
Anyone know how I can put the image filename at the bottom between Image 2 of 2 and the close button? Also if possable to strip the extention?
|
#196
|
||||
|
||||
![]()
Does or does it not work with 3.6.8?
How's about 3.7.x? |
#197
|
|||
|
|||
![]()
Did you modify the lightbox plus code? In the original the effects are called effectable however when I change it it gives a scripting error in IE. Also, I can't get the zzoop watermark to work, paths are correct. For the rest it's working in 3.6.8 without glitches in quick reply & multiquote but I also can't click to resize the pics (I see the js is missing the resizable:true statement but adding that gives that same scripting error again) What gives?
|
#198
|
|||
|
|||
![]()
oops nvm
|
#199
|
|||
|
|||
![]()
I got it all working but found a little issue.
When someone attaches pics the lightbox works fine and the anchor gets the rel"lightbox" like it should. However when someone uses the attachment manager in the vb editor toolbar to place the attachments in his post and surround it by text or whatever, then all of a sudden it doesn't work anymore. Checking the code results in it getting rel="lightbox[attachment]" like in the postbit_attachmentthumbnail edit for the normal version. I checked it and the code I entered is the other one (rel="lightbox") anyone know where the other one comes from? If I can find it i can remove [attachment] to make it work in all instances. |
#200
|
|||
|
|||
![]()
never mind, fixed it, was in bbcode class.
|
#201
|
|||
|
|||
![]()
How much will cost me if you implement this on my site and let it work fine?
Send me a PM |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|