Update to mobile phone detection

scottgifford - July 25, 2008 - 16:34
Project:Mobile theme selection
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

This patch updates mobile phone detection to detect the iPhone and the iPod touch. It also removes checking for PPC, since this detects PowerPC Macs, and one of the other strings should match on a PocketPC.

diff -u --exclude '*~' --exclude '*#' --new-file -r ../orig-modules/mobit/mobit.module mobit/mobit.module
--- ../orig-modules/mobit/mobit.module  2007-03-13 01:47:35.000000000 +0000
+++ mobit/mobit.module  2008-07-17 06:01:34.000000000 +0000
@@ -25,9 +25,11 @@
   }
   // 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,'DoCoMo') || strpos($uAgt,'Windows CE') || strpos($uAgt,'IEMobile')  ||
       strpos($uAgt,'Palm')   || strpos($uAgt,'BlackBerry') || strpos($uAgt,'Symbian')   ||
-      strpos($uAgt,'dopod')) {
+      strpos($uAgt,'dopod')  || strpos($uAgt,'iPhone')     || strpos($uAgt,'iPod')      ||
+      strpos($uAgt,'Mobile')
+     ) {
     return true;
     }
   else

#1

Dave Reid - October 4, 2009 - 15:46
Status:active» fixed

Project is abandoned and marking its issues as fixed. Anyone using or interested in this might want to investigate using Mobile Tools.

#2

System Message - October 18, 2009 - 15:50
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.