This topic is locked

mobie TO Desktop

10/4/2012 7:04:30 AM
PHPRunner General questions
K
kjp author

Is there a possibility to

"switch" (icon?) from a mobile to the Desktop template
some mobile have a large display (# Galaxy Note or tablets )
TBa

Kjp

Sergey Kornilov admin 10/4/2012

Check MobileDetected() function in source\inclue\commonfunctions.php file. This is where you can tell PHPRunner which devices are mobile and which are not.

K
kjp author 10/5/2012



Check MobileDetected() function in source\inclue\commonfunctions.php file. This is where you can tell PHPRunner which devices are mobile and which are not.


Thanks for your answer.
Yes I take a look at this function, but it's not an easy work to check

what smartphone is a "tablet", a "phablet" , ar a "normal" smartphone.

And a newone is going everyday...

Type of browser?
So I'm looking for a "button" to switch ON or OFF this function

perhaps in the login menu...
I also look at the isMobile()...
on the android system, with "dolphin browser", there is an addon"desktop toggles"

which is done for that, and "works normally" .
I try it, and unable to toggle with phpr/asp builded programs

(not only mine, but your demos on http://xlinesoft.com.../livedemo4.htm)")
Kjp

Sergey Kornilov admin 10/5/2012

Here is an idea of how you can make it work.
Once mobile device is detected we set session variable $_SESSION['isMobile'] to true (false for desktop version).
You can display a link or a button that points to sometable_list.php?version=mobile or to sometable_list.php?version=desktop
Then in AfterAppInit event you can use the following code:

if ($_GET["version"])

{

if ($_GET["version"]=="mobile")

$_SESSION['isMobile']=true;

else

$_SESSION['isMobile']=false;

}
K
kjp author 10/5/2012



Here is an idea of how you can make it work.
Once mobile device is detected we set session variable $_SESSION['isMobile'] to true (false for desktop version).
You can display a link or a button that points to sometable_list.php?version=mobile or to sometable_list.php?version=desktop
Then in AfterAppInit event you can use the following code:

if ($_GET["version"])

{

if ($_GET["version"]=="mobile")

$_SESSION['isMobile']=true;

else

$_SESSION['isMobile']=false;

}


K
kjp author 10/5/2012





Thanks Sergey

I'll check that!!
Kjp