We were very recently called upon to undertake work for a Nokia N-gage campaign. Nokia wanted to have a site built that managed a 7 day N-gage game trial promotion. A range of carriers would be involved from a variety of countries. Each wanted to manage the content themselves and have the site re-skinned according to their branding. The process of sign-up for the games also had to be simple as well as cross platform. This meant applicants for the offer would access the site via desktop, or mobile browser.
One of the really interesting solutions we used was the relatively new open-source mobile detection project WURFL (Wireless Universal Resource File). It is basically a library of mobile device capabilities, features and general information for which you can call upon via an API. This handy library made targeting and dealing with mobile visitors a synch.
All we had to do now is decide upon a content splitting method. That is to say - do we send visitors on the mobile to a completely separate web site (.mobi), or do we divide the content from the single source (on a .com). There was A LOT of myth, here say, and just plain wrong advice out there as to the best method to utilise. The clincher for us was the key factor that each of the carriers this would rollout to would be managing the content contained within the sites themselves. It meant that two separate sites (a .mobi and a .com) would be double the work to maintain. User data capture and consolidation would also become more a complex operation than it needed to be. In the end it just made sense to keep the site as a single entity if at all possible. Have one address, one database, and just split it 3 ways. A version rendered for the desktop, one for the high-end mobiles and another for the lower end.
A single PHP based Drupal CMS (Content Management System) was used and it's page template files divided via standard 'if else' statements. These statements would be used to ask questions such as:
- What's the Nokia handset model?
- What's the screen resolution?
- Is AJAX supported?
- What's the version of Flash Lite?
- Can the handset read XHTML?
A custom function was written as artificial intelligence to facilitate the page template's 'if else' decisions.
function mob_detect_and_split()
Within the function was code calling the WURFL library.
if($requestingDevice->getCapability("mobile_browser")!="" && $requestingDevice->getCapability("brand_name")=="Nokia") {
return 'This is a mobile browser';
}
if(mob_detect_and_split()=="This is a desktop browser.") {
// Render the desktop version of the template.
} elseif(mob_detect_and_split()=="This is a high-end mobile browser.") {
// Render the high-end version of the template.
} elseif(mob_detect_and_split()=="This is a low-end mobile browser.") {
// Render the low-end mobile version of the template.
}Depending on the user's device accessing the site, only a specific section would be rendered out and displayed. The WURFL API allowed us to get incredibly specific about the capabilities of a handset and when coupled with a Drupal CMS we were really able to harness some awesome power.


Comments
Apache Mobile Filter
Or try from for all browsers: http://apachemobilefilter.nogoogle.it/php_test.php
Opening WURFL up
Post new comment