Ajax Photo Gallery
![]()
This cool AJAX-driven image gallery script allows even unexperienced users to organize their photos in skinnable galleries by adding a few lines of code in their webpages and editing a simple xml feed file. No messing with id’s, scripts, stylesheets or html code - AJAX Photo Gallery does it all for you.
After downloading and unzipping the archive, just copy the following lines of code in the place of your webpage where the gallery will be generated (somewhere between the <body>…</body> tags):
<div id="ajaxphotogallery"> <script type="text/javascript" src="AjaxPhotoGallery/Scripts/AjaxPhotoGallery.js" mce_src="AjaxPhotoGallery/Scripts/AjaxPhotoGallery.js"> </script> <script type="text/javascript"> var albumfeedfile = 'MyPhotoCollection.xml'; </script> </div>
Then open MyPhotoCollection.xml, and add as many of your favorite images as you wish, image descriptions, select one of the available skins in the AjaxPhotoGallery/Skins/[SkinName].css folder and experiment with the various settings you may play with. The distribution of Ajax Photo Gallery comes with 8 ready to use skins - Black, Blue, Default, Lime, Olive, Orange, Purple and Red. To set a skin, simply type it’s name in the skin=”SkinName“ attribute in the <config /> collection. Do NOT type the file extension (.css) of the skin, otherwise the skin will not be applied. More skins will be available for separate download on my additional skins and files page.
The good news is that you may create any number of gallery feed files, similar to MyPhotoCollection.xml, i.e. you can have different galleries on different pages. To specify which feed file to use, edit the albumfeedfile variable in the gallery init code by typing the URL of the feed file, for example:
<div id="ajaxphotogallery"> <script type="text/javascript" src="AjaxPhotoGallery/Scripts/AjaxPhotoGallery.js" mce_src="AjaxPhotoGallery/Scripts/AjaxPhotoGallery.js"> </script> <script type="text/javascript"> var albumfeedfile = 'MyPhotoCollection2.xml'; </script> </div>
Please, refer to the attributes and the values they can accept of the <config /> and <photos /> collections from included in the archive INSTALLATION_INSTRUCTIONS.txt file.
Filed under: Image Galleries, Website Widgets and Parts | Tagged: AJAX, image, gallery