Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Mobile Device & Browser Detection (Adapted by BOP5) Details »
Mobile Device & Browser Detection (Adapted by BOP5)
Mod Version: 1.00, by BirdOPrey5 (IB Staff) BirdOPrey5 is offline
Developer Last Online: Oct 2020 I like it Show Printable Version Email this Page

vB Version: 4.x.x Rating: (5 votes - 5.00 average) Installs: 61
Released: 06 Dec 2012 Last Update: Never Downloads: 341
Not Supported Uses Plugins Additional Files Re-usable Code  

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.


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

------------------------------------------------------

Please "Mark as Installed" if you use this.
Donations always appreciated.
Nominate MOTM if you LOVE it!

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Add-On Releases Mobile Device Style Assignment dartho vBulletin 3.6 Add-ons 406 20 Apr 2013 23:14
Mobile Device Style Assignment dartho vBulletin 3.5 Add-ons 3 04 Dec 2006 21:49

  #31  
Old 09 Apr 2015, 13:13
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Originally Posted by Big-K View Post
To earlier question, how do you use this to change styles?
Create a plugin on the style_fetch hook...

Code would be:


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


That is a bare bones plugin. It will change to the mobile style if a mobile device is detected. The problem is that no one could ever change back to the regular style on a mobile device. You probably want to add some code to deal with that.

For example if you are doing this to appease Google then maybe you only want to make this plugin active if it's a guest viewing the site, and not a registered member. In that case add a check to the conditional-



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

usergroupid 1 is the guest usergroup.

If you want to get fancier you can use a cookie or something.
__________________
-Joe
Former vb.org Moderator. Retired.

@BirdOPrey5 | All Things BOP5 | Joe's Ultimate Off Topic
Note - I no longer making new VB mods, sorry.
Reply With Quote
  #32  
Old 22 Jun 2015, 10:16
induslady induslady is offline
 
Join Date: Jul 2006
Hello BOP5,

I have installed this plugin and want to make use it such that for tablets I want to show the users desktop style.

The desktop style id is 16 and I used the below plugin
Product: vbulletin
Hook Location : style_fetch


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

But it is not working as intended i.e it is showing the mobile style in tablets too.

But I want to show the desktop style in tablets, How do I fix this. Thanks in advance.
Reply With Quote
  #33  
Old 23 Jun 2015, 05:35
induslady induslady is offline
 
Join Date: Jul 2006
Hello all,

Any help is appreciated. Am looking to nail the issue. Thanks.
Reply With Quote
  #34  
Old 16 Aug 2015, 04:29
m2006's Avatar
m2006 m2006 is offline
 
Join Date: Jan 2006
Not support Search Engine Friendly Archive on vbulletin 4.2.3

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

Reply With Quote
  #35  
Old 23 Jan 2016, 09:19
ruchemist ruchemist is offline
 
Join Date: Jul 2009
User cannot change style if it is detected as mobile device?
Reply With Quote
  #36  
Old 23 Jan 2016, 10:09
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Originally Posted by ruchemist View Post
User cannot change style if it is detected as mobile device?
This mod doesn't force anything, it is only for people writing their own custom code.
__________________
-Joe
Former vb.org Moderator. Retired.

@BirdOPrey5 | All Things BOP5 | Joe's Ultimate Off Topic
Note - I no longer making new VB mods, sorry.
Reply With Quote
  #37  
Old 27 Jan 2017, 10:24
boffin_adi boffin_adi is offline
 
Join Date: Dec 2010
Originally Posted by BirdOPrey5 View Post
Templates use template conditionals...

You can try:


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

or


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

This code this not working in templates
Reply With Quote
  #38  
Old 28 Jan 2017, 00:01
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
What template are you trying? This is very old anyway, not sure how useful it is anymore.
__________________
-Joe
Former vb.org Moderator. Retired.

@BirdOPrey5 | All Things BOP5 | Joe's Ultimate Off Topic
Note - I no longer making new VB mods, sorry.
Reply With Quote
  #39  
Old 06 Jun 2017, 13:37
flox80 flox80 is offline
 
Join Date: Mar 2017
Hi,

On 4.2.4. , I am trying to use this templates :

<vb:if condition="$vbulletin->detect->isMobile()">
{vb:raw test1}
<vb:else />
{vb:raw test2}
</vb:if>

but it doesn't work.

Any idea why?

Thanks.
Reply With Quote
  #40  
Old 08 Sep 2018, 21:10
iA1 iA1 is offline
 
Join Date: Jul 2018
Originally Posted by BirdOPrey5 View Post
What template are you trying? This is very old anyway, not sure how useful it is anymore.

I have managed to create a vB 3 version of this, with additional functionality for responsive styles. If you permit, I will release it as a new mod.
Reply With Quote
  #41  
Old 10 Sep 2018, 15:08
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Feel free. I hope there was an update available to the mobile detection library though it's 6 years out of date.

FYI the "Reusable Code" flag at the top of the page means you don't need to ask permission, you are free to reuse the code in any mods you release here on vbulletin.org.
__________________
-Joe
Former vb.org Moderator. Retired.

@BirdOPrey5 | All Things BOP5 | Joe's Ultimate Off Topic
Note - I no longer making new VB mods, sorry.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 04:51.

Layout Options | Width: Wide Color: