urosg/yii2-outdated-browser-rework

Yii2 Outdated Browser Rework Widget

Installs: 36 187

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 1

Forks: 0

Open Issues: 0

Type:yii2-extension

1.0.0 2018-08-05 17:26 UTC

This package is auto-updated.

Last update: 2024-11-14 22:36:18 UTC


README

YII2 Widget implementing outdated-browser-rework package for browser better detection

About

This widget was inspired by the mdscomp/yii2-outdated-browser-widget which uses the Outdated Browser script by Bürocratik.

This widget on the other hand uses the Outdated Browser Rework script made by the Mike MacCana.

Installation

The preferred way to install this extension is through composer. Check the composer.json for this extension's requirements and dependencies. Read this web tip /wiki on setting the minimum-stability settings for your application's composer.json.

To install, either run

$ php composer.phar require urosg/yii2-outdated-browser-rework "~1.0"

or add

"urosg/yii2-outdated-browser-rework": "~1.0"

to the require section of your composer.json file.

Refer to the CHANGELOG for details of release changes.

Usage

use urosg\widget\OutdatedBrowserRework;

// To use default configuration
echo OutdatedBrowserRework::widget();

// To specify custom configuration - listed are default settings
echo OutdatedBrowserReword::widget([
    'requiredCssProperty' => '',
    'language' => 'en',
    'isUnknownBrowserOK' => false,
    'requireChromeOnAndroid' => false,
    'messages' => [
        'outOfDate' => 'Your browser is out of date!',
        'updateWeb' => 'Update your browser to view this website correctly.',
        'updateGooglePlay' => 'Please install Chrome from Google Play',
        'updateAppStore' => 'Please update iOS from the Settings',
        'webUpdateUrl' => 'http://outdatedbrowser.com',
        'callToAction' => 'Update my browser now',
        'close' => 'Close'
    ],
    'browserSupport' => [
        'Chrome' => 57,
        'Edge' => 39,
        'Safari' => 10,
        'MobileSafari' => 10,
        'Firefox' => 50,
        'Opera' => 50,
        'Vivaldi' => 1,
        'IE' => false
    ]
]);

License

yii2-outdated-browser-rework is released under the BSD-3 Clause license. See the bundled LICENSE file for details.