You are now on my Technical Blog. My other sites: Personal Blog - Genealogy Blog - Genealogy Site

DLMax Max Westen's ramblings on OSX and PHP

FancyBox2 add-on on Github

Introduction

Statamic plugin that adds Fancybox2 lightbox to your images on your site.

Make sure you read the Fancybox2 licensing conditions regarding commercial use.

Installation

Clone or Copy the files to their destination

Clone this project on your system:

cd webfolder/_add-ons
git clone git://github.com/mwesten/Plugin-Fancybox.git fancybox

Or download the project and add the contents of archive to the _add-ons/fancybox folder.

Add the fancybox init code to your head

Open the theme file layout (for example) _themes/london-wild/layouts/default.html Add the following code in your <head> section after the jquery initialisation:

{{ fancybox:head }}

Usage

The way it’s configured right now is that all images that link to another image and are contained in the <article> tag with the entry class are fancyboxed. If you need another selector, you can add this as parameter to the init-code like so:

{{ fancybox:head selector="div.post"}}

If a link has the lightbox class, it will be fancyboxed too.

To override the fancybox options, you have to modify the plugin code at the moment.