Topic: Multiple galleries on seperate pages

I'm working on an art portfolio site which is organized like so:

index.html

about.html

animation.html
illustration.html (needs viewer gallery)

painting.html (needs viewer gallery)

inklings.html (needs viewer gallery)

toys.html (needs viewer gallery)

process.html (needs viewer gallery)

There are NO subfolders. Everything is located in public_html.

I now have a working SV viewer in my painting.html div. I need to create four more galleries with the same viewer customizations, but different images/thumbs. I've downloaded and read the provided .zip files (multiple_galleries.zip + simpleviewer_embed_examples.zip) but can't understand the way it's been organized.

Do I need to place all my non-index.html documents which need viewers (illustration.html, toys.html, etc.) into a subfolder with a new gallery.xml doc, for the specific gallery to link properly?

In the .zip sample, I also see that swfobject.js and viewer.swf are located in the multiple gallery's subfolders. These docs are originally in svcore -- do I copy those files again? Is that necessary? Is each svcore folder specific to the created gallery (with images) or is it a root file?

Basically, I don't understand which files are specific to the particular gallery, and which need only one copy for the viewer to function on the site as a whole.

I'd like to find the cleanest way of organizing these files... I really appreciate any help.

I need to get my portfolio site up ASAP.

Thanks in advance!

Re: Multiple galleries on seperate pages

So I put the painting.html doc into a subfolder with the gallery, backlinking all the files -- it works well.

However, this basically means that my URLs will have to read as: www.mywebsite.com/painting/painting.html?

Hmm... it would have been nice to have something cleaner...

Re: Multiple galleries on seperate pages

Do I need to place all my non-index.html documents which need viewers (illustration.html, toys.html, etc.) into a subfolder with a new gallery.xml doc, for the specific gallery to link properly?

No. Your HTML pages which contain galleries can stay in your root directory if you like.
You can use either a galleryURL or baseURL configuration option in each gallery's embedding code to point towards either a XML file (galleryURL) or a complete gallery folder (baseURL).

If you use a galleryURL, then your gallery's embedding code will look something like this:

<!--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 -->

The galleryURL can be relative (to the HTML page containing the embedding code) or absolute.
Any relative paths within the XML file (imageURLs or thumbURLs) will also be relative to the HTML page containing the embedding code.

If you use a baseURL, then your gallery's embedding code will look something like this:

<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript" src="gallery123/svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
    var flashvars = {};
    flashvars.baseURL = "gallery123/";
    simpleviewer.ready(function () {
        simpleviewer.load("sv-container", "100%", "100%", "222222", true, flashvars);
    });
</script>
<div id="sv-container"></div>
<!-- END SIMPLEVIEWER EMBED -->

The baseURL should point towards a complete gallery folder and, unless you also use a galleryURL to specify a different name for the gallery's XML file, SimpleViewer will look for a file named 'gallery.xml' inside the gallery folder. Any relative paths within the XML file will now be relative to the baseURL.
The baseURL method of embedding is documented here.

The 'svcore' folder is common to all galleries. (The files inside it are not specific to individual galleries and the folder's structure must remain intact.) You have have all your galleries share a single instance of the 'svcore' folder by following the instructions here.

The only files unique to each gallery are the gallery's own XML file (listing the configuration options and images to be displayed) and the images themselves.

I hope this helps to clarify things.

Steven Speirs
SimpleViewer Support Team.

Re: Multiple galleries on seperate pages

BEAUTIFUL, THANK YOU!

Just tried baseURL, worked perfectly. Will change all other documents and report back.

Thank you so, so much for the help Steven!