Search…

X3 Photo Gallery Support Forums

Search…
 
Rodolfo Ugarte
Topic Author
Posts: 6
Joined: 18 Jul 2013, 15:36

display the Mobile interface only

18 Oct 2013, 14:28

Does anyone have an idea on what can i do to "hide" the Desktop version of imagevue? i mean.... what i want is that evetytime that somebody opens my gallery, i want the mobile version works even if the user open the website in a desktop computer.

Or.... if someone opens my URL on a mobile device.... the mobile version of imagevuex works, but if they open my URL on a desktop Computer another landing site opens.

Any idea on what can i do?

Thanks a lot!
 
oneANT
Experienced
Posts: 36
Joined: 01 Aug 2011, 22:55

Re: display the Mobile interface only

18 Oct 2013, 20:00

Do you mean....

http://name.com/?mobile=1
then http://name.com/?mobile=0 to return to desktop.

Hope I understood.
 
Rodolfo Ugarte
Topic Author
Posts: 6
Joined: 18 Jul 2013, 15:36

Re: display the Mobile interface only

18 Oct 2013, 23:30

What i want is the mobile version to be displayed in all devices, smartphones tablets and computers as well, but the mobile version not the desktop one.

I don´t want the desktop version to be displayed even in PCs
 
User avatar
Nick
Imagevue Hitman
Posts: 2872
Joined: 02 May 2006, 09:13

Re: display the Mobile interface only

20 Oct 2013, 08:50

You can change the following code in iv-includes/common.inc.php (lines 40-47):
Code
// Is mobile phone?
if (isset($_GET['mobile'])) {
	if ($mobile=$_GET['mobile']) {
		setcookie('IS_MOBILE', true); define('IS_MOBILE', true);
	} else {
		setcookie('IS_MOBILE', null, -1); define('IS_MOBILE', false);
	}
}
To:
Code
define('IS_MOBILE', true);
firedev.com
 
Rodolfo Ugarte
Topic Author
Posts: 6
Joined: 18 Jul 2013, 15:36

Re: display the Mobile interface only

20 Oct 2013, 15:54

It worked!!!

Thanks a lot Nick

Im wondering... what if i want it to open another "landing site" i made when a desktop computer opens the gallery?

I mean:

on mobile Phone ----> mygallery.com (mobile version)
on desktop Computer----->mygallery.com/landing (a landing site i made in HTML)

Can u help me with that code?

Thanks a lot for your patience and help (my english is awfull)
 
User avatar
Nick
Imagevue Hitman
Posts: 2872
Joined: 02 May 2006, 09:13

Re: display the Mobile interface only

23 Oct 2013, 02:41

In that case you might want to use the snippet from README/mobile-detect.html:
Code
<script>
   var url = "/mobile/"; // Link to the mobile page
   if (navigator.userAgent.match(/iPhone|iPad|iPod|android|bada|blackberry|phone|mobile/i)) window.location = url;
</script>
or the reversed version:
Code
<script>
   var url = "/desktop/"; // Link to the desktop page
   if (!navigator.userAgent.match(/iPhone|iPad|iPod|android|bada|blackberry|phone|mobile/i)) window.location = url;
</script>
firedev.com