Page 1 of 1

Html gallery & embedding

Posted: 19 Jul 2012, 08:31
by andreamarucci
Just a question. I'm setting up my gallery embedded using the example provided in the distribution and it works.

What happen if someone is visiting my gallery using a browser that's not Flash capable? It's switched automatically to the html version or what?

Re: Html gallery & embedding

Posted: 19 Jul 2012, 10:30
by andreamarucci
Maybe I would need something like the mobile detect. Basically I would like that if someone is visiting the page with a no flash browser, he's automatically redirected to the html version of the gallery and, in addition, I'm investigating if it's possible, also with a flash enabled browser, to go directly to the html version.

Re: Html gallery & embedding

Posted: 19 Jul 2012, 10:58
by mjau-mjau
If you embed the imagevue2.swf file, then it will not show anything else if flash is not available. You would need to add some javascripts to redirect for non-flash and for mobile.

Re: Html gallery & embedding

Posted: 20 Jul 2012, 02:23
by Nick
For that matter you would need to add the script from mobile-detect.html:
Code
<script>
   var url = "/imagevue/"; // Link to the Imagevue installation on your server
   if (navigator.userAgent.match(/iPhone|iPad|iPod|android|bada|blackberry|phone|mobile/i)) window.location = url;
</script>

Re: Html gallery & embedding

Posted: 20 Jul 2012, 03:09
by andreamarucci
I've done that yet and it works. My question is about the html version of the gallery if someone is browsing the gallery with a browser that's not flash enabled.

i imagine that I've to add some Js but I really can't imagine what and where. If someone can help...

Re: Html gallery & embedding

Posted: 20 Jul 2012, 06:58
by mjau-mjau
andreamarucci wrote:I've done that yet and it works. My question is about the html version of the gallery if someone is browsing the gallery with a browser that's not flash enabled.

i imagine that I've to add some Js but I really can't imagine what and where. If someone can help...
I assume you are using the swfobject JS, so you should be able to add this into the <head> of your html:
Code
<script type="text/javascript">
swfobject.addLoadEvent(function() {
    if (!swfobject.hasFlashPlayerVersion("9.0.18")) {
        window.location = "/imagevue/"; // Link to the Imagevue installation on your server
    }
});
</script>

Re: Html gallery & embedding

Posted: 20 Jul 2012, 07:06
by andreamarucci
Thanks, just to understand, this script detect if the version of the player is 9.0.18 and if it's not, redirect the user to "/imagevue/". Instead of imagevue I can put, for example, "www.domain.com/imagevue/imagevue.php?p=html" to get the html version. Is this correct?

Re: Html gallery & embedding

Posted: 20 Jul 2012, 07:21
by mjau-mjau
andreamarucci wrote:Thanks, just to understand, this script detect if the version of the player is 9.0.18 and if it's not, redirect the user to "/imagevue/". Instead of imagevue I can put, for example, "www.domain.com/imagevue/imagevue.php?p=html" to get the html version. Is this correct?
Basically yes ... although the 9.0.18 is just a number, and 99.9% of the users that do have flash, will have above 9.0.18 anyway. So basically, what it really does is just check if visitor has swf player at all, and if not, redirects them.

Yes, you could also point directly to the target "imagevue.php?p=html" if you want. It is not really required though, because normally if you redirect to the imagevue folder, it will automatically redirect to the html version anyway since there is already a detection scheme there. Doesnt hurt though I guess ...