mootools image gallery with xml parser
November 10, 2007 · Print This Article
The original gallery has been taken from http://www.aaronbirchphotography.com and updated with an XML parser that automatically reads images from a folder, creates the according thumbnails, reads the EXIF informations of the JPG’s and writes all this to a XML file.
Then a gallery with all the thumbs ( and this nice image menu ) is sent to the website, giving you an easy and convenient way of displaying your work without the need to resize all the images by hand.Together with the slimbox extension, which opens the big images when clicking on the thumbnails, you’ll receive a nice to look at gallery.
How it works:
You’ll get three files:
* createList.php
* readList.php
* index.php
Place the createList.php into your image directory. Call it from your browser. It will automatically
create a thumbs.xml file. The directory must be named “images” or change it in the createList.php
and readList.php to your needs.
Place the readList.php into your image directory. Open up your index.php and change the following:
$x = htmlentities(parseme('thumbs2.xml')); // call the function to read the xml file
?>
EXIF DATA:
The exif data will be read from each file in the images directory. If you don’t have exif data in your images,
right click ( Windows ) on a image file, choose properties, and select “File info”. There you can insert a title.
The title will be the information displayed as image caption.
REQUIREMENTS:
You’ll need the mootools framework, PHP5 ( to read EXIF data ) and that’s it. Concerning the page height and
the displayed amount of thumbnails, go to images.js and change the following line, so it matches your needs:
DOWNLOAD:
ImageMenu
‘height’: [thumbs[selected].getStyle(’height’).toInt(), 275] // whereas the 275 represents the height of the image
container.




[...] sourced here [...]
[...] here for [...]
[...] here to [...]
[...] here for more Der Beitrag wurde am Saturday, den 10. November 2007 um 05:10 Uhr veröffentlicht [...]
sorry, for disturbing, but i can’t find download link..