Topic: Upgrade from 2.1.3 to 2.3.1 : embedded galleries

I've just upgraded to Svbuilder-Pro 2.3.1 to stop embedded galleries giving "Gallery XML not found" on mobile devices.

I am creating multiple embedded galleries (instead of galleries that open on a new page), each on a different HTML page, and each with its own gallery folder, plus an external svcore folder.

In the embedded code I'm using flashvars to define the baseURL of each gallery folder and the galleryURL (to give caption language variants).

I've uploaded the new version of svcore to the site without changing any of the files in the existing gallery folders. Everything works as it did in 2.1.3  i.e. OK on the Mac, but still giving "Gallery XML not found" on iPad and Android.

I followed the advice on upgrading Svbuilder-Pro but can't tell whether I need to change my embedded code for version 2.3.1.

Q1 : Are there changes I need to make to the embedded code or to any other files to make the galleries work on mobile devices?

Q2 : When I open an existing 2.1.3 gallery in SvBuilder 2.3.1 the images are not displayed - just a little square in the centre of the black square. However a double click gives me the correct image in Preview.  If I create a new gallery from scratch the images show properly.

My embedded code for the page http://www.hautquercy.com/fr/autoire, for example, is :

<!--START SIMPLEVIEWER EMBED -->
    <script type="text/javascript" src="http://hautquercy.com/media/svcore/js/simpleviewer.js"></script>
    <script type="text/javascript">
    var flashvars = {};
       flashvars.baseURL = "http://hautquercy.com/media/galleries/autoire/";
       flashvars.galleryURL = "french.xml";
       flashvars.languageCode = "FR";
    var params = {};
       params.bgcolor = "F0F0F0";
    simpleviewer.ready(function () {
        simpleviewer.load('sv-container', '620', '620', 'transparent', true, flashvars, params);
    });
    </script>
    <div id="sv-container"></div>
    <!--END SIMPLEVIEWER EMBED -->

Re: Upgrade from 2.1.3 to 2.3.1 : embedded galleries

Q1 : Are there changes I need to make to the embedded code or to any other files to make the galleries work on mobile devices?

No. The embedding code for v2.3.1 is exactly the same as for v2.1.3.
Your gallery should be displayed on mobile devices if you visit http://hautquercy.com/fr/autoire
www.hautquercy.com is a subdomain of hautquercy.com and all gallery files must be on the same domain as the web page containing the gallery's embedding code due to the JavaScript same origin policy security restriction. Please see this web page for further details.
Either visit your site using the same domain you use for the URLs in the gallery's embedding code or use relative URLs instead of absolute URLs.

Q2 : When I open an existing 2.1.3 gallery in SvBuilder 2.3.1 the images are not displayed - just a little square in the centre of the black square. However a double click gives me the correct image in Preview.  If I create a new gallery from scratch the images show properly.

Try opening your gallery's 'gallery.xml' file in a plain text editor and make sure that each <image> entry corresponds to an image in your gallery's 'images' folder.

Steven Speirs
SimpleViewer Support Team.

Re: Upgrade from 2.1.3 to 2.3.1 : embedded galleries

Thanks for your response.  I understand the problem now. 

I see that boopyqt posted the same problem yesterday.

I have tried using relative URLs because I want to be able to visit the site using both http://hautquercy.com/fr/autoire and
http://www.hautquercy.com/fr/autoire but the result is that www.hautquercy.com/fr/autoire works on Android phone, iPad and iMac.  That is progress.  But http://hautquercy.com/fr/autoire gives "Gallery XML not found" on all three devices.

My embedding code is :

<!--START SIMPLEVIEWER EMBED -->
    <script type="text/javascript" src="/media/svcore/js/simpleviewer.js"></script>
    <script type="text/javascript">
    var flashvars = {};
       flashvars.baseURL = "/media/galleries/autoire/";
       flashvars.galleryURL = "french.xml";
       flashvars.languageCode = "FR";
    var params = {};
       params.bgcolor = "F0F0F0";
    simpleviewer.ready(function () {
        simpleviewer.load('sv-container', '620', '620', 'transparent', true, flashvars, params);
    });
    </script>
    <div id="sv-container"></div>
    <!--END SIMPLEVIEWER EMBED -->

Re: Upgrade from 2.1.3 to 2.3.1 : embedded galleries

Try using relative URLs (such as below) instead of using a leading slash to denote your root directory to see if it makes a difference:

<!--START SIMPLEVIEWER EMBED -->
<script type="text/javascript" src="../../media/svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
    var flashvars = {};
    flashvars.baseURL = "../../media/galleries/autoire/";
    flashvars.galleryURL = "french.xml";
    flashvars.languageCode = "FR";
    var params = {};
    params.bgcolor = "F0F0F0";
    simpleviewer.ready(function () {
        simpleviewer.load('sv-container', '620', '620', 'transparent', true, flashvars, params);
    });
</script>
<div id="sv-container"></div>
<!--END SIMPLEVIEWER EMBED -->
Steven Speirs
SimpleViewer Support Team.

Re: Upgrade from 2.1.3 to 2.3.1 : embedded galleries

In the end the solution was to tweak the site template to get it to work. 

Many thanks for your help.