i have installed and created the mobit.info file as needed. All works well if i want to view the site using a mobile device but it seems that the code is not detecting my APPLE browsers such as Safari or Firefox. My default mobile theme is now all over the place even when i log on using a desktop. Is this the way the module is supposed to work? im a little confused.

Thanks,
jj-

Comments

cbutera’s picture

Priority: Normal » Critical

I'm having a similar problem - I've realized that the module works fine for some Macs (for example my Intel Macbook) - the regular theme applies. But when I logon using one of our PPC eMacs - using Safari or Firefox - it loads the mobile theme.

This is pretty critical for us - that it is unusable in this current condition right now.

danroth’s picture

Title: mobi works in one direction only » mobit thinks Mac browsers are mobile devises

As others have reported, visitors using some Macs (Firefox or Safari) are getting the mobile theme.

danroth’s picture

Title: mobit thinks Mac browsers are mobile devises » mobit thinks Mac browsers are mobile devices
dpierre’s picture

I had the same problem.
And it seems that I found a solution.

You need to modify the "mobit_check_is_mobile()" function in the "mobit.module" (see the "mobit" directory in your "modules" directory).
You have to remove the test that checks "PPC". Using a PowerPC Apple Mac makes that this function returns "True" and your Mac is considered as a mobile device.

---------------------------------------------
Initial function:

function mobit_check_is_mobile() {
$uAgt='';
$acpt='';
if (isset($_SERVER['HTTP_USER_AGENT'])) {
$uAgt = $_SERVER['HTTP_USER_AGENT'];
}
if (isset($_SERVER['HTTP_ACCEPT'])) {
$acpt = $_SERVER['HTTP_ACCEPT'];
}
// Check if it is a moblizable client (make sure any updates here go to mobilize.php as well)
if (strpos($acpt,'wml') || strpos($uAgt,'PDXGW') || strpos($uAgt,'portalmmm') ||
strpos($uAgt,'DoCoMo') || strpos($uAgt,'Windows CE') || strpos($uAgt,'PPC') ||
strpos($uAgt,'Palm') || strpos($uAgt,'BlackBerry') || strpos($uAgt,'Symbian') ||
strpos($uAgt,'dopod')) {
return true;
}
else
return false;
}

---------------------------------------------
Modified function:

function mobit_check_is_mobile() {
$uAgt='';
$acpt='';
if (isset($_SERVER['HTTP_USER_AGENT'])) {
$uAgt = $_SERVER['HTTP_USER_AGENT'];
}
if (isset($_SERVER['HTTP_ACCEPT'])) {
$acpt = $_SERVER['HTTP_ACCEPT'];
}
// Check if it is a moblizable client (make sure any updates here go to mobilize.php as well)
if (strpos($acpt,'wml') || strpos($uAgt,'PDXGW') || strpos($uAgt,'portalmmm') ||
strpos($uAgt,'DoCoMo') || strpos($uAgt,'Windows CE') ||
strpos($uAgt,'Palm') || strpos($uAgt,'BlackBerry') || strpos($uAgt,'Symbian') ||
strpos($uAgt,'dopod')) {
return true;
}
else
return false;
}

---------------------------------------------
It works fine after this modification!

Try it on my web site with your PowerPC Mac and then with your mobile:
http://www.tribupierre.net

Dominique PIERRE
France

dpierre’s picture

Assigned: Unassigned » dpierre
Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.