Topic: How to link from a different path


This is a nice gallery.

How can I create an HTML page that contains a gallery when the HTML page is not in the same path as the gallery?

Like this:


(Note that the pictures are in something like gallery/thumbnails)

The album has the contents to embed the gallery as usual, and the paths are changed... but still it doesn't display the gallery.

Thank you in advance,


Re: How to link from a different path

I saw this same question in other unanswered threads...
Still no answer for them?

Thank you very much, hope somebody finds the answer. :o)


Re: How to link from a different path

Yes that's possible. The swf, xml, images and thumbs can be in a different directory than the HTML file.

For example if your swf, xml, thumbs and images folders are in a sub-directory called gallery1, your HTML embed code will look like this:

var fo = new FlashObject("gallery1/viewer.swf", "viewer", "100%", "100%", "6", "#181818");        
        fo.addParam("quality", "best");
        fo.addVariable("xmlDataPath", "gallery1/imageData.xml");

Then in your imageData.xml file, set your image and thumb path like this:

imagePath="gallery1/images/" thumbPath="gallery1/thumbs/"

Also check here: … omize.html

Felix Turner
SimpleViewer Support Team.

Re: How to link from a different path

I assume I could also use 2 or more xml files?

Also how can I modify the buildgallery.php to create diferent flavors of the xml (mostly to change the &options var) for the same images?

I guess I could create several &options vars such as &options1, &options2 etc and then reference them when exporting the xml. But I wonder if there is an easier way...


Re: How to link from a different path

hmmm diddlin' and trying all kinds of things but can't get it all to link up .....

just wondering though if this might be the problem..... I'm trying to make it work in a website built from Dreamweaver templates..... might this be the problem?

I tried embedding the bit that goes in the <head> tag in to the template as my particular templates <head> bit is locked... but still no joy.....

any ideas guys?  :)

*passes round the ice bucket*

Re: How to link from a different path

Thought I post an update.

I modified the buildgallery so it creates 2 xml files from the same image collection. I will be more than happy to share... just drop me a note.

This is really cool photo gallery :-)


Re: How to link from a different path

Hey eyalkattan..... couldn't agree more.... rockin' viewer!

Could you explain a little more what you have managed to diddle?   Am intrigued  :D

Re: How to link from a different path

Sure... here we go....:

Let's assume you have one set of pictures and you would like to launch it  in a different looking galleries.

For example, you want to show the thumbnails on the left with 4 columns and 5 rows in one gallery and maybe show the thumbnails as 1 row of 6 thumbs right under the big image in another gallery.

Currently, you would probably duplicate the xml file and modify it... which is cool. However the next time you update your gallery with new images, you will have to do it all over again.

I had a need to switch between left and right handed thumbs because I had to show the same gallery in multilingual site which support also right-to-left language (Hebrew).

What I did, is basically modified the buildgallery.php so it creates 2 sets of options $options1, $options2 and created 2 additional XML vars $xml1, $xml2.
Then I assigned each of the $xml vars with the corresponding $options value.

At the end of looping through the thumbnails (and creating the default $xml var without the options) I appended the $xml value to $xml1 and to $xml2

Now I have 2 XML streams waiting to be written out.

I copied the section of the xml file export and modified it so each copy created a different xml file using the corresponding $xml1 and $xml2 vars and different file name of course.

Next step, I duplicated the index.html and created index1.html and index2.html.
Added the "fo.addVariable("xmlDataPath", "file?.xml"); " to each file where the ? is 1 or 2.

And that's it... when you launch each index?.html you get differently looking gallery with the same pictures.

My next step would be to modify the buildGallery so it can manage more than 1 image folder at once. I've been also thinking of building some admin tool where you can create galleries and skins by using a form... or integrate it with the Windows XP publishing module so you can just select the images on your computer and publish them to the correct gallery/folder on your web site and then it will automatically update the xml files... lots of options... but not sure if the creators would allow this though :-)

Hope this helps...


Re: How to link from a different path

hey dude... just wanted to say ((((( thank you ))))) for taking the time to explain this..... totally on your wavelength now and think it's very cool what you're working on there.... more power to ya  :D

Re: How to link from a different path

Thanks very much ;)

Some updates:

I got the Windows XP Image Publisher to work and I now can post images directly to the /images directory (no need for FTP etc...)

Would be great if I had the .fla file of the viewer or if the authors are interested in continuing development.... (do I hear a challenge???)....

More to come...