Topic: Help to create second gallery

Hi there,
Ive been trying to create a second tiltviewer gallery on another html page within my site, however this second gallery is loading up with the images from the first. I tried to follow the instructions on the support section of the simpleviewer website.
Im not sure how to fix this. I probably have the second gallery files in the wrong place.
I'd apprciate any help as to where to go from here,
Thank you

Re: Help to create second gallery

Your embedding code for two TiltViewer galleries on the same page should look something like this:

<div id="flashcontent1">TiltViewer requires JavaScript and the latest Flash player. <a href="http://www.macromedia.com/go/getflashplayer/">Get Flash here.</a></div>
<script type="text/javascript">
    var fo1 = new SWFObject("TiltViewer.swf", "viewer1", "100%", "100%", "9.0.28", "#000000");            
    fo1.addVariable("useFlickr", "false");
    fo1.addVariable("xmlURL", "gallery1.xml");
    fo1.addVariable("maxJPGSize","640");
    fo1.addVariable("useReloadButton", "false");
    fo1.addVariable("columns", "3");
    fo1.addVariable("rows", "3");
    fo1.addParam("allowFullScreen","true");
    fo1.write("flashcontent1");            
</script>    
<div id="flashcontent2">TiltViewer requires JavaScript and the latest Flash player. <a href="http://www.macromedia.com/go/getflashplayer/">Get Flash here.</a></div>
<script type="text/javascript">
    var fo2 = new SWFObject("TiltViewer.swf", "viewer2", "100%", "100%", "9.0.28", "#000000");            
    fo2.addVariable("useFlickr", "false");
    fo2.addVariable("xmlURL", "gallery2.xml");
    fo2.addVariable("maxJPGSize","640");
    fo2.addVariable("useReloadButton", "false");
    fo2.addVariable("columns", "3");
    fo2.addVariable("rows", "3");
    fo2.addParam("allowFullScreen","true");
    fo2.write("flashcontent2");            
</script>

If you continue to experience difficulties, please post the URL to your web page so that we can take a look.

Steven Speirs
SimpleViewer Support Team.

Re: Help to create second gallery

Hi Steven,
Im sorry perhaps I wasnt very clear, the second gallery is on a second html page, here is the link:



http://www.billetmotorsport.com/contents/gallery.html

THank You

Re: Help to create second gallery

You can have each gallery point to different XML files (which list different images to display) by using the xmlURL option.
For example, in one gallery's embedding code, you might have the line:

fo.addVariable("xmlURL", "gallery1.xml");

... and in another gallery's embedding code, you might have the line:

fo.addVariable("xmlURL", "gallery2.xml");

If you continue to experience difficulties, please post the URLs to both galleries so that I can compare the code for both to see where the problem may lie.

Steven Speirs
SimpleViewer Support Team.

Re: Help to create second gallery

Unfortunately I cant get the second gallery to work
http://www.billetmotorsport.com/contents/gallery.html

It is loading up with blank pictures. I renamed the xml file gallery2 and also changed the code as you suggested to point here. Ive kept all of the gallery's files in the folder named gallery2.

THe first gallery is here
http://www.billetmotorsport.com/contents/products1.html
The files for this gallery are within the contents folder.

Please have a look and let me know how I can fix this- Thanks

Re: Help to create second gallery

TiltViewer in your 'gallery.html' file is looking for the file 'gallery2.xml' in the location:
http://www.billetmotorsport.com/contents/gallery2.xml
..but it does not exist here.
In your 'gallery.html' file, change the line:

fo.addVariable("xmlURL", "gallery2.xml");

... to:

fo.addVariable("xmlURL", "gallery2/gallery2.xml");

All relative links to the images within the 'gallery2.xml' file are relative to the HTML page into which TiltViewer is embedded so, with the files in their current locations, you will also have to change the entries in the 'gallery2.xml' file from:

<photo imageurl="images/100623_02.jpg" showFlipButton="true">

... to:

<photo imageurl="gallery2/images/100623_02.jpg" showFlipButton="true">
Steven Speirs
SimpleViewer Support Team.

Re: Help to create second gallery

Thank you so much Steven,
Your solution works fine, and has saved me heaps of time problem solving.
Regards anne