Dougal Campbell's geek ramblings

WordPress, web development, and world domination.

Plugin: Fancybox Gallery 0.3.1

I have updated my Fancybox Gallery plugin to version 0.3.1.

Fancybox Gallery will automatically turn your photo galleries generated by the WordPress ‘gallery’ shorttag into a dynamic lightbox.

New in version 0.3 is the ability to navigate to the next/previous image while in lightbox mode. Another change is that this version requires jQuery version 1.3.2, and thus you’ll need to be using WordPress 2.8. If you are running an older version of WordPress, but the newer version of jQuery, the plugin should work, but I don’t think that the navigation feature will be present (I believe that the changes in the gallery code which enabled me to add it are new in WP 2.8).

Here is an example of the plugin in action. Click on an image to load the larger view. Note that you can navigate to the next or previous images by clicking on the right or left side of the image. Click the ‘X’ close icon or anywhere outside of the image to dismiss the lightbox.

About Dougal Campbell

Dougal is a web developer, and a "Developer Emeritus" for the WordPress platform. When he's not coding PHP, Perl, CSS, JavaScript, or whatnot, he spends time with his wife, three children, a dog, and a cat in their Atlanta area home.
This entry was posted in WordPress and tagged , , , , , , , , , . Bookmark the permalink.

17 Responses to Plugin: Fancybox Gallery 0.3.1

  1. Kevin says:

    Nice plugin – thanks for your work. It would be nice to have an option to have the link=”file” automatically applied by default so that it would work with existing posts that didn’t use the link=”file” in the shortcode.

    • Dougal says:

      Hmmmm, I’ll have to look at the shortcode filters, but that should be doable.

      I’ll eventually make a settings page for the plugin to provide various configuration options, and the ability to automagically filter the gallery shortcode like that will probably be useful, like you say.

  2. Interesting effort. One suggestion from me would be to provide alternative page for browsers which have JavaScript disabled. Currently your plug-in shows the image by itself in a browser. It would be better if it shown the image within a blog page, this keeping the continuity of the blog, show the image caption etc.

    • Bob says:

      As a side question, are there many people who disable Javascript these days? I thought that was getting less and less common.

      • On a very large website I am connected to (in millions of page impressions per day” the figure may be as high as 14% of visitors without JavaScript.

        I would not assume they have disabled it – they may not have it in the first place. Remember Internet is a changing environment and soon mobile devices will outnumber computers in terms of accessing the Net. Many of them are not as good as iPhone or Android and have really poor support for the Net.

  3. Pingback: Plugin: Fancybox Gallery 0.3.1 – Dougal Campbell’s geek ramblings | Squico

  4. Fredelig says:

    Hello. Nice plugin.

    I’m using this plugin: and think I get the same effect. Do you know if there are some differences between that one and yours?

    PS. There seems to be a bug when I’m pressing left or right-arrow while in this comment-field. The pictures pop back up. 🙂 (FireFox v3.0.11, Win XP)

    • Dougal says:

      Main differences that I know of:

      • fb-for-wp plugin affects all thumbnails linked to another image. fb-gallery only affects gallery images generated from the WP ‘gallery’ shorttag.
      • fb-for-wp plugin has a settings page that lets you fine tune the options. mine doesn’t, yet.
      • fb-gallery will ‘group’ images from each gallery together. if there are multiple galleries in the page view, each gallery will be in its own grouping. when I get a chance, I’ll try to demonstrate that feature.

      Re: the arrows bug — ha! that’s a bug in the fancybox jquery plugin code. I’ll have to report that to the author. 🙂

  5. Irene King says:

    I am sandboxing the next upgrade of my site, and the theme comes with the Featured Gallery plugin. I would love to use this plugin because I will be putting a lot more pics on the new site. So I have a couple of questions:

    1. To the best of your knowledge, is there a conflict with the Featured Gallery plugin?
    2. Will this have the same effect if the photos are hosted on an outside site, i.e., Flickr or Smugmug?


    • Dougal says:

      Do you mean the Featured Content Gallery? As far as I can tell, they should not interfere with each other. But they won’t interact, either, if that’s what you had in mind.

      As to your second question, the Fancybox Gallery plugin doesn’t care where the images are located, technically. But since it’s designed to work with the built-in gallery function of WordPress, you’d have to be using some other plugin alongside it that somehow lets you link a WP gallery to externally hosted images. I don’t know if there is such a plugin, off the top of my head.

      • Irene says:

        It has been my understanding that FCG tends to be, well, *temperatmental,* and since I want to use a gallery feature on the new site, this is good news to me. WordPress already has no problems with displaying my photos from smugmug. I will go ahead and install it on the sandbox and see what happens. Thanks for the info.

  6. John Hooton says:

    I like the idea, but one thing that is noticeable by its absence is that there is no recognition by the software of whether a picture is landscape or portrait format.

  7. Sami says:

    This plugin looks promising but I’m getting an javascript error when viewing those pictures. I’m running IE8 on Vista 32bit. Don’t know what that Avant browser text is doing there? It’s working great with Firefox and looks good.

    Webpage error details

    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; User-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; ; Avant Browser; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; InfoPath.2; .NET CLR 3.5.30729; .NET CLR 3.0.30618)
    Timestamp: Tue, 14 Jul 2009 18:42:27 UTC

    Message: Not implemented

    Line: 19
    Char: 15990
    Code: 0

  8. Andrey says:

    Could you help me? I updated WordPress up to 2.8.1. And WP-Fancybox now doesn’t work. Here’s my site with the problem:

    What can I do now?

  9. Matt says:

    A absolutely love this plugin to let you know. I have used it on several websites and will continue to use it. I like everything you did with the update too. Keep up the good work 🙂

  10. the3dman says:

    I love this plugin, but it not really set up for mobile phones and it seems none of the plugins are. Some one needs to come up with a plugin that works like the Google Picasa Albums site, where it works on both desktops and mobile phones. Anyway your plugin works awesome on my non-mobile site.

Leave a Reply

%d bloggers like this: