The Arcive of vBulletin Modifications Site. |
|
Mobile Device & Browser Detection (Adapted by BOP5) Details »»
|
|||||||||||||||||||||||||||||
|
Mobile Device & Browser Detection (Adapted by BOP5)
Developer Last Online: Aug 2023
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. ![]() Donations always appreciated. :up: Nominate MOTM if you LOVE it! ![]() Download Now
Show Your Support
|
|||||||||||||||||||||||||||||
| Благодарность от: | ||
| RichieBoy67 | ||
| Comments |
|
#2
|
||||
|
||||
|
List of Compatible Mods:
(Will edit if more get added by any coder) Sidebar Anywhere - https://vborg.vbsupport.ru/showthread.php?t=283307 |
|
#3
|
||||
|
||||
|
Thank you so much for this mod! Needed this today and just came on VBorg and found this was just recently released.
Worked perfectly! ![]() Edit: What do you recommend as to the best way to use these options in a template? |
| Благодарность от: | ||
| BirdOPrey5 | ||
|
#4
|
||||
|
||||
|
The easiest way to implement this in a template would be to edit the plugin for this mod...
At the bottom add lines such as: PHP Code:
Code:
<vb:if condition="$vboptions['isMobile']">xxxx</vb:if> |
| Благодарность от: | ||
| RedTurtle | ||
|
#5
|
|||
|
|||
|
Nice mod. Thanks
|
|
#6
|
|||
|
|||
|
Anybody knows if this plugin works for the mobile quotes? They don't appear in notifications.
|
|
#7
|
||||
|
||||
|
I'm not sure what "mobile quotes" are so I doubt it. The only mod it works with I know of is my Sidebar Anywhere.
|
|
#8
|
|||
|
|||
|
It doesn't work for 3.8.5. What a pity.
|
|
#9
|
|||
|
|||
|
How to implement it in "footer" template ?
Where do i need paste it: Code:
if ($vbulletin->detect->isMobile()) $vbulletin->options['isMobile'] = 1; |
|
#10
|
||||
|
||||
|
Templates use template conditionals...
You can try: Code:
<vb:if condition="$vbulletin->detect->isMobile()"> Use this HTML code if mobile </vb:if> Code:
<vb:if condition="$vbulletin->detect->isMobile()"> Use this HTML code if mobile <vb:else /> Use this code if NOT mobile </vb:if> |
![]() |
|
|