ThemeKey doesn't detect Windows Phone 7 (i.e. NOT Windows Mobile). I know it doesn't have much market share but as it's the phone I'm using/testing on it was important to me.

Based on the Windows Phone user agent string adding:

}
	  elseif (strpos($useragent, 'windows phone') !== FALSE) {
      return 'WP7';

at around line 224 in themekey/modules/themekey_browser_detection.php and then adding

system:user_os_simplified=WP7

To the rule set allows detection and redirect. Have done limited testing and it works fine and doesn't interfere with users on Windows or other versions of IE.

To be sure of detection I also added

system:user_os=WP7

I don't know how to make the above appear in the Properties descriptions but I could probably try and work it out.

Hope this is OK to flag up and offer a hackaround. It's my first Drupal submission and I hope I've done it right. Keep up the amazing work. Thanks.

CommentFileSizeAuthor
#3 1413144.patch4.79 KBmkalkbrenner
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mkalkbrenner’s picture

Version: 7.x-2.0-beta1 » 7.x-2.x-dev

Can you please post a full user agent string when you access your site using your windows phone?
You can use ThemeKey Debug for that.

A workaround for the moment without any code change is to use sytem:user_agent with an regular expression in the rule chain:

system:user_agent ~ /windows phone/i >>> mobile_theme
Mod74’s picture

Hi, the full user agent string reported by http://whatsmyuseragent.com and ThemeKey debug is

Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0; SAMSUNG; OMNIA7)

Thanks.

mkalkbrenner’s picture

Component: Installation / Configuration » Code / API
Assigned: Unassigned » mkalkbrenner
Status: Active » Fixed
FileSize
4.79 KB

Status: Fixed » Closed (fixed)

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