xF2 Browser Detection

  • Downloading from our site will require you to have a paid membership. Upgrade to a Premium Membership today!

    Dont forget read our Rules! Also anyone caught Sharing this content will be banned. By using this site you are agreeing to our rules so read them. Saying I did not know is simply not an excuse! You have been warned.

Radio

    ven0m

    Administrator
    Staff member
    Administrator
    Moderator
    Platinum
    xenForo 2.x.x
    xenForo 1.x.x
    Contributor
    vBulletin All Access Pass
    The Chest
    Verified
    Ultra Platinum VIP
    Platinum VIP
    Gold VIP
    Silver VIP
    Premium
    Member
    Jul 17, 2005
    20,497
    7,735
    321
    localhost
    Heisenberg submitted a new resource:

    - A light-weight shim around[Mobile_detect for XenForo

    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.

    HTML:
    <xf:if is="$mobileDetect && $mobileDetect.isMobile()">
        Is Mobile
    <xf:else />
        Not Mobile
    </xf:if>

    HTML:
    <xf:if is="$mobileDetect && $mobileDetect.is('Firefox')">
        Is Firefox
    <xf:else />
        Not Firefox...

     

    ven0m

    Administrator
    Staff member
    Administrator
    Moderator
    Platinum
    xenForo 2.x.x
    xenForo 1.x.x
    Contributor
    vBulletin All Access Pass
    The Chest
    Verified
    Ultra Platinum VIP
    Platinum VIP
    Gold VIP
    Silver VIP
    Premium
    Member
    Jul 17, 2005
    20,497
    7,735
    321
    localhost
    Resource updated with a new update entry:



    • Update Mobile Detect library

     
    Thread starter Similar threads Forum Replies Date
    ven0m xF2 Mobile / Browser Detection in Template Add-ons [2.x] 0
    Similar threads