Search…

X3 Photo Gallery Support Forums

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

Embedding and mobile

18 Jul 2012, 11:57

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

Re: Embedding and mobile

19 Jul 2012, 03:47

Take this code from mobile-detect:
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>
And add it to the <head> section of your page. Replace the /imagevue/ link to the actual imagevue installation path.
firedev.com
 
User avatar
andreamarucci
Experienced
Topic Author
Posts: 312
Joined: 01 Mar 2011, 11:13

Re: Embedding and mobile

19 Jul 2012, 04:10

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

Re: Embedding and mobile

19 Jul 2012, 05:54

I think it's best to disregard this. It will work only for mobile visitors anyway.
firedev.com
 
User avatar
andreamarucci
Experienced
Topic Author
Posts: 312
Joined: 01 Mar 2011, 11:13

Re: Embedding and mobile

19 Jul 2012, 09:08

Yeah, I think I'll give up...