The problem is, all the simpleviewer folders need to be directly on the root folder with the .html file
So when I want to try the same with my 2nd gallery, I need to overwrite the folders...
When creating your galleries, save each gallery into a folder with a unique name. Then all gallery folders can be located next to each other in your web space's root.
The easiest way I can imagine is, that I change the gallery.xml name to different one, but therefore I need a code.
If you change the name of a gallery's XML file, you can refer to the file using the galleryURL option. The galleryURL should point to the gallery's XML file.
For example:
<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript" src="svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
var flashvars={};
flashvars.galleryURL="gallery123.xml";
simpleviewer.ready(function () {
simpleviewer.load("sv-container", "100%", "100%", "222222", true, flashvars);
});
</script>
<div id="sv-container"></div>
<!-- END SIMPLEVIEWER EMBED -->
If you keep each gallery in a separate folder, you can embed each gallery using the baseURL option. The baseURL should point to the gallery folder (not a file within the folder).
<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript" src="gallery_folder/svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
var flashvars={};
flashvars.baseURL="gallery_folder/";
simpleviewer.ready(function () {
simpleviewer.load("sv-container", "100%", "100%", "222222", true, flashvars);
});
</script>
<div id="sv-container"></div>
<!-- END SIMPLEVIEWER EMBED -->
If embedding multiple galleries on the same page, be sure to give the 'flashvars' variable a unique name in each set of embedding code and embed each gallery into a <div> with a unique name.
For example:
<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript" src="svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
var flashvars1={};
flashvars1.galleryURL="gallery123.xml";
simpleviewer.ready(function () {
simpleviewer.load("sv-container1", "100%", "100%", "222222", true, flashvars1);
});
</script>
<div id="sv-container1"></div>
<!-- END SIMPLEVIEWER EMBED -->
<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript" src="svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
var flashvars2={};
flashvars2.galleryURL="gallery456.xml";
simpleviewer.ready(function () {
simpleviewer.load("sv-container2", "100%", "100%", "222222", true, flashvars2);
});
</script>
<div id="sv-container2"></div>
<!-- END SIMPLEVIEWER EMBED -->
Please see the FlashVar Options section of the SimpleViewer-Pro Config Options for descriptions of the galleryURL and baseURL options.
Steven Speirs
SimpleViewer Support Team