Extension:MobileDetect

What can this extension do?
This extension detects mobile devices using PHP's HTTP_USER_AGENT. Due to the nature of the extension, it should be very compatible with both new and old versions of MediaWiki.

If a mobile device is detected the extension's function returns true. Otherwise, it returns false.

Usage
For example, if the Webmaster would like to set a default theme depending on a visitor's browser he/she would add this to the end of LocalSettings.php:

This would cause, if the visitor's browser shows a user agent from a mobile browser, the default theme to be "chick" instead of "vector" ($wgDefaultSkin = "chick"). If the case were to be the visitor's browser shows a user agent from a desktop/full browser, the default theme would be "vector" instead of "chick" ($wgDefaultSkin = "vector").

If the Webmaster would like a certain extension to be excluded from loading on mobile browsers, he/she would add this to the end of LocalSettings.php:

This would only load the extension "reCAPTCHA" on Desktop/Full browsers.

Download instructions
Please copy and paste the code found below and place it in. Note: $IP stands for the root directory of your MediaWiki installation, the same directory that holds LocalSettings.php.

Installation
To install this extension, add the following to LocalSettings.php:

User rights
This extension does not modify any user rights.