simpleviewer.netPRODUCTS | SUPPORT | NEWS | ABOUT

SimpleViewer 1.9 - Data Customization Options

This document applies to SimpleViewer version 1.9. SimpleViewer has been upgraded to version 2.3.0. View upgrade information.

This section is for advanced users who wish to customize the SimpleViewer file structure or XML data source.

To Customize File Structure

To load images or thumbs from different folders than the default, use the imagePath and thumbPath attributes in the XML document. (See a list of all XML options here.)

To Customize XML Data Source

To load XML image data from a different source than the default, add the xmlDataPath variable to the FlashObject code. Set the value of the variable to point to your custom XML data source (the XML data source can be an XML document, or a script that produces an XML document). xmlDataPath is an absolute or relative path to an XML data source. Note that relative paths are relative to the HTML document that contains SimpleViewer.

For example, to load XML data from a PHP script called get_data.php in the sub-folder my_data , your embed JavaScript code should look something like this:

<script type="text/javascript">
var fo = new SWFObject("viewer.swf", "viewer", "100%", "100%", "7", "#181818");
fo.addVariable("preloaderColor", "0xffffff");
fo.addVariable("xmlDataPath", "my_data/get_data.php");