Topic: External gallery.xml for Mobile Viewer

Hello,
is it possible to use an external location for the gallery.xml file (defined using flashvars for normal simpleviewer) when using Mobile Viewer? My galleries display "Gallery XML not found" when viewed on mobile devices, however they display fine using flash.

I actually do not have gallery.xml on an external location, but rather it is generated using php.

Thanks for your help!

Re: External gallery.xml for Mobile Viewer

You may need to create a 'crossdomain.xml' file on the web server that is hosting the gallery's XML file.
Please see this FAQ for details: http://simpleviewer.net/simpleviewer/su … trouble_11

I actually do not have gallery.xml on an external location, but rather it is generated using php.

Embedding code such as the following should work, as long as the PHP file generates XML code suitable for SimpleViewer.

<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript" src="svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
var flashvars={};
flashvars.galleryURL="gallery.php";
simpleviewer.ready(function () {
simpleviewer.load("sv-container", "100%", "100%", "222222", true, flashvars);
});
</script>
<div id="sv-container"></div>
<!-- END SIMPLEVIEWER EMBED -->
Steven Speirs
SimpleViewer Support Team.

Re: External gallery.xml for Mobile Viewer

Strange.

I have following code, which works fine with flash, but not on mobile devices:

    <!--START SIMPLEVIEWER EMBED -->
    <script type="text/javascript" src="svcore/js/simpleviewer.js"></script>
    <script type="text/javascript">
    jQuery(document).ready(function () {
        var flashvars = {};
        flashvars.galleryURL = "rss.php?data=aHR0cDovL3BpY2FzYXdlYi5nb29nbGUuY29tL2RhdGEvZmVlZC9iYXNlL3VzZXIvMTAyODE4NjE5NTA4NDU2NTI4MTcwL2FsYnVtaWQvNTY1NTEzMTQ4MzUzMTI5MTg4OT9hbHQ9cnNzJmtpbmQ9cGhvdG8mYXV0aGtleT1HdjFzUmdDSWZ4a0p1cmxJdkhGQSZobD1lbl9VUw==";        SV.simpleviewer.load('sv-container', '99%', '100%', 'transparent', true, flashvars );
    });
    </script>
    <div id="sv-container"></div>
    <!--END SIMPLEVIEWER EMBED -->

Do you see any problem with it? (as I do not think it is a crossdomain.xml problem)
Thanks!

Re: External gallery.xml for Mobile Viewer

As you suggest, it is not a cross-domain issue if your 'rss.php' file is on the same domain as your other gallery files.

Try setting the galleryURL without the query string, ie:

flashvars.galleryURL = "rss.php";

If the query string is somehow causing the problem, you should see a 'Cannot Parse XML File' message rather than a 'Gallery XML Not Found' message.

Also, have you set a content type in your 'rss.php' file?

<?php
header ("Content-Type:text/xml");
?>

If not, try doing so.

Steven Speirs
SimpleViewer Support Team.

Re: External gallery.xml for Mobile Viewer

Unfortunately, neither of your suggestion helped. Even without the ?query string it does not work on mobile, while working using flash.

You can try it yourself:
ilusia.dyndns.org  /  khama  /  index.php   (gallery)
ilusia.dyndns.org  /  khama  /  rss.php    (this is the one that generates gallery.xml)

(i've put there some extra spaces to prevent google indexing of links to my galleries)
Thanks!

Re: External gallery.xml for Mobile Viewer

One more thing comes to my mind: the rss.php is on the same domain as my gallery files, except from the actual thumbnails and pictures, which are located on picasaweb. The generated gallery.xml file includes links to those hosted files. However, I stil believe it's not crossdomain.xml problem..., or is it?

Re: External gallery.xml for Mobile Viewer

I notice you are using SimpleViewer v2.1.2.
Please upgrade to the latest version (v2.1.3) to see if this makes a difference. Several bugs which were present in v2.1.2 were fixed in v2.1.3.
Please see the 'SimpleViewer Version History' for details: http://simpleviewer.net/simpleviewer/history.html
Please see here for details on 'Upgrading SimpleViewer-Pro': http://simpleviewer.net/simpleviewer/pr … grade.html

Steven Speirs
SimpleViewer Support Team.

Re: External gallery.xml for Mobile Viewer

Thanks! That helped! wink
However, mobile fullscreen is still not working when I allow full gallery url (a gallery.xml url of form:
rss.php?data=base64encodedsomething

Fullscreen works if I setup rss.php to statically generate something, but I would need it to generate gallery.xml based on the data passed to it.

This seems to me to be a bug of svcore/full.html.

Nevertheless, do you have any suggestions?
Thanks!

Re: External gallery.xml for Mobile Viewer

I think I found a problem, which is I believe a bug in simpleviewer, but please correct me if I'm wrong. When, in mobile, I click on fullscreen following URL is generated:

http:  //  ilusia.  dyndns.  org/khama/svcore/full.html?bg=transparent&galleryURL=http%3A%2F%2Filusia.dyndns.org%2Fkhama%2Frss.php?data=aHR0cDovL3BpY2FzYXdlYi5nb29nbGUuY29tL2RhdGEvZmVlZC9iYXNlL3VzZXIvMTAyODE4NjE5NTA4NDU2NTI4MTcwL2FsYnVtaWQvNTY1NDU4NzQzODExMjYxNDY0MT9hbHQ9cnNzJmtpbmQ9cGhvdG8mYXV0aGtleT1HdjFzUmdDTEN2MWM3SHJxcVRod0UmaGw9ZW5fVVM=&showopenbutton=true&showfullscreenbutton=true&useflickr=false&mobileshowcaption=true&mobileshownav=true&mobileshowthumbs=true&firstimageindex=-1&title=Betonkocka%20pre%20Necesalovcov

..which does not work, however if I substitute the "?" and "=" signs behind "rss.php" (the value of data), all the way to the "&showopenbutton" using the url encode values, then everything works fine. This is the URL that actually works.

http:  //  ilusia.  dyndns.  org/khama/svcore/full.html?bg=transparent&galleryURL=http%3A%2F%2Filusia.dyndns.org%2Fkhama%2Frss.php%3Fdata%3DaHR0cDovL3BpY2FzYXdlYi5nb29nbGUuY29tL2RhdGEvZmVlZC9iYXNlL3VzZXIvMTAyODE4NjE5NTA4NDU2NTI4MTcwL2FsYnVtaWQvNTY1NTEzMTQ4MzUzMTI5MTg4OT9hbHQ9cnNzJmtpbmQ9cGhvdG8mYXV0aGtleT1HdjFzUmdDTmV2OFk3WXU2LUZOdyZobD1lbl9VUw%3D%3D&showopenbutton=true&showfullscreenbutton=true&useflickr=false&mobileshowcaption=true&mobileshownav=true&mobileshowthumbs=true&firstimageindex=-1&title=Navsteva%203xMH

Please remove the spaces from the domain name in order for links to work.
Thanks!

Re: External gallery.xml for Mobile Viewer

Basically, what simpleviewer should do when switching to mobile fullscreen is to urlencode the url of the gallery.xml (obviously, as it might include characters such as '?' or '='). Unfortunately, this is something I cannot do when creating flashvars, as then the gallery would not work at all.

Last edited by dunco (2011-09-23 01:52:21)

Re: External gallery.xml for Mobile Viewer

This does, indeed, look like a bug.
The query string for the galleryURL becomes part of a larger query string for the Mobile Player's Full Window URL.
I have now logged a bug report.
Thank you for tracking this down and reporting.

Steven Speirs
SimpleViewer Support Team.