vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=296872

Mobile Device Detection
by semprot
05 Apr 2013 04:59

Hi.

For some reason i have to make my own mobile device detection plugin. (the reason is i use vb optimise for guest caching).

I use this PHP library

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

(the library is also used by BirdOPrey5 here)

Here is my plugin code

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

I put it on "global_bootstrap_complete", because i want it to be run before vboptimise run (vb optimise run on "global_bootstrap_complete" as well, but with "5" priority", i give my code "1" priority.

The problem is, if it is my first time visiting the forum with mobile user agent, it always gives me desktop style. Is the if below correct?

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


wacnstac 23 Apr 2013 15:22

I'm actually interested in using this hack. Did you ever get it to work?


All times are GMT. The time now is 07:23.

Powered by vBulletin® Version 3.8.14
Copyright © 2020, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.