ZenphotoCMS 1.6.5

mobileTheme.php

Mobile devices are detected with {@link https://mobiledetect.net/ php-mobile-detect}.

A particular theme may be designated for phones and for tablets. If the connecting device is one of those, the theme will automatically switch to the designated mobile theme.

Test mode allows you to run your standard desktop client but simulate being either a phone or a tablet.

You may place a call on mobileTheme::controlLink(); in your theme(s) to allow the client viewer to override the switch and view your standard gallery theme. If the same call is placed in your gallery theme he will be able to switch back as well. NOTE: This link is present only when the browsing client is a mobile device!

Class mobile methods you can use in your theme:

  • phone is connected.
    • isiPhone()
    • isBlackBerry()
    • isHTC()
    • isNexus()
    • isDellStreak()
    • isMotorola()
    • isSamsung()
    • isSony()
    • isAsus()
    • isPalm()
  • <li>tablet is connected
    <ul>
    	<li>isBlackBerryTablet()</li>
    	<li>isiPad()</li>
    	<li>isKindle()</li>
    	<li>isSamsungTablet()</li>
    	<li>isMotorolaTablet()</li>
    	<li>isAsusTablet()</li>
    </ul>
    
    <li>OS on the device
    <ul>
    	<li>isAndroidOS()</li>
    	<li>isBlackBerryOS()</li>
    	<li>isPalmOS()</li>
    	<li>isSymbianOS()</li>
    	<li>isWindowsMobileOS()</li>
    	<li>isiOS()</li>
    </ul>
    
    <li> user agent (browser) on the device
    <ul>
    	<li>isChrome()</li>
    	<li>isDolfin()</li>
    	<li>isOpera()</li>
    	<li>isSkyfire()</li>
    	<li>isIE()</li>
    	<li>isFirefox()</li>
    	<li>isBolt()</li>
    	<li>isTeaShark()</li>
    	<li>isBlazer()</li>
    	<li>isSafari()
    	<li>isMidori()</li>
    </ul>
    
Tags
author

Stephen Billard (sbillard)

Table of Contents

Classes

mobileTheme
mobile
Child class of MobileDetect. isMobile() and isTablet()

        
On this page

Search results