add basic mobile user detection

This commit is contained in:
Aleksei Miheev
2012-02-12 17:23:52 +04:00
parent 2053945979
commit cc96692eb8
2 changed files with 96 additions and 0 deletions

View File

@@ -82,6 +82,10 @@ reloadSettings();
cleanRequest();
$context = array();
include("Mobile_Detect.php");
$detect = new Mobile_Detect();
define('MOBILE', $detect->isMobile());
// Determine if this is should be using WAP, WAP2, or imode.
define('WIRELESS', isset($_REQUEST['wap']) || isset($_REQUEST['wap2']) || isset($_REQUEST['imode']));