1.0.1deprecatedDevice Categorizr

Adds the visitor’s device type (mobile, tablet, tv or desktop) to the parameters list.

Clone URLhttps://github.com/DavidOliver/device_categorizr.git

Add as a submodulegit submodule add https://github.com/DavidOliver/device_categorizr.git extensions/device_categorizr --recursive

Compatibility

2.x.x2.1.x2.2.x2.3.x2.4.x2.5.x2.6.02.6.12.6.22.6.32.6.42.6.52.6.62.6.72.6.82.6.92.6.102.6.11
NoNo0.11.0.11.0.1NoNoNoNoNoNoNoNoNoNoNoNoNo. Soon?

Readme

Status

This extension is deprecated as Categorizr is no longer being developed/maintained.

Brett Jankord:

About a year ago I had this crazy idea to apply mobile first thinking to device detection. Yet I’ve awakened from the consensual hallucination that the web can be divided and grouped into simple categories like mobile, tablet, and desktop since then.

Introduction

Categorizr was a mobile-first device detection script that helped categorize different web-capable devices into four categories: mobile, tablet, tv and desktop.

Knowing into which category the visitor’s device falls helped in using Responsive Design + Server Side Components (RESS) and Hybrid Responsive Web Design (HRWD) techniques.

Usage

Once installed and enabled, Device Categorizr will ensure all frontend pages have a parameter called device-categorizr added to the parameter pool with one of the following values:

  • mobile
  • tablet
  • tv
  • desktop

You are then able to change your XSLT templates’ output based on your visitor’s device type.

Examples

CSS, JavaScript, image sizes and HTML source order are all examples of things you may wish to alter based on your visitor’s device type.

Image-sizing via JIT

<xsl:choose>
    <xsl:when test="$device-categorizr='desktop'">
        <img src="[email protected]}/{image/filename}"/>
    </xsl:when>
    <xsl:when test="$device-categorizr='tv' or $device-categorizr='tablet'">
        <img src="[email protected]}/{image/filename}"/>
    </xsl:when>
    <xsl:otherwise>
        <img src="[email protected]}/{image/filename}"/>
    </xsl:otherwise>
</xsl:choose>

Allowing visitors the option

If necessary, you can also provide links with a view URL query string parameter that enable visitors to manually choose their desired view. For example: http://example.net/?view=desktop This will save the desired view type in the PHP session for subsequent page loads. However, if your website serves the same content to and responds in a suitable way to each type of device, this will likely be superfluous and an unnecessary complication for your visitors.

Credit and thanks

Categorizr was created by Brett Jankord.

Version history

Symphony 2.3 to 2.4

No functional change. Updating readme and marking as deprecated.

Requires Symphony 2.3

No functional change. Marking as released, and compatible with and requiring Symphony 2.3.

Requires Symphony 2.2