Browser Detection (Mobile/MSIE)

Browser Detection (Mobile/MSIE) 1.3.3

No permission to download

cclaerhout

Well-known member
cclaerhout submitted a new resource:

Browser Detection (Mobile/MSIE) (version 1.0) - This Addon will allow you to check if a the broswer is Internet Explorer or is on a mobile device.

Browser Detection (Mobile/MSIE)
by Cédric CLAERHOUT

Addon Presentation

This Addon will allow you to check if a the browser is Internet Explorer or is on a mobile device.

XenForo has its own function to check if the browser is on a mobile device or not but its coding is not finished yet. This addon will add some detection features thanks to the following script:
Php-mobile-detect: http://code.google.com/p/php-mobile-detect

This...

Read more about this resource...
 
Interesting concept.

I don't use Internet Explorer or even Windows for the matter.... But this will help me weed out those pesky Internet Explorer users who like to claim they're using Firefox or Chrome, in hopes to get me to pay attention to something that I do not support... ie... Internet Explorer users.
 
cclaerhout updated Browser Detection (Mobile/MSIE) with a new update entry:

Version 1.1 released

Version 1.1 released
  • Update to mobile detect 2.5.3 version
    => new devices detected but not yet the Microsoft Surface - it seems the useragent on this tablet is the same as on Windows : see here
  • Compatible with Chris Autoinstaller addon

New detection methods available:
in PHP
PHP:
                    $visitor->getBrowser['mobile']['tablets']['isToshibaTablet']...

Read the rest of this update entry...
 
Do we need to import xml file when update this version?
Nope, but I would recommend you to use Chris autoinstaller addon. It will avoid you to check if you need or not to import xml and/or upload files and it will increase the speed of your upload if the archive has many files in it :)
 
Nope, but I would recommend you to use Chris autoinstaller addon. It will avoid you to check if you need or not to import xml and/or upload files and it will increase the speed of your upload if the archive has many files in it :)

Upgraded and wait for release of next Mobile Agent Tracker addon.
 
What is hard to understand?
If you're developing an addon with php, you use the php variables I've provided.
If you want to customize your templates, you use the templates variables I've provided.

This addon is a tool. Nothing less, nothing more.
 
Copy this example in you desire template, that's all
HTML:
  <xen:if is="{$visitor.getBrowser.isIE}">
        {xen:if "{$visitor.getBrowser.IEis} == 9", "You're using Internet Explorer 9", "You're using Internet Explorer {$visitor.getBrowser.IEis}"}
    <xen:elseif is="{$visitor.getBrowser.isMobile}" />
        You're using a mobile device.{xen:if "{$visitor.getBrowser.isTablet}", "This Mobile device is a tablet"}
    <xen:else />
        Hello world !
    </xen:if>

If you don't know what a template is and what a conditional is, this addon is not for you.
 
:coffee: The one where you want to use conditionals to display a different content per browser (ie/mobile) :coffee:

This addon doesn't make coffee. It gives you tools to make some.
Dude. All he is saying is that if YOU know 'which template' that is, you should tell us in the examples "where" to place this code. Even I don't know where we should be adding this code, so since YOU KNOW would you mind Please telling us 'which template' and 'what location inside of that template (ex: Top, bottom, replace existing code with and etc.) we are to place this code at. Everyone who makes an add-on tells us these things so we should've have to be playing guess where to put YOUR code just to get your addon to work properly. Said with all due respect, of course, we just don't want to install the addon and it not work the way it is intented. ;-)
 
Dude. All he is saying is that if YOU know 'which template' that is, you should tell us in the examples "where" to place this code. Even I don't know where we should be adding this code, so since YOU KNOW would you mind Please telling us 'which template' and 'what location inside of that template (ex: Top, bottom, replace existing code with and etc.) we are to place this code at. Everyone who makes an add-on tells us these things so we should've have to be playing guess where to put YOUR code just to get your addon to work properly. Said with all due respect, of course, we just don't want to install the addon and it not work the way it is intented. ;-)

I'm certainly not an Anglophone but I've read again my production description to see if I had made any horrible mistake that create that misunderstanding... and I really see nothing wrong here. This addon is working in all templates, is working anywhere the $visitor object is available, which means 99,9% of the XenForo system. In my production description, I've also provided a full list of possible conditionals for all templates & php and I provided an example to illustrate how to use it. There's nothing more I can do here.

I've used this addon to create some options in those addons:
http://xenforo.com/community/resources/go-to-top.1083/
http://xenforo.com/community/resources/tinymce-fix.1162
http://xenforo.com/community/resources/mobile-style-selector.1190
http://xenforo.com/community/resources/mobile-agent-tracer.1185


There is an extra example here if people wants one more (but hard to understand):
http://xenforo.com/community/threads/responsive-options-help.43540/#post-468540
 
cclaerhout updated Browser Detection (Mobile/MSIE) with a new update entry:

Version 1.2 released

Version 1.2 released

  • Tapaltalk is now considered as a mobile - Thank you to the developers of the Php Mobile-Detect Class !
  • New phone device detected: Fly
  • New tablets devices detected: PlaystationTablet, NabiTablet, NecTablet, HuaweiTablet, bqTablet, FlyTablet, LGTablet
New variables then:
in templates
Code:
                    $visitor.getBrowser.mobile.phones.isFly

                    $visitor.getBrowser.mobile.tablets.isPlaystationTablet...

Read the rest of this update entry...
 
Top Bottom