Topic: AutoViewer requires JavaScript and the Flash Player - I NEED HELP

Hello,
I know you've had other posts about this same topic, I've tried to find the answer but I couldn't. This is driving me crazy. I think it has something to do with my crappy .HTML coding on my page. Could someone please help me. Here is my website's page:

http://www.robshaffer.com/photos.html

I have other pages, so I'm not sure if it has something to do with the index.html page or not. I need this to go into my /photos.html page. I hope you can help.

Thanks so much!

Re: AutoViewer requires JavaScript and the Flash Player - I NEED HELP

BTW, I'm using a Mac with OSX 10.6.8, if that matters. With Autoviewer.

Re: AutoViewer requires JavaScript and the Flash Player - I NEED HELP

The embedding code in your 'photos.html' page is looking for the files 'swfobject.js' and 'autoviewer.swf' in the same directory (alongside the 'photos.html' file) and they are not there.
They should be located at: http://www.robshaffer.com/swfobject.js and http://www.robshaffer.com/autoviewer.swf respectively.
For reference, the 'AutoViewer Embedding Guide' can be found here: http://simpleviewer.net/autoviewer/supp … dding.html

Steven Speirs
SimpleViewer Support Team.

Re: AutoViewer requires JavaScript and the Flash Player - I NEED HELP

Okay, I've changed those two file locations, but now the pictures are not showing up. It's just a blank Viewer. I'm obviously missing something.

Thanks so much for your quick response!

Re: AutoViewer requires JavaScript and the Flash Player - I NEED HELP

BTW, I renamed the folder with my photos now to "photogallery" as to avoid confusion with another folder with the same name. Should I move my photogallery folder to the root?

Re: AutoViewer requires JavaScript and the Flash Player - I NEED HELP

I have a feeling, although I could be wrong, that the problem is lying somewhere in the gallery.xml file. Do I need to manually write all my photo file location info for all 50+ of my pictures?? I hope not..

Also, within my "photo" folder is:
-gallery.xml
-index.html
-"photogallery" folder (where all my photos are)
-readme.html

Except for my "photogallery" folder, these files are what I got from downloading Autoviewer. I am at a loss here. So close...

Re: AutoViewer requires JavaScript and the Flash Player - I NEED HELP

Currently, your embedding code uses the following line:

fo.addVariable("xmlDataPath", "autoviewer/gallery.xml");

There are two problems with this...
(1) xmlDataPath is not an AutoViewer option. You should use instead xmlURL as described on this page: http://simpleviewer.net/autoviewer/support/options.html

fo.addVariable("xmlURL", "autoviewer/gallery.xml");

(2) According to the relative path you are using, the XML file should be located at http://www.robshaffer.com/autoviewer/gallery.xml but it does not exist there.
If using the xmlURL options, make sure your 'gallery.xml' file is in the correct location.
If not using the xmlURL option, then AutoViewer will look for the XML file to be called 'gallery.xml' and to be located in the same directory as the HTML file containing the embedding code.
Once your XML file is in the correct location, make sure that the paths to the images are correct.
You can use either absolute or relative paths within the XML file but if using relative paths, make sure that the paths are relative to the HTML file containing the embedding code.

Steven Speirs
SimpleViewer Support Team.

Re: AutoViewer requires JavaScript and the Flash Player - I NEED HELP

I'm sorry for my ignorance, but you lost me on that last part. My programming skills are basic. I think my XML file is now in the correct location. How do I make sure my paths are correct? I don't know the difference between absolute and relative paths.

I got the stock pictures to show up. Do I need to actually type each of my 50+ pictures' URLs into the XML file? Or will it somehow read it automatically? If so, how can I do this?

Re: AutoViewer requires JavaScript and the Flash Player - I NEED HELP

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.

Re: AutoViewer requires JavaScript and the Flash Player - I NEED HELP

So sorry, Steve. Thank you for your patience. You are amazing. But I'm still having a little trouble.

I changed everything you said, uploaded a gallery.php file, etc. The Autoviewer shows up now, with my pictures, but they're all stacked on top of each other and the gallery is not viewing correctly (freezes, not all pics load, etc).

Now what I doing wrong??  sad

Thanks so much

Re: AutoViewer requires JavaScript and the Flash Player - I NEED HELP

I have not seen that effect before and do not know what might be causing it.
Perhaps AutoViewer does not fare well with a dynamic XML file generated by PHP and you may be better served by using a static XML file with each image listed as an individual <url> entry in a standard XML file. I realise that this what what you were trying to avoid in the first place but it may be the solution to your current problem.
I have not seen the stacking effect with a static XML file before so give it a try and see how you get on.
Rename your XML file back to 'gallery.xml', remove the xmlURL line from your embedding code and use code such as the following in the XML file:

<?xml version="1.0" encoding="UTF-8"?>
<gallery frameColor="0xFFFFFF" frameWidth="10" imagePadding="20" displayTime="6" enableRightClickOpen="true">
<image>
   <filename>images/image1.jpg</filename>
   <caption></caption>
   <width>700</width>
   <height>465</height>
</image>
Steven Speirs
SimpleViewer Support Team.

Re: AutoViewer requires JavaScript and the Flash Player - I NEED HELP

Got it! I made the changes you suggested and it's now working. THANK YOU so much for all your help. You are a GOD.

big_smile