22 October 2009

MiniGallery for MODx

MiniGallery 0.8.1 for MODx

What is it?

MiniGallery 0.8 is an image gallery management tool for MODx, using a combination of a module and a snippet to give MODx users a quick and easy way to create albums and upload images, and have them displayed on their web page with no fuss.  Unlike some other image gallery systems, MiniGallery uses no database; instead it gets all the information it needs from the files themselves, creating thumbnails on-the-fly.  It's not ground-breaking, exactly, but it will still be useful for anyone wanting an easy way to integrate a gallery into MODx.

Example gallery

Download

Latest stable version: MiniGallery v0.8.1b

Previous versions:

Installation

Using the module

To create a new album, click the 'New Album' button in the top right corner of the screen.  This automatically creates a new album called 'new album'.  You can rename it once it has been created.  You can have as many albums as you like.  As of v0.8 you can only have albums at the top level; nested albums may be introduced in a later version!

To upload a new image, click the 'Browse' button in the darker grey box, select your image file, click 'Open', and then click the 'Upload' button.  Once the image has uploaded MiniGallery will automatically make a thumbnail for it, and it will appear in your album.  The image name is essentially the file name with the extension taken off.  If you upload a image with a file name the same as one already uploaded yours will be renamed 'image(1)' or similar.  As of v0.8 only JPG images are allowable; other file formats may be introduced in later versions.  Also note that large images may take a while to upload, so please be patient.  All images will be resized to 640 pixels (unless you specify another value in the module code).

When renaming files or folders, try to keep to 'normal' characters.  If you use back- or forward-slashes, dots, or some other characters, you may experience problems.  Apostrophes or single quotes should be fine most of the time, although there are some known issues*.

Example snippet usage

MiniGallery must be called non-cached otherwise you won't be able to navigate to sub-albums.  Also note that I have put spaces in the examples below, which you should take out when you actually use it!

[ ! MiniGallery ! ]

This is the most basic way of using MiniGallery, and will use the default settings to show all your images and albums as icons, using the Slimbox javascript library (an alternative to Lightbox) and simple.css (found in the snippet folder).

[ ! MiniGallery? &album=`My album` ! ]

This makes MiniGallery display a particular album.  The album name is case-sensitive, and if you mis-type it you will probably get an error.

[ ! MiniGallery? &display=`rows` ! ]

This tells MiniGallery to display images in a table, showing more information about each image, using the rows.css file.

[ ! MiniGallery? &includeJS=`false` &includeCSS=`false` ! ]

This stops MiniGallery from importing the Slimbox javascript library and the default style sheets.  This is useful if you are planning on using a different Lightbox clone (or indeed not using one at all) or if you are planning on styling the gallery yourself with your own CSS.

Questions?

If you have any comments or questions, please contact me or leave a comment.

RSS Twitter
Share this page: Delicious Digg Facebook StumbleUpon Tweet Email
Matthew Dawkins

This post was originally published on www.matthewdawkins.co.uk.
Copyright © Matthew Dawkins 2009

About Matthew Dawkins

Matthew is a web designer based in Somerset, UK. He has a passion for CSS and design, and runs his own web design business.