UvumiTools Gallery Plugin

Description

The UvumiTools Gallery allows you to display fancy photo galleries on your web site without requiring you to be a master programmer. All you need to do is include a couple JavaScript and CSS files. This is made possible thanks to the powerful Mootools Javascript Framework.

Here's how it works: First, the thumbnails are loaded. When they are ready, users can click a thumbnail and watch the gallery transform into a slideshow, which is then navigated by clicking the left column or by scrolling with the mouse wheel. A click on the photo being displayed brings the user back to the contact sheet view.

Features

Requirements

What you'll need :

How To

Initialization

new UvumiGallery(options);

Arguments

Options

Implementation

First, import the files provided in the zip archive into your document. While you can insert <script> tags anywhere, we recommend you put them inside the <head> tag for standards compliance:

<head>
<!-- Insert these lines in your document's head -->
<link rel="stylesheet" type="text/css" media="screen" href="css/uvumi-gallery.css"/>
<script type="text/javascript" src="js/mootools-for-gallery.js"> </script>
<script type="text/javascript" src="js/UvumiGallery.js"> </script>
</head>

Then you must prepare the HTML code for your gallery. Each image should be coded as the thumbnail, inside an anchor referencing the full-size image:

<ahref="http://mydomain.com/fullsize.jpg">
<img src="http://www.mydomain.com/thumbnail.jpg" alt="image description"/>
</a>

This means for each image you also need a thumbnail version. If you don't want to create thumbnails for your pictures, you can use the same image for thumbnail and fullsize, but that sort of defeats the purpose because the reason for previewing a gallery's thumbnails is to avoid loading each full sized photo up front. You can also include a caption in the alt property of the thumbnail. It's optional but recommanded for both search engine optimization and user friendliness.

Use your favorite server script or text editor to prepare a full gallery this way, then put all those images in a container, preferably a <div>, but any block element will work. Give an id to this container (this is very important):

<body>
<!-- The image container must have an id, unless the page only contains the gallery -->
<div id="gallery">
<a href="http://img.uvumi.com/tools/ben-clapp.jpg"> <img src="http://img.uvumi.com/tools/thumbs/th_ben-clapp.jpg" alt="Ben Clapp master drummer"/> </a>
<a href="http://img.uvumi.com/tools/black-joe.jpg"> <img src="http://img.uvumi.com/tools/thumbs/th_black-joe.jpg" alt="Black Joe Lewis of Austin, Texas"/> </a>
<a href="http://img.uvumi.com/tools/blue-guitar.jpg"> <img src="http://img.uvumi.com/tools/thumbs/th_blue-guitar.jpg" alt="Classic Gibson SG in metalic blue"/> </a>
<a href="http://img.uvumi.com/tools/favilla-neck.jpg"> <img src="http://img.uvumi.com/tools/thumbs/th_favilla-neck.jpg" alt="Acoustic guitarist self portrait"/> </a>
<a href="http://img.uvumi.com/tools/gibson-rock-out.jpg"> <img src="http://img.uvumi.com/tools/thumbs/th_gibson-rock-out.jpg" alt="Running the line on a Gibson Les Paul"/> </a>
<a href="http://img.uvumi.com/tools/sprux-guitar.jpg"> <img src="http://img.uvumi.com/tools/thumbs/th_sprux-guitar.jpg" alt="Going to Austin"/> </a>
<a href="http://img.uvumi.com/tools/harp-and-shure.jpg"> <img src="http://img.uvumi.com/tools/thumbs/th_harp-and-shure.jpg" alt="Bullet with a blues harp"/> </a>
<a href="http://img.uvumi.com/tools/mandolin.jpg"> <img src="http://img.uvumi.com/tools/thumbs/th_mandolin.jpg" alt="Electric mandolin street musician"/> </a>
<a href="http://img.uvumi.com/tools/mariomicrophone.jpg"> <img src="http://img.uvumi.com/tools/thumbs/th_mariomicrophone.jpg" alt="Mario Matteoli at the mic"/> </a>
<a href="http://img.uvumi.com/tools/marshall.jpg"> <img src="http://img.uvumi.com/tools/thumbs/th_marshall.jpg" alt="Marshall amplification"/> </a>
</div>
</body>

Now you are ready to execute the script. Add the following code to your HTML document (The value for container must be the same as the gallery's id):

<!-- Make sure the container paramter matches the gallery's ID in the document -->
<script type="text/javascript">
new UvumiGallery({container:'gallery'});
</script>

Mootools requires a strict Doctype to work properly. When everything is properly in place, you should have something like this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html>
<head>
<!-- Insert these lines in your document's head -->
<link rel="stylesheet" type="text/css" media="screen" href="css/uvumi-gallery.css"/>
<script type="text/javascript" src="js/mootools-for-gallery.js"> </script>
<script type="text/javascript" src="js/UvumiGallery.js"> </script>
<script type="text/javascript">
new UvumiGallery({container:'gallery'});
</script>
</head>
<body>
<!-- The image container must have an id, unless the page only contains the gallery -->
<div id="gallery">
<a href="http://img.uvumi.com/tools/ben-clapp.jpg"> <img src="http://img.uvumi.com/tools/thumbs/th_ben-clapp.jpg" alt="Ben Clapp master drummer"/> </a>
<a href="http://img.uvumi.com/tools/black-joe.jpg"> <img src="http://img.uvumi.com/tools/thumbs/th_black-joe.jpg" alt="Black Joe Lewis of Austin, Texas"/> </a>
<a href="http://img.uvumi.com/tools/blue-guitar.jpg"> <img src="http://img.uvumi.com/tools/thumbs/th_blue-guitar.jpg" alt="Classic Gibson SG in metalic blue"/> </a>
<a href="http://img.uvumi.com/tools/favilla-neck.jpg"> <img src="http://img.uvumi.com/tools/thumbs/th_favilla-neck.jpg" alt="Acoustic guitarist self portrait"/> </a>
<a href="http://img.uvumi.com/tools/gibson-rock-out.jpg"> <img src="http://img.uvumi.com/tools/thumbs/th_gibson-rock-out.jpg" alt="Running the line on a Gibson Les Paul"/> </a>
<a href="http://img.uvumi.com/tools/sprux-guitar.jpg"> <img src="http://img.uvumi.com/tools/thumbs/th_sprux-guitar.jpg" alt="Going to Austin"/> </a>
<a href="http://img.uvumi.com/tools/harp-and-shure.jpg"> <img src="http://img.uvumi.com/tools/thumbs/th_harp-and-shure.jpg" alt="Bullet with a blues harp"/> </a>
<a href="http://img.uvumi.com/tools/mandolin.jpg"> <img src="http://img.uvumi.com/tools/thumbs/th_mandolin.jpg" alt="Electric mandolin street musician"/> </a>
<a href="http://img.uvumi.com/tools/mariomicrophone.jpg"> <img src="http://img.uvumi.com/tools/thumbs/th_mariomicrophone.jpg" alt="Mario Matteoli at the mic"/> </a>
<a href="http://img.uvumi.com/tools/marshall.jpg"> <img src="http://img.uvumi.com/tools/thumbs/th_marshall.jpg" alt="Marshall amplification"/> </a>
</div>
</body>
</html>

Technically, that should work.

Finally, you can use optional parameters when you initialize the gallery:

<script type="text/javascript">
//This will create a gallery using the container with id 'small-gallery'.
//The thumbnails will be 80 pixels wide/high
//and the spacing between them 20 pixels

new UvumiGallery({
container:'small-gallery',
thumbSize:80,
spacing:20
});
</script>

Another example:

<script type="text/javascript">
/*
This will create a two galleries using two different containers.
We don't want the two galleries to look the same,
so besides styling the containers,
we also specify different CSS classes for the missing tumbnails,
progress bar and error message.
The second gallery will not display any caption on mouse over,
because we specify legend:false
*/

new UvumiGallery({
container:'gallery1',
loadingImg:'css/ajax-loader1.gif',
missingThumbClass:'missing-thumbnail1',
progressClass:'progress-bar1',
errorMessageClass:'error-message1',
legendClass:'caption1'
});
new UvumiGallery({
container:'gallery2',
legend:false,
loadingImg:'css/ajax-loader2.gif',
missingThumbClass:'missing-thumbnail2',
progressClass:'progress-bar2',
errorMessageClass:'error-message2'
});
</script>

Known Issues

Download

Change Log