Giter VIP home page Giter VIP logo

mobiledevicedetection's Introduction

Mobile Device Detection

Detects mobile clients, what device they are using and redirect mobile clients.

Installation

  1. Upload the 'mobiledevicedetection' folder in this to your Symphony 'extensions' folder.

  2. Enable it by selecting the "Mobile Device Detection" and choosing 'Enable' from the with-selected menu, then click Apply.

  3. There should now be a "Mobile Device Detection" datasource available.

Usage

This extension provides a "Mobile Device Detection" datasource for detecting mobile devices based on user-agent string. Its output takes the following form:

<device is-mobile="no" />

If a mobile device is detected the mobile attribute will be set to "yes" and an element will be added the device being used to view the page:

<device is-mobile="yes">
	<android version="2.3" />
</device>

It is theoretically possible for more than one device to appear in this list.

Redirects

You can redirect mobile devices of your choice to a custom mobile site, this can disabled by a visitor by adding ?not-mobile to the current page URL. This sets a cookie and prevents any further attempts to redirect the client.

All configuration is managed from System > Preferences:

No Redirect Cookie
+-----------------------------------+
| no-mobile-redirect                |
+-----------------------------------+

Redirect URL
+-----------------------------------+
| ...                               |
+-----------------------------------+

Redirect Devices
+-----------------------------------+
| ...                               |
+-----------------------------------+
android blackberry ipad iphone palm

If the URL is set, but no devices are selected, then any mobile visitor will be redirected.

Delegates

This extension exposes the MobileRedirection delegate, which allows other extensions to override when and where a mobile device is redirected.

(
	'MobileRedirection',
	'/frontend/',
	array(
		'url'		=> &$url,
		'devices'	=> &$devices,
		'result'	=> $result
	)
)

mobiledevicedetection's People

Contributors

makenosound avatar nitriques avatar brendo avatar davidoliver avatar

Watchers

James Cloos avatar

Forkers

emmacharp

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.