Search…

X3 Photo Gallery Support Forums

Search…
 
User avatar
andreamarucci
Experienced
Topic Author
Posts: 312
Joined: 01 Mar 2011, 11:13

Html gallery & embedding

19 Jul 2012, 08:31

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?
 
User avatar
andreamarucci
Experienced
Topic Author
Posts: 312
Joined: 01 Mar 2011, 11:13

Re: Html gallery & embedding

19 Jul 2012, 10:30

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.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 14452
Joined: 30 Sep 2006, 03:37

Re: Html gallery & embedding

19 Jul 2012, 10:58

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.
 
User avatar
Nick
Imagevue Hitman
Posts: 2872
Joined: 02 May 2006, 09:13

Re: Html gallery & embedding

20 Jul 2012, 02:23

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>
firedev.com
 
User avatar
andreamarucci
Experienced
Topic Author
Posts: 312
Joined: 01 Mar 2011, 11:13

Re: Html gallery & embedding

20 Jul 2012, 03:09

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...
 
User avatar
mjau-mjau
X3 Wizard
Posts: 14452
Joined: 30 Sep 2006, 03:37

Re: Html gallery & embedding

20 Jul 2012, 06:58

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>
 
User avatar
andreamarucci
Experienced
Topic Author
Posts: 312
Joined: 01 Mar 2011, 11:13

Re: Html gallery & embedding

20 Jul 2012, 07:06

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?
 
User avatar
mjau-mjau
X3 Wizard
Posts: 14452
Joined: 30 Sep 2006, 03:37

Re: Html gallery & embedding

20 Jul 2012, 07:21

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 ...