Resource icon

xF2 Add-on Browser Detection 2.1.0

No permission to download

DareDevil

Enxf Proud Member
Staff member
Administrator
Moderator
S.V.I.P Member
Collaborate
Registered
Joined
May 25, 2019
Messages
1,142
Points
273

Reputation:

DareDevil submitted a new resource:

Xon Browser Detection - A light-weight shim around Mobile_detect for XenForo 2

Usage (in templates)
The add-on injects the global variable $xf.mobileDetect, check that the variable is set before calling any methods to prevent errors during upgrades or if the add-on is disabled.

Code:
<xf:if is="$xf.mobileDetect && $xf.mobileDetect.isMobile()">
Is Mobile
<xf:else />
Not Mobile
Code:
</xf:if>
<xf:if is="$xf.mobileDetect && $xf.mobileDetect.is('Firefox')">
Is Firefox
<xf:else />
Not Firefox
Code:
</xf:if>
<xf:if is="$xf.mobileDetect...
Read more about this resource...
 

odin777

New member
Registered
Joined
Apr 23, 2019
Messages
1
Points
13

Reputation:

Some help please, how to force a style on mobile?

Code:
<xf:if is="$xf.mobileDetect && $xf.mobileDetect.isMobile()">
Is Mobile then force style
<xf:else />
 
Top