View Full Version : Lightbox for reptile keepers -


CeraDigital.com
01-15-2009, 06:40 AM
I've seen a lot of questions on how to use lightbox for your websites on various forums, when it comes to making a photo gallery. Lightbox is an amazing tool that rids the problem you have of having obstructive new windows pop up, new tabs, or loading the image in a new URL. One good use of lightbox is kingsnake.com's classifieds section, with images. I'm going to run you through a quick guide on using Lightbox, thats down to the point.

Lightbox is free to download, and use, without giving credit to the original creators. Its sharp, fast, and quite nice looking. Download lightbox at http://www.dynamicdrive.com/dynamicindex4/lightbox2/index.htm

Click on the link labeled "Simply download Lightbox V2.03a,". Put the folders and files into the same folder as your website, on your computer in order to test it, modify it, and work out any quirks. The 3 folders included are..

-css- contains all the files to give lightbox its appearance, size, and centering properties.
-js- contains all the action and variable commands and scripting to make lightbox operate.
-images- Contains all the images for lightbox to operate visually, including the ajax-loading icon, next & previous tabs, and the close tab.

The only two folders you will need to modify if you want to edit lightbox for a custom theme are the .css file, and the images. You will not need to edit the javascript files. The js files are already configured fairly well for a proper loading time & such.

To install
Simply add this coding into the head of your website. You can do this with html editors such as dreamweaver, nvu, or simply use notepad.

<html>
<head>
<title></title>

<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" />

</head>
<body>
</body>
</html>
Copy or move the folders into your website folder. If you already have an "images" folder, just open the images folder for both lightbox, and your website, and just copy the images from lightboxes folder into your images folder.

Thats it! You're all set with installing it into your website pages.
Now to link it.

<html>
<head>
<title></title>
<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" />
</head>
<body>

<a href="images/image.jpg" rel="lightbox"><img src="images/imagethumb.jpg"></a>

</body>
</html>
What we did here was put in an image thumbnail of the larger image with the code <img src="images/imagethumb.jpg">, and linked it with the larger image with the a link attribute tag, <a href="images/image.jpg" rel="lightbox"> " " </a>. What we did in order to activate lightbox was added in the rel="lightbox" into the link code in order to tell that link to activate lightbox for use. After that, you're all set! I understand a complete website will have much more coding and html than this, but I didn't want to confuse anyone, and get down to the point on using lightbox.

Just upload the folders and files just like they're set inside your website folder, update your .html files that have this linked into it, and viola! Instant photo gallery. Tomorrow when I catch time, I'll be making a tutorial on customizing it. If you want to see any customizations, I've already done one to B.T.'s site... www.rebelreptiles.com .... just check out the photogallery.

-Andrew

xanaxez
01-15-2009, 06:46 AM
tried to check it out but its unable to find the server

CeraDigital.com
01-15-2009, 06:52 AM
If it was Bt's site you were trying to check out, it's fixed. I mis-spelled his site, but I corrected it.

I typed it as rebelreptles.com, when it should've been rebelreptiles.com. :cheers:

JChandler
01-15-2009, 06:55 AM
Sounds like a cool set up, can't remember what the gallery at BT's site looked like before the change but I like the way it runs now :cheers:

m00kfu
01-15-2009, 12:08 PM
I'd just like to add that there are lightbox alternatives out there, that are better optimized programming wise. This usually results in a smaller file size and quicker load times for the end user. I use slimbox for my website, it's completely interchangeable with lightbox which means all you have to do is replace the lightbox files on your server and everything will work without having to change any of your html code.

FloridaHogs
01-15-2009, 12:23 PM
Copy or move the folders into your website folder. If you already have an "images" folder, just open the images folder for both lightbox, and your website, and just copy the images from lightboxes folder into your images folder.

This is the part I do not understand. What do you mean my website folder? The program I uses saves my website as a .npp document. When I want to insert HTML code into it, I get a window that looks like this

http://i20.photobucket.com/albums/b214/FloridaHogs/2009-01-15_112022.png

This is where all my confusion is coming into play. I never see the HTML code for my website. Any brochure, document, even my business card can be turned into a webpage....the program does all the coding for me.

Rapture
01-15-2009, 12:24 PM
I also use Slimbox. It does run a bit faster but not that huge of a difference in my opinion. I don't really know anything about these programs and javascript or css. I learned how to get it working from this video tutorial on You Tube. http://www.youtube.com/watch?v=YMispygQGJE. The video is now a little outdated as they have made updates to slimbox, but it's still a great visual when words only aren't enough - especially if you've never worked with anything like it before (all I know is some HTML).

I don't remember what the site looked like before the change, but I like the customizations that you made to the lightbox. One suggestion though, is to put for example, all the albino photos in the same lightbox group so that you can just click next so see the rest of the albino pics instead on clicking on each individual photo. I find browsing photos a bit more convenient this way.

CeraDigital.com
01-15-2009, 04:22 PM
I'm still editing his website, D. I haven't really uploaded anything other than the lightbox css file. I'm doing all of that offline, until the website is completely finished, and we can just upload it all in one shot. When that is done, It'll be on there :)

CeraDigital.com
01-15-2009, 04:23 PM
This is the part I do not understand. What do you mean my website folder? The program I uses saves my website as a .npp document. When I want to insert HTML code into it, I get a window that looks like this

http://i20.photobucket.com/albums/b214/FloridaHogs/2009-01-15_112022.png

This is where all my confusion is coming into play. I never see the HTML code for my website. Any brochure, document, even my business card can be turned into a webpage....the program does all the coding for me.

Where it says html head code, paste the links for all the files, such as the javascript, and css files. After that, browse through the html body code for the images you want to link, link them, and then click ok :)

FloridaHogs
01-15-2009, 05:04 PM
OK I can find the CSS code to put in the head. But what do you mean link the files? And where do I find the html body code?? I have looked and I can't find it anywhere.....

FloridaHogs
01-15-2009, 05:06 PM
I also use Slimbox. It does run a bit faster but not that huge of a difference in my opinion. I don't really know anything about these programs and javascript or css. I learned how to get it working from this video tutorial on You Tube. http://www.youtube.com/watch?v=YMispygQGJE. The video is now a little outdated as they have made updates to slimbox, but it's still a great visual when words only aren't enough - especially if you've never worked with anything like it before (all I know is some HTML).

I don't remember what the site looked like before the change, but I like the customizations that you made to the lightbox. One suggestion though, is to put for example, all the albino photos in the same lightbox group so that you can just click next so see the rest of the albino pics instead on clicking on each individual photo. I find browsing photos a bit more convenient this way.
That video just confused me more! Can I just say HTML sucks! :(

Tosha
01-15-2009, 05:08 PM
Oh hell - that is too darn confusing -- you mean there isn't an easier "lightbox for dummies" way?

FloridaHogs
01-15-2009, 05:10 PM
Simply add this coding into the head of your website. You can do this with html editors such as dreamweaver, nvu, or simply use notepad.

Why do i have to do it in notepad? Why can't I simply copy and paste the code?

CeraDigital.com
01-15-2009, 05:10 PM
OK I can find the CSS code to put in the head. But what do you mean link the files? And where do I find the html body code?? I have looked and I can't find it anywhere.....
Link the files as in copy/paste the links you need in the head of the page :) After that, link the images. Hmmm, that is weird you cannot find the html body. I did get the editor you're using, and will be looking through it tonight or tomorrow after my welding cert classes, and see if I can't figure this little speed bump out for you :)

FloridaHogs
01-15-2009, 05:10 PM
Oh hell - that is too darn confusing -- you mean there isn't an easier "lightbox for dummies" way?
EXACTLY!!!!!!

CeraDigital.com
01-15-2009, 05:11 PM
Why do i have to do it in notepad? Why can't I simply copy and paste the code?
Some people use notepad to type up their websites, which is really easy to do, if you understand html :) You don't have to use it, but it gives you every bit of coding right there :)

FloridaHogs
01-15-2009, 05:12 PM
Link the files as in copy/paste the links you need in the head of the page :) After that, link the images. Hmmm, that is weird you cannot find the html body. I did get the editor you're using, and will be looking through it tonight or tomorrow after my welding cert classes, and see if I can't figure this little speed bump out for you :)
It feels more like a sink hole right now! :D I am sure once I "get" it, I will be like DUH.....but right now it feels more like quicksand!

CeraDigital.com
01-15-2009, 05:14 PM
Oh hell - that is too darn confusing -- you mean there isn't an easier "lightbox for dummies" way?
There isn't an easier way unless you're using an editor such as dreamweaver, or nvu. You'll still have to get in there to paste/type the coding in the head of the page in order to link everything. With Nvu and dreamweaver, you can right click on the thumbnail right there and add the "rel="lightbox"" link to it. Other than that, I wish, but nope :(

m00kfu
01-15-2009, 06:32 PM
Some people use notepad to type up their websites, which is really easy to do, if you understand html :) You don't have to use it, but it gives you every bit of coding right there :)
+1 for notepad!

AaronP
01-15-2009, 07:03 PM
+1 for notepad!

Negative.

Notepad++ or Notepad 2 > Notepad

m00kfu
01-15-2009, 08:48 PM
Negative.

Notepad++ or Notepad 2 > Notepad
UltraEdit32 > *

AaronP
01-15-2009, 11:57 PM
Anyone using Ultra Edit might as well be paying for it...

m00kfu
01-16-2009, 05:43 AM
Anyone using Ultra Edit might as well be paying for it...
To be honest, I've had it for so long that I forgot I paid for it. Topic de-railed! We now return to your regular light box related programming.