Mobile Device & Browser Detection (Adapted by BOP5)

  • Thread starter Thread starter AdminAdmin is verified member.
  • Start date Start date
Admin

AdminAdmin is verified member.

Well-Known Member
Staff member
Administrator
This mod has no settings or options.

Installed alone and you will see nothing new.

The purpose of this mod is to bring a reliable way of detecting mobile browsers and devices to vBulletin for use in other mods.

Currently the only mod I know it is recommended for is my Sidebar Anywhere mod.

The bulk of the work of this mod is done by a publicly available PHP Mobile Detection class from:
http://code.google.com/p/php-mobile-detect/

The file name was changed to prevent conflicts but the file contents including license information remains unchanged.

Once installed the mod will allow you to use $vbulletin->detect to detect various mobile options anywhere $vbulletin variable is available in the code.

Its plugin load priority is set to 1 so it executes before all other plugins.

Code:
$vbulletin->options['bop5_mob_detect'] = true; //True if mod enabled/installed

$vbulletin->detect->isMobile()    - true if any mobile device
$vbulletin->detect->isTablet()    - true if tablet
$vbulletin->detect->isiOS()       - true if any iOS device
$vbulletin->detect->isAndroidOS() - true if any Android

Please Mark as Installed if you use this. :)
Download tuoitreit.vn_Mobile Browser Detect v1.zip (13.9 kb)
 

Facebook Comments

Similar threads

Admin
Replies
0
Views
760
AdminAdmin is verified member.
Admin
C
Replies
0
Views
11K
creativimama
C
C
Replies
0
Views
6K
creativimama
C
Back
Top