You add pictures by adding to the array:
Code:
//Specify images:
//galleryarray[x]=["path_to_image", "optional_title_attribute", "optional_text_description", "optional_link"]
var galleryarray=new Array()
galleryarray[0]=["photo1.jpg", "optional title", "optional description", "optional url"]
galleryarray[1]=["photo2.jpg", "optional title", "optional description", "optional url"]
galleryarray[2]=["photo3.jpg", "optional title", "optional description", "optional url"]
galleryarray[3]=["photo4.jpg", "optional title", "optional description", "optional url"]
galleryarray[4]=["photo5.jpg", "optional title", "optional description", "optional url"]
galleryarray[5]=["photo6.jpg", "optional title", "optional description", "optional url"]
galleryarray[6]=["photo7.jpg", "optional title", "optional description", "optional url"]
galleryarray[7]=["added.jpg", "optional title", "optional description", "optional url"]
The actual number of images per page is controlled here:
Code:
var dimension="3x2" //Specify dimension of gallery (number of images shown), such as 4x2, 3x1 etc
So to add images to a particular page you need to increase the number of images shown per page. To get more control, dummy images may be inserted in the array using a transparent .gif, ex:
Code:
galleryarray[2]=["transparent.gif", "", "", ""]
These will appear as blank areas in the given 'page' that they fall on.
The text for 'Page1' 'Page2' is generated here on the red line:
Code:
<div id="navlinks">
<script type="text/javascript">
for (i=1; i<Math.floor(galleryarray.length/totalslots+2); i++)
document.write('<a id="navlink'+i+'" href="javascript:jumptopage('+i+')\">Page'+i+'</a> ')
document.getElementById("navlink1").className="current"
</script>
</div>
To change the text displayed, you can edit it like so:
Code:
document.write('<a id="navlink'+i+'" href="javascript:jumptopage('+i+')\">Items'+i+'</a> ')
The above change will yield 'Items1', 'Items2', etc.
Bookmarks