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.
Comment | File | Size | Author |
---|---|---|---|
#3 | 1413144.patch | 4.79 KB | mkalkbrenner |
Comments
Comment #1
mkalkbrennerCan 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:
Comment #2
Mod74 CreditAttribution: Mod74 commentedHi, 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.
Comment #3
mkalkbrenner