Page 1 of 1
Embedding and mobile
Posted: 18 Jul 2012, 11:57
by andreamarucci
I've successfully embedded my gallery using embed_example.html and it works but the problem is that if I try to access the html using my smartphone, it is not recognized and the flash gallery is shown instead.
How can I make the mobile detect works? I've seen the mobile-detect html but I really don't know how to make it work.
Thanks
Re: Embedding and mobile
Posted: 19 Jul 2012, 03:47
by Nick
Take this code from mobile-detect:
<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>
And add it to the <head> section of your page. Replace the /imagevue/ link to the actual imagevue installation path.
Re: Embedding and mobile
Posted: 19 Jul 2012, 04:10
by andreamarucci
Done and it works. The only problem is that in the browser address bar the real gallery address appear instead of the "fake" one. I've to check how to fix this...
Thanks!
Re: Embedding and mobile
Posted: 19 Jul 2012, 05:54
by Nick
I think it's best to disregard this. It will work only for mobile visitors anyway.
Re: Embedding and mobile
Posted: 19 Jul 2012, 09:08
by andreamarucci
Yeah, I think I'll give up...