Kategorien
Allgemein

Browser Detection

newimage submitted a new resource:

Browser Detection 2.0.2 – Browser

A light-weight shim around Mobile_detect for XenForo 2

Usage (in templates)

The add-on injects the global variable $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=»$mobileDetect && $mobileDetect.isMobile()»>
Is Mobile
<xf:else />
Not Mobile…

Read more

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert