Topic: Simpliviewer & mysql


l'ive da mysql data base on my web site and i want to know if it is possible to use simpliviewer with it...

my DB have a table image (name/ description / adresse url) and i want to use this information to do the xml file...

is it possible?

i've try but... it doesn't work...

if somebody can help me (i'm french and sorry for my english)

Re: Simpliviewer & mysql

It is certainly possible.

Rather than use a static XML file, you would need to use a server side scripting language (such as PHP) to dynamically build an XML file on-the-fly when the gallery is displayed.

The data generated by your script would need to take the form of a standard gallery XML file, the structure of which can be found by examining the 'gallery.xml' file from the SimpleViewer download package ('simpleviewer_231/web/gallery.xml').

You would point SimpleViewer towards the page used to build the XML file dynamically using the galleryURL configuration option.
For example:

<script type="text/javascript" src=""></script>
<script type="text/javascript">
var flashvars = {};
flashvars.galleryURL= "gallery.php";
simpleviewer.ready(function () {
simpleviewer.load("sv-container", "100%", "100%", "222222", true, flashvars);
<div id="sv-container"></div>

Take a look at this forum post which uses a PHP file to read and display the contents of a directory.
You could perhaps modify it to extract image data from your database instead.

Steven Speirs
SimpleViewer Support Team.