Topic: Multi Galleries

Hi Steven

Please could you kindly assist again. I am wanting to create a different gallery on different htm pages. The first gallery is working fine - http://www.vassilikiholidays.com/restaurants.htm For this Gallery I placed everything (index.html, gallery.xml, thumbs, images, svcore) in the root directory.

Then I created another svBuilder Gallery (and called it grand-nefelli) and saved everything in a folder. I then copied the code generated (below) and placed it in the new htm page.

But when I view the new page the Gallery from the 'restaurants' page is loading (viewing) and not the new Gallery. It seems the code in the second page is also pointing to the first generated Gallery and not to the new Gallery.

Please could you kindly advise how I can rectify this. Perhaps you could please alter the code below for me if possible so that it points to my new folder :  grand-nefelli

Many thanks
Tony

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

Re: Multi Galleries

Sorry I forgot to mention above that I have tried to add the folder name ' grand-nefelli ' into various places in the embedded code (as can be seen below) but still the newly created gallery (grand-nefelli) will still not load - only the gallery on the restaurant page loads in the new page.

<script type="text/javascript" src="grand-nefelli/svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
simpleviewer.ready(function () {
simpleviewer.load('sv-container', '100%', '100%', '222222', true);
});
</script>
<div id="sv-container"></div>

Last edited by TonyM (2013-10-16 08:30:13)

Re: Multi Galleries

You can point SimpleViewer towards a complete gallery folder by using the baseURL configuration option following the instructions here.
If you have uploaded your 'grand-nefelli' folder (not just the contents) to the same directory as the page which contains the embedding code, then the embedding code should be as follows:

<script type="text/javascript" src="grand-nefelli/svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
var flashvars={};
flashvars.baseURL="grand-nefelli/";
simpleviewer.ready(function () {
simpleviewer.load('sv-container', '100%', '100%', '222222', true, flashvars);
});
</script>
<div id="sv-container"></div>
Steven Speirs
SimpleViewer Support Team.

Re: Multi Galleries

Thanks hugely Steven. I added the code you kindly generated for me and everything worked perfectly smile

Sorry to be a pain in the "you know where" but the final thing then I will be out of your hair

I have tried adding 2 galleries to one html page by the same method above. I created 2 galleries as previously and saved them in different named folders. Then I added the code you supplied above (twice) and changed the names in the code to correspond with the 2 folders as can be seen below.

When viewing only the 'vassilki-village' gallery is loading on the page and not the 'vassiliki-bay' gallery

Any ideas?

Thank youuuuuuuu smile


<td><div align="left"><script type="text/javascript" src="vassiliki-village/svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
var flashvars={};
flashvars.baseURL="vassiliki-village/";
simpleviewer.ready(function () {
simpleviewer.load('sv-container', '60%', '50%', '222222', true, flashvars);
});
</script>
<div id="sv-container"></div></div></td>
          </tr>
        </table>
        <p>&nbsp;</p>
        <table width="50%"  border="0">
          <tr>
            <td><div align="center" class="style4">Vassiliki Bay </div></td>
          </tr>
        </table>
        <table width="90%"  border="0">
          <tr>
            <td><div align="left"><script type="text/javascript" src="vassiliki-bay/svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
var flashvars={};
flashvars.baseURL="vassiliki-bay/";
simpleviewer.ready(function () {
simpleviewer.load('sv-container', '60%', '50%', '222222', true, flashvars);
});
</script>
<div id="sv-container"></div></div></td>

Re: Multi Galleries

You need to embed each gallery into a <div> with a unique 'id'.
For example:

<script type="text/javascript" src="vassiliki-village/svcore/js/simpleviewer.js"></script>

<script type="text/javascript">
var flashvars1={};
flashvars1.baseURL="vassiliki-village/";
simpleviewer.ready(function () {
simpleviewer.load('sv-container1', '60%', '50%', '222222', true, flashvars1);
});
</script>
<div id="sv-container1"></div>

<script type="text/javascript">
var flashvars2={};
flashvars2.baseURL="vassiliki-bay/";
simpleviewer.ready(function () {
simpleviewer.load('sv-container2', '60%', '50%', '222222', true, flashvars2);
});
</script>
<div id="sv-container2"></div>

Also, you need to load the 'simpleviewer.js' file only once on your web page.

Steven Speirs
SimpleViewer Support Team.

Re: Multi Galleries

Many thanks Steven. That has resolved the problem of only one gallery loading on the page instead of two.

However, both galleries are showing the identical images from the vassiliki-bay folder, instead of one showing images from the vassiliki-village folder and the other from the vassiliki-bay folder. So it appears both sets of code are pointing to one folder instead of two seperate folders. If I remove the vassiliki-bay / sv-container2 code as a test then the vassiliki-village gallery (sv-container1)  loads correctly and shows the correct images. As soon as I insert the vassiliki-bay / sv-container2 code the 'village' images also become 'bay' images.

Do I need to alter any code in the Folders? Thanks hugely.

Re: Multi Galleries

When doing the above I was previewing on my pc without having actually loaded anything on to the server. I have now uploaded on to the server and now no images at all show http://www.vassilikiholidays.com/photo_gallery.htm

Re: Multi Galleries

both galleries are showing the identical images from the vassiliki-bay folder

Sorry, my mistake.
When embedding multiple galleries on a single page using baseURLs, it is necessary to give each gallery a unique 'flashvars' variable name. I have amended the code from my last post and it should now work OK.

now no images at all show

Currently, neither of your galleries display any images as both galleries are using the last 'flashvars' baseURL on your page which is 'vassiliki-bay' and this does not seem to be a valid gallery folder. (There is no 'gallery.xml' file inside it.)
Use my amended code from above and upload the contents of your 'vassiliki-bay' gallery to your http://www.vassilikiholidays.com/vassiliki-bay/ directory and all should be well.

Steven Speirs
SimpleViewer Support Team.

Re: Multi Galleries

OMG - Sorry, I forgot to upload the vassiliki-bay folder which I have now done and as you can see both galleries are showing the same images - http://www.vassilikiholidays.com/photo_gallery.htm

I will now change the code as you suggested. Sorry for hassleing you like this Steven, as I'm very inexperienced in this sort of thing. Your assistance is gratefully appreciated.

Re: Multi Galleries

Bingo !!! All is perfect and I'm mega happy. Thank you very much Steven smile

Re: Multi Galleries

You're welcome!

Steven Speirs
SimpleViewer Support Team.