|Project:||Drupal.org Project applications|
|Status:||closed (won't fix)|
|Issue tags:||PAReview: GPL Issue|
This module provides an interface to create multiple 'switcher rules' to allow your Drupal site to change themes or redirect to another webpage depending on what kind of device it using the site. We have submitted a module before but withdrew it after deciding the interface wasn't up to scratch. Device detection is provided by the 51Degrees.mobi PHP detector. There are many device properties available to check a device against, starting simply with if the device is mobile, moving onto more advanced data such as the browser being used or the screen size.
The detector itself (look in the 51Degrees folder for the code) is far more complicated than simply looking for common strings in the useragent, so there is a large amount of code that has optimised for speed rather than readability. That said, we think it still follows most of Drupals code standards and uses the fiftyone_degrees_ prefix for its functions. It has been available for sometime on Sourceforge and has already been deployed to a number of servers - http://sourceforge.net/projects/fiftyone/?source=directory .
The module installs a new menu where new rules can be created (represented by a tab) in which conditions are selected and an action chosen.
A word about the code structure chosen: we eventually want to port this module to other CMSs. To help with this we have a logic and constants file which (we hope) are platform independent and a platform functions and constants file which contain calls to Drupal. I've tried to keep those files a Druponic as possible but the whole project follows Drupal guidelines and has the fiftyone_degrees prefix.
This modules is intended for Drupal 7.x
Sandbox page : http://drupal.org/sandbox/51Degrees/1841688
I had orginally posted the wrong sandbox page, the above page goes to the right one.