Web Development
Open Source Flickr Photo Gallery Using jQuery
11/18/2008 8:45:21 AM
flickrGallery is an open-source photo gallery for jQuery that allows you to dynamically pull images from a photoset in Flickr.

The main functionalities of this gallery are a) to pull in images dynamically from a Flickr photoset, b) to dynamically grow or shrink the gallery area, depending on the size of the images and c) to offer a lightbox effect for small images. However, all of these functionalities can be turned off. If Flickr is turned off, a standard unordered-list with images can be provided to use just the photo gallery functionality.

The purpose of this plugin is to allow for a dynamic image gallery that is easy to add or remove images from. Once the gallery is added to a website, the code doesn't need to be changed again to update images. Everything, including image captions, is updated from Flickr.

Demo: * Note: The lightbox effect doesn't take up full screen, because the Demo is in an iFrame on this page. Click on one of the demo links below for the full effect.

REQUIREMENTS:

jQuery 1.2.6+
jQuery Flickr plugin by Daniel MacDonald*I modified this plugin slightly to get the Flickr Image Page link, so be sure to use the one provided here.
jQuery UI Core with Slider*I recommend using the UI personalized package provided here.
jQuery flickrGallery plugin
CSS Files and Images ( Unless you create your own )
Flickr API Key
OPTIONAL (but recommended):
hoverIntent jQuery plugin by Brian Cherne
jQuery Lightbox plugin by Leandro Vieira Pinho

Download Entire Package

DEMOS:
IMPLEMENTATION:
Implementing the flickrGallery is fairly easy.

1) Unzip the files in the Entire Package file to your server.

2) Link to the CSS and Javascript files.

3) Add the javascript source to initialize the gallery, with options.
Source used in this example:

$().ready(function(){
$('#flickrTest').photoGal({
useFlickr: 'true',
flickrAPIKey: 'yourFlickrAPIKey',
photosetID: 'yourPhotosetID',
useHoverIntent: 'true',
useLightBox: 'true'
});
});

The following options are available:

galleryHeight: either [string] 'auto' or [integer]. If [integer] gallery will have a strict height to that number.

userFlickr: [string], 'true' or 'false'. Determines if gallery is local or flickr based. Defaults to false.

useFlickrLargeSize: [string], 'true' or 'false'. Determines whether gallery is Large or Small. Defaults to false.

flickrAPIKey: [string], required for Flickr gallery.

photosetID: [string], required for Flickr gallery.

per_page: [integer], amount of thumbnails per 'page'. Defaults to 30.

useHoverIntent: [string], 'true' or 'false'. Uses HoverIntent plugin for better Hovers. Defaults to false.

useLightBox: [string], 'true' or 'false. Uses jQuery Lightbox plugin for Small size images. Defaults to false.


Please post any bugs/suggestions in the comments section of this post. Check back for future updates.

*Planned Updates: Improve animation for next/prev page, particularly in large mode. New skins.
Posted by: Steve Dugas | Submit comment | Tell a friend

Categories: Flickr  |  jQuery

Share and enjoy: Del.icio.us   Facebook   Furl   Google Bookmarks   NewsVine   Reddit   SlashDot   Technorati   Windows Live Bookmark   Yahoo Bookmark
5 Comments
12/8/2008 9:11:06 AM
Great example... just wanted to let you know the large demo seems to have a script error. Look forward to the next update
12/10/2008 7:48:20 AM
why i can't use in ie7
in asp.net2.0 i can't use it
it is so strange
because in firefox3.0 it is ok but in ie7 it is backup "parameter in vain"
i do not know how can i let you know my mine,because my english so bad
i am sorry
if you can give me answer,i am so happy
12/22/2008 11:44:23 AM
@ jquery fan:

Can you be more specific? Does it error on load, or when you do a specific action?

I can't seem to create a script error on the large one, in any of the 3 demos that use it.

- Steven Dugas
12/22/2008 11:45:24 AM
@ babysuper:

Is it an ASP error or a javascript error? If javascript, can you post a firebug error of and tell me more about when the error happens?

- Steven Dugas
12/22/2008 11:48:29 AM
@ jquery fan:

Oops, nevermind I see the issue! I was looking at the one in the download package, not the one online. The issue is now fixed.

Thanks for the heads up!
Submit a Comment
Name
E-mail
Web Site  (optional)
Comment
HTML tags are not allowed.

 

© Copyright 2010, Bizzuka - Blog. All rights reserved.