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
- Upload all files to /assets/modules/MiniGallery/
- Set permissions for /MiniGallery/images/ to 777
- Create a new module called 'MiniGallery'
- In Description enter 'Module for MiniGallery'
- In Module Code paste the contents of MiniGallery-module.txt
- Click Save
- Refresh your browser (so that the MiniGallery module appears in the menu)
- Create a new snippet called 'MiniGallery'
- In Description enter 'Snippet for MiniGallery'
- In Snippet Code paste in the contents of MiniGallery-snippet.txt
- Click Save
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.
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.







Write a comment
Reply #1 on : Sun January 31, 2010, 12:19:00
Reply #2 on : Mon February 01, 2010, 09:49:08
Reply #3 on : Wed March 03, 2010, 16:20:14
Reply #4 on : Sun March 07, 2010, 05:41:23
Reply #5 on : Mon March 08, 2010, 09:18:01
Reply #6 on : Mon March 08, 2010, 10:42:21
Reply #7 on : Tue April 06, 2010, 19:25:41
Reply #8 on : Thu May 27, 2010, 05:06:06
Reply #9 on : Thu May 27, 2010, 09:32:41
Reply #10 on : Fri July 09, 2010, 20:52:22