Flickr Slideshow Tutorial

This tutorial covers how to add Flickr slideshows to your blog entries, it’s WordPress-centric, since that’s the blog system I use, but you can definitely apply this to any of the other blogging systems.

Usually, I post individual photos to blog entries, like this one. With individual photos, when you click the image link, it takes you to the photo’s page on Flickr. Sometimes, I post photo sets (groups of images), this is an example of a photo set . Unlike individual images, I wanted the ability to be able to view the photo set directly from within my site, as opposed to linking back to Flickr.

I spent about a week implementing various forms of what’s generally called the “Lightbox”, a modal window that displays content over the current page, similar to popup windows (but without the navigation hassles associated with them). Here is a pretty extensive list of the various different kinds of Lightboxes. I tried to implement just about every one on this list and their corresponding WordPress plugins (most of these have wp plugins that were written by 3rd party plugin writers). Some didn’t fit my aesthetic standards, some didn’t have the functionality I wanted, some contain javascript libraries that I couldn’t get to work correctly, were too large in k size or conflicted with other js libraries. It would take me far too long to give a full and proper rundown of each implementation, and it would be boring. So, for this tutorial, I’m explaining how mine works (and mine alone).

I stumbled upon a Lightbox implementation called Lightwindow. It’s author is wicked smaht, it supports every kind of media (images, flash, webpages, external webpages, etc..), it uses scriptaculous and protoype (2 standard js script libraries), it’s skinnable, it works in most browsers and platforms, yada yada… For my uses, I needed to be able to load external web pages from Flickr and make the whole thing look good without being intrusive. Lightwindow did the trick, perfectly.

So now for the tutorial:

1. Go to the Lightwindow site and download the files and install them, per the author’s instructions. He has tons of good info on his site and cleanly beaks down how to implement whatever media you’d like to. If you run WP, here’s a link to a Lightwindow plugin for WP.

2. Then go to the Flickr photo set page you’d like to feature. I take a screen grab of the photo set thumbnails, crop it in photoshop and save as jpeg. it usually looks something like this.

3. I start a new blog entry and upload the screenshot to my server, using WP’s upload feature, I then add the screenshot to the blog entry (”show: full size”, “link to: none”). The code in my entry now looks something like this:
<img src='http://qualitypeoples.com/wp-content/uploads/2007/07/croton.jpg' alt='croton thumbnail' />

3. Now, you should be able to call the Flickr slideshow through Lightwindow from within a blog post, here’s the code that I use:
<a href="http://flickr.com/photos/edfladung/sets/72157601074443987/show/?no_back=1" title="NYC July 07" caption="NYC July 07" class="lWOn"><img src='http://qualitypeoples.com/wp-content/uploads/2007/07/croton.jpg' alt='croton thumbnail' /></a>
Since WP has no built-in pasteboard thingy that you can keep snippets on and then one-click insert them into blog entries, I just go back to the last entry I made with the Lightwindow call, copy and paste it into the new entry. don’t forget to add the trailing </a>. low-tech.

4. Change the code to match your own set: The 72157601074443987 number is the Flickr photo set number and you will need to change this to your corresponding photo set. Flickr slideshows have a back button and I’m cool with that, but if someone clicks the back button, they go to the flickr site, from within the Lightwindow. This isn’t butters, so I add the ?no_back=1 part (I got this from Flickr’s popup slideshow call). Change both the title="NYC July 07" and caption="NYC July 07" code to describe your photo set, these will appear in Lightwindow. And lastly, the class="lWOn" is what used to call the Lightwindow javascript.

5. If you’re feeling perky, you can give a some kind of summary of what kind of content the viewers can expect from the slideshow. I also provide 2 text links at the bottom of my page. One links to the Lightwindow slideshow and the other links to the photoset’s page on Flickr. It usually looks like this: slideshow | photoset. and the code looks this:
<a href="http://flickr.com/photos/edfladung/sets/72157601073174265/show/?no_back=1" title="NYC July 07" caption="NYC July 07" class="lWOn">slideshow</a> | <a href="http://flickr.com/photos/edfladung/sets/ 72157601073174265/">photoset</a>

6. Lastly, you can click “save and continue editing” and choose to preview your blog entry to make sure you got everything right, or you can just wing it and publish it.

And your done.

A word of note: Flickr has a “no leeching policy”. Their guidelines state that photos must link back to their respective photo pages. And I fully agree with this policy. With photosets I choose to display them with Lightwindow, rather then linking directly to the set, so the viewer doesn’t have to leave my site. This is why I have the text links at the bottom of the entry, so a viewer can choose to go to the Flickr photo set page to view the set. I further rationalize this because 99% of my outgoing links are to Flickr, so I’m driving them most of my traffic. I really hope they are cool with this.


technorati tags: , , , , , ,

Comments:

Gravatar

Isko said,

August 1, 2007 @ 5:32 pm

Thanks for great tutorial. It would have taken me ages to find how to remove the ‘Back to flickr photo set’ link.

Gravatar

Jon MacKinnon said,

August 15, 2007 @ 11:57 am

I can’t seem to get mine to open in the lightwindow, it just launches the slideshow. Can you give me a hand? The class is set to lWOn but it doesnt seem to work… any ideas?

Gravatar

Ed Fladung said,

August 15, 2007 @ 12:36 pm

Hey Jon, i just checked your site, looks like you got it working, or at least it’s working for me.

Gravatar

Chris Leigh said,

August 15, 2007 @ 3:51 pm

Hi Ed, (congrats on nice page! youre linked to from photodoto - dont know if you already knew - how i landed here.)

Noticed you replied to Jon before, i wonder if you could take a look at my page, i copied your code too to confirm mine was correct, but both do exactly the same.

It looks to me like it isn’t calling the lightbox function somehow but im sure its installed correctly…

i uploaded to correct folder and activated the plugin, is that all i have to do?

am i missing some simple thing?!

Any assistance much appreciated!

p.s. my page is still under construction :P even though the posts dates back a bit!!!

Chris

Gravatar

Ed Fladung said,

August 15, 2007 @ 4:54 pm

Hi Chris, I’m not sure what you’re doing wrong. i can’t see anything immediately off. but i’m not using the wp plugin version, so maybe go back through the wp plugin directions to see if there is anything different when calling the code from href? also, you might try installing lightwindow directly, verses using the plugin. get that working correctly and then try the plugin. i’ll play around with your example a little more, later.

Gravatar

Chris Leigh said,

August 16, 2007 @ 2:17 am

ah hadn’t realised that there could be a difference down to it being the plugin version! Some english instructions instead of french on that page would have been nice - a couple of the comments were in the same boat by the sounds of things!

I will try tonight when i get home from work!

Many Thanks Ed, will post back with update!

Chris

Gravatar

Chris Leigh said,

August 18, 2007 @ 5:12 pm

Ed, thanks for the pointer with the lightwindow full installation so to speak. I upped the files to my server, now using the class=”lightwindow” works for me :D!

Thanks again for your walkthrough about the flickr bit.

Chris

Gravatar

Annie said,

September 3, 2007 @ 7:39 pm

Hi Ed, I was wondering if it’s possible to display captions unique to each photo (in your example, there’s a single caption to describe the whole set).

thanks,
Annie

Gravatar

Ed Fladung said,

September 3, 2007 @ 8:05 pm

Hi Annie, no, you can’t set the caption for each photo, but if you’re watching the slideshow, you’ll notice that you can click on any photo and it will show you the description for the photo, from flickr. All Lightwindow is doing is calling Flickr’s slideshow function, you could just as easily create an iframe, if you wanted to.

Gravatar

Robi Sanchez said,

September 5, 2007 @ 10:34 am

Hi Ed, greetings from DF, Mexico City. I read one of your posts that you are creating an slideshow using lightwindow. I am trying to use that lightwindow with a little site I am working on, but there are a lot of lines of confusing code in the stuff that I dodwnloaded from the lighwindow site:

http://stickmanlabs.com/lightwindow/#demos

I see that you have to put many folders with .js, .php, .css and HTMLs in the Server’s HTML Public Folder, so I dont know which archive is the one that I have to edit.

Please feel free to visit my website:

http://time.ultravibral.com/

There are 3 images that need a lightwindow to display a swf Flash Player. Can you help me to know which lines of code shoul I have to use please?

I have my .swf ready, I only need the pop up windows!

Thanks for your time
Saludos

Robi

Gravatar

Robi Sanchez said,

September 5, 2007 @ 10:35 am

Viva Mexico

Gravatar

Robi Sanchez said,

September 24, 2007 @ 1:06 pm

Ed?

RSS feed for comments on this post · TrackBack URI



Trackbacks:

  1. Photodoto » Blog Archive » Embed a Flickr slideshow into your blog or website
  2. roots.lab » Blog Archive » links for 2007-10-25

Leave a Comment