Since there is no guide on how to compile and embed a gallery on to a web page I thought this would be a logical process, but has instead proved to be frustrating as I continue to fail at finding a solution.
The SimpleViewer Embedding Guide can be found here.
I'd like to embed alternate galleries on different pages of my site, but it appears that the embed code doesn't actually change from gallery to gallery.
Each gallery has its own XML file which holds a list of images (or not, in the case of a Flickr-sourced gallery) and unique configuration options for that particular gallery. As long as the XML file is named 'gallery.xml' and is located in the same folder as the HTML document into which the gallery is embedded, the embedding code can be the same for each gallery.
If you have several galleries all in the same folder where duplicate file names may come into play, you can point a gallery towards a specific XML file by using the galleryURL option.
For example, you could have two web pages (named 'index1.html' and 'index2.html') in the same folder, along with two XML files (named 'gallery1.xml' and 'gallery2.xml').
The embedding code for the first gallery on the 'index1.html' page might look like:
<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript" src="svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
var flashvars = {};
flashvars.galleryURL = "gallery1.xml";
simpleviewer.ready(function () {
simpleviewer.load("sv-container", "100%", "100%", "222222", true, flashvars);
});
</script>
<div id="sv-container"></div>
<!-- END SIMPLEVIEWER EMBED -->
... and the embedding code for the second gallery on the 'index2.html' page might look like:
<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript" src="svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
var flashvars = {};
flashvars.galleryURL = "gallery2.xml";
simpleviewer.ready(function () {
simpleviewer.load("sv-container", "100%", "100%", "222222", true, flashvars);
});
</script>
<div id="sv-container"></div>
<!-- END SIMPLEVIEWER EMBED -->
In each case you would need to make sure that the path to the 'svcore' folder is correct. (Both galleries can share an 'svcore' folder if you like.)
The 'gallery1.xml' file might look like:
<simpleviewergallery useFlickr="TRUE" flickrUserName="your_user_name" flickrTags="business" />
... and the 'gallery2.xml' file might look like:
<simpleviewergallery useFlickr="TRUE" flickrUserName="your_user_name" flickrTags="pleasure" />
Steven Speirs
SimpleViewer Support Team