How to use Lytebox

Note: lytebox appears to be discontinued by the author. See also Thickbox.

I was recently asked how to use lytebox in a gallery. The instructions at lyteboxes web page has several examples, but I guess they can seem a little overwhelming for some people, so I put together as basic an example as I could think of. It looks like this.

In this example, we are only dealing with useing lytebox with images in gallerys. There are lots of ways to use this library, and you can check his web page for the other options.

First, in order to use this library you need to get some files moved over. There are three things you need:

  1. lytebox.js
  2. lytebox.css
  3. images folder

These files need to be placed in the folder where your html file is going to be. So, for our example, this is what I have :

  1. index.html
  2. lytebox.js
  3. lytebox.css
  4. gallery.css
  5. images (folder)
  6. pictures (folder)

index.html is the gallery html file that has the thumbnails and pulls everything together. gallery.css is a css file to style our little gallery just a bit. You don’t need this file at all. The pictures folder is where I have all my images. You can organize your images how you would like.

Ok, lets look that what index.html looks like. The first thing you need to do is put some code in the <head> tag. This is to tell the browser where the lytebox css and js files are.



Then you need to create the links in the body of your document. I have chosen to link thumbnails to larger size images. Here is the code to one image:


So, the path to the thumbnail is in the img tag. That is what shows up first. Then, in the a tag, you add the rel attribute. This is not really standard html. Html is not using the rel attribute, so lytebox has decided to use the attribute to signal it that you are linking the image within the href of the a tag through lytebox. This all happens in the background when your document loads, the lytebox.js file scans your document looking for these rel attributes, and adds some code to make it all work.

Also, look at the this: rel=”lytebox[gallery1]”. To make this work, you only need to say rel=”lytebox”. We put “gallery1” inside the [] to link all these images together. This way lytebox knows to link these images together with “next” and “previous” buttons when the larger image comes up. In the example that I have here, I have two gallery’s, “gallery1” and “gallery2” so you can see how they work. One gallery per line.

Simple? Ok, so here is all the code in our example. I have here the code for the index.html and the gallery.css file. I have not listed the lytebox code. You can download that here.



	Lytebox Example
	
	
	


	

Lytebox Example Gallery


body {
	background-color: black;
	text-align: center;
}
h1 {
	color: white;
	font-family: sans-serif;
}
img {
	border: solid 1px gray;
}
img:hover {
	border: solid 1px white;
	/* doesn't work in ie */
}

Check out the finished gallery here.

The Art of Outdoor Photography

The Art of PhotographyI just finished reading The Art of Outdoor Photography (Amazon). I took it out from the library. Twice. Extended my three week time each time too. Not the most riveting of authors. I had a hard time getting into it.

Boyd spends a lot of time in each of the chapters discussing film, film choice, and whether to shoot at 25, 50, or 75 ISO. My camera doesn’t take film, and only starts at 200 ISO. Does the fact that the book doesn’t deal with digital mean it has nothing to offer? No, but it feels dated. The revised edition is from 2002.

The concepts and techniques of outdoor photography and how to compose and visualize are not different on film or digital. He does have some good things to say about “seeing”, and light in the first chapters. There is a great chapter with picture examples of how perspective changes with the use of different lenses. He also has chapters on composition and using shutter speed creatively. This takes us up to about page 70. I feel this was the better part of the content.

The rest of the chapters are short sections on film types, and different outdoor shooting situations, like landscapes, close ups, underwater, and travel. It doesn’t feel like the individual chapters get to give enough attention to their subject matter.

He has some great pictures every once in a while, but most of the images are not very inspiring. I guess that on a whole, I would recomend looking for the book in your library if you want to give it a read.

CwExif Plugin Appreciated

The other day I finished the CwExif plugin. I got the idea originaly from posts that Gavin Gough, and Matt Brandon did where they were wishing for some easy way to get the EXIF data displayed.

Gavin today called me a “very nice man.”¬† Also that I¬†was a¬†”geeky Canadian”. We Canadian programmers take that to be the highest compliment. :-)¬†I was quite tickled. It is great when you get to create something that someone really wanted, and doubly when they go out of their way to say thank you.

I am glad that it is what he was looking for. I hope to make some improvements and options for display in the future, but will keep the “title” display¬†that works now.¬†

If you give it a try and have issues or suggestions. Leave a comment on the CwExif plugin page.

Run any Browser

This is pretty cool. Ever wanted to find out what your site looks like under Google Chrome, or Opera, or IE6/7/8, or Safari? Well, now you can without installing the applications directly.

The xenocode browser sandbox will allow you to use different browsers. It appears to download a .exe file named for the browser you are running. By the documentation, it appears to be a repackaged binary of the browser that runs in it’s own sandbox. It’s an interresting trick. No real install, but the application still runs localy.

I checked, and all the browsers seem to run the javascript on christopherwardphotography.com just fine.

Books on Order

Joe McNally has finished his book “The Hot Shoe Diaries, Big Light From Small Flashes.” He has quite a post up about it. It is supposed to be out March 16. I just pre ordered it on Amazon. There is a PDF here with exerpts from the book. This is classic Joe, just like The Moment it Clicks. As with that book it looks like he has short little descriptions/stories about the shot. This one looks like he might get into more detail about how he set up the lights.

I also just pre ordered “Within The Frame” on Amazon. This book is by David duChemin. I am looking forward to this one. I would love to read more in a book format about his thoughts on vision and photography.

Get this, no sooner do I decide to pre order the books, he runs a contest to give one away. What cha gona do? Well, maybe I will win and can read one with each eye.

Photography Seminar in Minneapolis

I often lament that there are very few photography seminars that occur in Minneapolis. The big events seem to occur in Boston, or Vegas. It seems like even the one day events seem to pass us by. But I just discovered that David Ziser of Digital Pro Talk  is coming to Minneapolis. He is going on what he calls a Digital Wake Up Tour. David will be in Minneapolis on Sept 16, Wednesday evening. I signed up already. Sweet! David is mostly a wedding photographer, but he takes stunning portraits. It will be great to hear him in person.

First Version of CwExif is out

I now have a first version of CwExif that can be downloaded. This is a new WordPress plugin that will show exif data for an image uploaded to the wordpress library in the title tag. There is a button on the media admin screen that will take the exif data and put it into the title tag. On hover, the data will be displayed.

This is just the first version. There is much more that I want to do with this plugin, but you have to start somewhere.

Get it here.

Trumpeter Swans

Trumpeter Swans in Monticello

I was in Monticello to take pictures of Trumpeter Swans this Sunday. I have to say that it is really the first time that I went and stood around in freezing cold temperatures for several hours to get pictures of wildlife. It was fun though.

I was set up with my new tripod and 70-200mm lens right beside someone that takes regular trips to yellowstone with his 600mm lens. Yikes. That was a piece of kit!

I got some good pictures, I think. I haven’t had time to “develop” them yet. I will post more soon.

We are pretty much at the end of their migration period. In fact I was told that earlier was better. Not sure how it would have been better. It was hard enough to isolate one or two birds becuase there were so many of them. Check out the Monticello Chamber of Commerce for more info.

Lensbaby Composer Review by Gavin Gough

Lensbaby ComposerSomehow I missed this. Gavin Gough has done a review of the lensbaby composer, complete with images taken with the optic kit. It does sound like a fun piece of kit to play with. I think I will skip the optic kit, and just get the double glass. I put it on my Amazon wish list 🙂 It is also worth looking about the lensbaby web site. They have some pretty cool images taken with their kit.

CwExif is almost done

I have been working on a plugin for WordPress that will display the EXIF data for an image. It turned out to be harder than I thought. First of all, there are very few working libraries that will access the data in an image. Second, this is my first WordPress plugin, and the documentation is not what I had hopped. So… to start, and get something out there, I have scaled back abit.

The first iteration of the plugin will simple replace the title of the image (displayed on hover) with the some meta data captured by WordPress. This will be things like f-stop and shutter speed. Eventually I would like more data, but I will have to go outside of WordPress to get it. Second, I will need to beef up the display options. Using the title is not what I wanted. I would like to have a hover give a proper note, or a click with a lightbox effect. I will get to those later.

So, the first release of this plugin will be soon. I have it working within the media library, but when you are adding an image, the admin panel uses a pop-up with a different form. I just need to get it working either way.