Closed (fixed)
Project:
Mobile theme selection
Version:
5.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
30 Oct 2007 at 01:06 UTC
Updated:
22 Jan 2008 at 21:11 UTC
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
Comment #1
cbutera commentedI'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.
Comment #2
danroth commentedAs others have reported, visitors using some Macs (Firefox or Safari) are getting the mobile theme.
Comment #3
danroth commentedComment #4
dpierreI 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
Comment #5
dpierreComment #6
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.