Componette

Componette

ipublikuj-archive

ipublikuj-archive / mobile-detect v3.0.0

Extension for detecting mobile devices, managing mobile view types, redirect to mobile version for Nette Framework (2.4+)

download-cloud-line composer require ipub/mobile-detect

MobileDetect

Build Status Scrutinizer Code Coverage Scrutinizer Code Quality Latest Stable Version Composer Downloads License

Extension for detecting mobile devices, managing mobile view types, redirect to mobile version for Nette Framework

Introduction

This extension use Mobile_Detect class and provides the following features:

  • Detect the various mobile devices by name, OS, browser User-Agent
  • Manages site views for the variuos mobile devices (mobile, phone, tablet, full)
  • Redirects to mobile and tablet sites

Installation

The best way to install ipub/mobile-detect is using Composer:

$ composer require ipub/mobile-detect

After that you have to register extension in config.neon.

extensions:
	mobileDetect: IPub\MobileDetect\DI\MobileDetectExtension

Package contains trait, which you will have to use in class, where you want to use mobile detector.

<?php

class BasePresenter extends Nette\Application\UI\Presenter
{
    use IPub\MobileDetect\TMobileDetect;
    
    // Rest of code...
}

Documentation

Learn how to get info about visitor device in documentation.


Homepage https://www.ipublikuj.eu and repository http://github.com/iPublikuj/mobile-detect.

  • v3.0.0 v3.0.0.

    • Upgraded to Nette 3 thanks to @elcheco
  • v2.2.2 v2.2.2

    • Yet another code cleaning
  • v2.2.1 v2.2.1

    • Just small code cleaning
  • v2.2.0 v2.2.0

    • Upgrading to nette 2.4
    • Upgrading to php 7.1
  • v2.1.1 v2.1.1

    • Minor fixes
  • v2.1.0 v2.1.0

    • Added support for detecting other devices thx to @peldax
  • v2.0.0 v2.0.0

    • Drop PHP5
    • Refactored to PHP7
    • Refactored to Nette 2.4
    • Added Phone view
    • Added abbility to define cookie parameters
  • v1.0.3 v1.0.3

    • Minor changes due to Nette 2.3 compatibility
  • v1.0.2 v1.0.2

    • Upgrade to nette 2.3
  • v1.0.1 v1.0.1

    Now is available to detect only mobile phones.

  • v1.0.0 v1.0.0

    New fixes, automated tests, etc.

Componette Componette felix@nette.org