Posts from — June 2009
A free image gallery script
I have released a simple image gallery script called rGallery 1.0 (based on the dojo framework).
Requirements
- php 5+
How to use
Extract all files from rgallery.zip to a specified directory (default is gallery.php). No setup is required (You shouldn’t have to change anything in any of the php scripts). Any image you want to display in the gallery just needs to be uploaded to the /images directory.
Place the following on the page where you would like your gallery displayed:
<head>
<script type="text/javascript" src="http://o.aolcdn.com/dojo/1.3.1/dojo/dojo.xd.js" djConfig="parseOnLoad: true"></script>
<style type="text/css">
@import "css/image.css";
</style>
<script type="text/javascript">
dojo.require("dojox.image.Gallery");
dojo.require("dojo.data.ItemFileReadStore");
dojo.require("dojo.parser");
</script>
<head>
<script type="text/javascript" src="http://o.aolcdn.com/dojo/1.3.1/dojo/dojo.xd.js" djConfig="parseOnLoad: true"></script>
<style type="text/css">
@import "css/image.css";
</style>
<script type="text/javascript">
dojo.require("dojox.image.Gallery");
dojo.require("dojo.data.ItemFileReadStore");
dojo.require("dojo.parser");
</script>
<head>
In the body, place the following:
<div jsId="imageItemStore" dojoType="dojo.data.ItemFileReadStore"
url="gallery.php"></div>
<div id="gallery1" dojoType="dojox.image.Gallery">
<script type="dojo/connect">
var itemRequest = {
query: {},
count: 20
};
var itemNameMap = {
imageThumbAttr: "thumb",
imageLargeAttr: "large"
};
this.setDataStore(imageItemStore, itemRequest, itemNameMap);
</script>
</div>
url="gallery.php"></div>
<div id="gallery1" dojoType="dojox.image.Gallery">
<script type="dojo/connect">
var itemRequest = {
query: {},
count: 20
};
var itemNameMap = {
imageThumbAttr: "thumb",
imageLargeAttr: "large"
};
this.setDataStore(imageItemStore, itemRequest, itemNameMap);
</script>
</div>
Download
Version 1.0 can be downloaded here
A demo can also be found Here
June 2, 2009 4 Comments