I don't know the difference between absolute and relative paths.
Here's a web page that describes the difference between absolute and relative paths.
Do I need to actually type each of my 50+ pictures' URLs into the XML file?
The automated methods of creating an AutoViewer gallery (such as using the Photoshop script) will create the XML file for you, filling in the paths to the images. If you are creating a gallery by manually editing the sample gallery from the download package, then you will need to type in the paths to the images.
Or will it somehow read it automatically?
If your web server has PHP installed, then you could use PHP to dynamically create an XML file on-the-fly which would read the contents of a directory and list the images in it for AutoViewer to display. In doing this, you could simply upload new images to the image directory and the gallery would display these new images without the need to modify any gallery files.
You would need to use the following line in your embedding code:
fo.addVariable("xmlURL", "gallery.php");
You would also need to create a new file with the following code, name it 'gallery.php' and upload it to the root of your web space, alongside your 'photos.html' file.
<?php
function GetDirArray($folder)
{
$handle=opendir($folder);
while ($file=readdir($handle))
{
if ($file!="." && $file!="..")
{
$ret[count($ret)]=$file;
}
}
closedir($handle);
sort($ret);
return $ret;
}
$gallery=GetDirArray('images');
echo '<?xml version="1.0" encoding="UTF-8"?>';
echo '<gallery frameColor="0xFFFFFF" frameWidth="15" imagePadding="20" displayTime="6" enableRightClickOpen="true">';
for ($i=0; $i<sizeof($gallery); $i++)
{
$info = getimagesize("images/".$gallery[$i]);
echo '<image>';
echo '<url>images/'.$gallery[$i].'</url>';
echo '<caption></caption>';
echo '<width>'.$info[0].'</width>';
echo '<height>'.$info[1].'</height>';
echo '</image>';
}
echo '</gallery>';
?>
The gallery should then display all images in a folder named 'images' (also located in the root of your web space).
Steven Speirs
SimpleViewer Support Team