Mobile / Browser Detection in Template

Unmaintained Mobile / Browser Detection in Template 1

No permission to download
Compatible XF 2.x versions
  1. 2.1
Additional requirements
Xenforo guests page cache can be enabled but you need some modification on your config.php & core file (check FAQ)
License
Creative Commons
Visible branding
No
  • Tested with XF 2.1.5.
  • Not tested yet with XF 2.0, but i think it should work.
  • Check FAQ section above.
With this addon you can use template syntax in any template like this :

PHP:
<xf:if is="cutemb_is_mobile()">
    You are using mobile
<xf:else />
    You are not using mobile
</xf:if>

<xf:if is="cutemb_is_mobile()">
    You are using mobile
</xf:if>

<xf:if is="! cutemb_is_mobile()">
    You are not using mobile
</xf:if>

There are even additional functions other than cutemb_is_mobile(), which are :
  • cutemb_is_tablet
  • cutemb_is_android_os
  • cutemb_is_iphone
  • cutemb_is_ipad
  • cutemb_is_ios
  • cutemb_is_chrome
  • cutemb_is_opera
  • cutemb_is_ie
  • cutemb_is_firefox
  • cutemb_is_safari
  • cutemb_is_uc_browser
PHP:
<xf:if is="cutemb_is_firefox()">
    You are using firefox
<xf:else />
    You are not using firefox
</xf:if>

Installation is straightforward, just like installing other addon.
There is no setting page in admin section.

Although this addon is marked as unmaintained, but i will try to answer your questions :)

This addon uses mobile detection library from :
Code:
https://github.com/serbanghita/Mobile-Detect

Resource icon credit :
Code:
https://www.freepik.com/free-photos-vectors/mobile-phones
Author
HappyWorld
Downloads
49
Views
11,447
First release
Last update

Ratings

5.00 star(s) 1 ratings

More resources from HappyWorld

Latest updates

  1. FAQ Update - Guest Page Caching

    FAQ update about how to handle guest page caching, to cache both mobile & non-mobile versions.

Latest reviews

This plugin is really nice. I'd say it saved my life. You did a good job. Everyone should use this plugin.
H
HappyWorld
I'm glad this helps you :)
Back
Top Bottom