Categories
Tags
Required reading
-
RSS
A note
I don't intend wasting any more time writing special CSS for Internet Explorer 6 or any other buggy browser. Almost 80 percent of my readers use a modern browser such as Firefox, Google Chrome or Safari, and I strongly suggest you do so, too. This site passes both XHTML Transitional and CSS validation by W3C. If it doesn't look right on your screen, blame your browser. Thank you and sorry for the interruption.
Simple Lightbox Slideshow for Wordpress
Overview
Simple Lightbox Slideshow (SLS) is a plugin for Wordpress which dynamically creates a Lightbox slideshow from a folder containing images, without displaying the individual thumbnails. It was written for use in my Gallery section but is generic enough to be used by anyone.
Requirements
SLS needs a working installation of Lightbox 2 in order to do anything useful.
Syntax
Calling the plugin is done with the following tag, with parameters separated by commas (parameters in parentheses are optional):
[ sls ]folder,id,(title),(style)&91;[ /sls ]All the code examples use spaces inside the brackets in order to escape the Wordpress parser. For proper use don’t use any spaces.
Example
The following thumbnail links to a slideshow which displays three images:
It was created by simply saving three images inside a folder, adding a thumbnail image and including the following line in the Wordpress page:
[ sls ]/path/to/images/,slideshow1[ /sls ]All that needs to be specified is the full path to the folder and an arbitrary string which serves as a unique id for Lightbox. The plugin searches for any files in “/path/to/images/” as well as for a unique thumbnail file, which must be named “sls_thumbnail.jpg”. It then constructs the slideshow link while hiding the other images.
The unique identifier (“slideshow1″ in the above example) can be any string. Its purpose is to allow Lightbox to display different slideshows on a single page without getting confused.
Options
It’s possible to specify a title to accompany the thumbnail by adding a third parameter:
[ sls ]/path/to/more/images/,slideshow2,My Title[ /sls ]Will result in the following:
My Title
A fourth parameter caters for various thumbnail styling in different contexts. By default, SLS creates a div enclosure with the class “sls_album”, which can easily styled with css. In case a different style is needed, its name can be specified as the fourth parameter:
[ sls ]/path/to/images/,slideshow3,Jugglers,newstyle[ /sls ]Then, a new selector can be defined in the stylesheet which results in a different look for the thumbnail div, such as the one below:
My Title
In the case where a style needs to be specified but a title isn’t needed, care must be taken to include an empty parameter for the title, such as:
[ sls ]/path/to/images/,slideshow4,,newstyle[ /sls ]The slideshows practically create themselves in this way. The only thing that’s required is saving the images in the proper folder (you don’t even need to rename them) and adding a line of code. With CSS it is possible to adapt the plugin to many different layouts, color schemes and purposes.
note
SLS is the first plugin I write for Wordpress. It was originally created as a custom function for use on this site. I later wanted to see if I could make it into a working plugin. You are free to download and use it, but please understand that I cannot be held responsible for any mishap, site crash, catastrophe or utter destruction that may result from its installation.
The plugin is based on an idea formulated by Brian Zollinhofer in his Lightbox FAQ. It was merely designed to automate the process as much as possible.
Download
Right-click the link below and choose “Save As…” to download SLS. Extract the zip file, move the php file into your Wordpress plugins folder and activate the plugin it through the Wordpress admin interface.
simple-lightbox-slideshow.zip