Detect Mobile

Developer

Gareth Davies

3rd Party (Free)

17 downloads (last 90 days)

MIT License

EE Version Support

  • ExpressionEngine 2
  • ExpressionEngine 5

Compatibility

If an item is crossed out, it might be untested, not applicable or incompatible. Contact the developer to be sure.

  • Updater
  • Multi Site Manager
  • Stand Alone Entry Form
  • Low Variables
  • Content Elements
  • Better Workflow
  • Matrix
  • Grid
  • Webservice
  • Publisher

Requirements

  • jQuery for the Control Panel

Add-On Type(s)

Plugin

Tags

Simple PHP plugin for EE2/EE5 that detects a mobile browser using the PHP Detect Mobile class (http://mobiledetect.net/). Download from Github. For support please use Github issues.

Basic Usage

Check if any mobile device
{exp:detect_mobile:ismobile}

Conditional check for a mobile device

{if '{exp:detect_mobile:ismobile}'} I am a mobile device {if:else} I am not a mobile device {/if}

Check if not a mobile device
{exp:detect_mobile:isnotmobile}
     
Check if tablet
{exp:detect_mobile:istablet}
     
Check if phone
{exp:detect_mobile:isphone}

Redirect any mobile device including tablets
{exp:detect_mobile:redirect location=“mobile.mysite.com”}

Redirect all non-tablet mobile devices
{exp:detect_mobile:redirect location=“mobile.mysite.com” tablet=“no”}

Redirect just tablets and not mobiles
{exp:detect_mobile location=“tablet.mysite.com” mobile=“no”}

Seperate locations for tablets and mobiles
{exp:detect_mobile tablet_location=“tablet.mysite.com” location=“mobile.mysite.com”}

Check for device type
{exp:detect_mobile:type}

Example usage

{if '{exp:detect_mobile:type}' == "tablet"} I am a tablet {if:elseif '{exp:detect_mobile:type}' == "phone"} I am a mobile phone {if:else} I am not a mobile device {/if}

Detect Mobile Links

This entry was created January 7, 2013, 10:08 am.
This entry was last updated January 16, 2019, 2:31 pm.

Disclaimer: Information about ExpressionEngine add-ons is provided as a service to you, the user, and every member of the ExpressionEngine community. devot:ee is not responsible if you hose, mangle, wreck, or otherwise destroy your EE website by installing an add-on that you found out about at this site, regardless of its rating, Favorites status, commercial or free status, or general popularity. Caveat EEmptor!

Returns: devot:ee has a 30-day return policy on all commercial add-ons sold through devot-ee.com. If you need to return an add-on, do not go to the developer or the developer's site, but rather visit our returns page at https://devot-ee.com/returns to initiate your return. If you have questions, email support@devot-ee.com.

3 Reviews:

Derek Balmer 10.03.14

Derek Balmer
Rating - {addon_rating_average}

Excellent device detection for phones and tablets. Works like a charm without any fuss.

Big Bad Wolf 07.29.14

Big Bad Wolf
Rating - {addon_rating_average}

The best mobile detection plugin for EE. Accurate device recognition for Smartphones and Tablets !

kubik101 09.12.13

kubik101
Rating - {addon_rating_average}

Perfectly simple, no settings, just detects. Exactly what I was after. Also works on MSM with EE2.5.5. Thanks Gareth..!!