LightGallery is a new light-weight gallery script that I wrote as an answer to “weightier” scripts like Gallery and Coppermine. LightGallery does not require MySQL to run; however it does require PHP 5 and the GD library. A short example of LightGallery in action can be seen here. You can also download the script here.
How to use LightGallery? First off, start by inserting this code at the top of any page you’d like to display your gallery:
Followed by:
$path = '/path/to/my/images/folder'; $thmb_size = 'thumb-height thumb-width'; $gallery = new Gallery($path, $thmb_size); $gallery->Output();
$path is obviously the full path pointing to the directory where your images reside. Replace thumb-height and thumb-width with the desired height and width of your thumbnail. The beauty of LightGallery is that it is one PHP Class that can be used as many times as need be. If you need to create a new gallery, all you have to do is create a new directory, upload your images to that directory and create a new Gallery object with $path set to that path.
Some limitations include:
The gallery directory has to be one level below the root directory where gallery.php resides. Another limitation is that LightGallery uses jQuery and ThickBox and ThickBox is hard-coded into LightGallery, though I plan to change that at a later date.
Tips:
If you want your thumbnails to display tool-tips and have captions in ThickBox, edit the album.xml file that is created in the directory where your images reside. Specifically edit the and tags so that they contain your desired title and description. Another planned edition to LightGallery is a single-user backend to allow easy editing of titles, descriptions and possibly deletion of images.