]> git.mxchange.org Git - friendica.git/blob - vendor/mobiledetect/mobiledetectlib/README.md
Update Composer
[friendica.git] / vendor / mobiledetect / mobiledetectlib / README.md
1 ![Mobile Detect](http://demo.mobiledetect.net/logo-github.png)
2
3 > Motto: "Every business should have a mobile detection script to detect mobile readers."
4
5 [![Build Status](https://travis-ci.org/serbanghita/Mobile-Detect.svg?branch=devel)](https://travis-ci.org/serbanghita/Mobile-Detect) 
6 [![Latest Stable Version](https://poser.pugx.org/mobiledetect/mobiledetectlib/v/stable.svg)](https://packagist.org/packages/mobiledetect/mobiledetectlib) 
7 [![Total Downloads](https://poser.pugx.org/mobiledetect/mobiledetectlib/downloads.svg)](https://packagist.org/packages/mobiledetect/mobiledetectlib) 
8 [![Daily Downloads](https://poser.pugx.org/mobiledetect/mobiledetectlib/d/daily.png)](https://packagist.org/packages/mobiledetect/mobiledetectlib) 
9 [![License](https://poser.pugx.org/mobiledetect/mobiledetectlib/license.svg)](https://packagist.org/packages/mobiledetect/mobiledetectlib)
10 [![Chat on Slack](https://img.shields.io/badge/Slack%20%23general-join-orange.svg)](https://join.slack.com/t/mobiledetect/shared_invite/enQtMjg1NDY0OTg5NzgzLTcwMzEzMWJjZjRlOWFkY2ZiNzE1ZmRmNzEwM2VhOGY5OGVkYWMxNjdkZDU5YjQ5MmM5MGUxYjhlZDQwOGVjZjE)
11
12 #### About
13
14 Mobile Detect is a lightweight PHP class for detecting mobile devices (including tablets).
15 It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.
16
17 Your website's _content strategy_ is important! You need a complete toolkit to deliver an experience that is _optimized_, 
18 _fast_ and _relevant_ to your users. Mobile Detect class is a 
19 [server-side detection](http://www.w3.org/TR/mwabp/#bp-devcap-detection) tool that can help you with your RWD strategy, 
20 it is not a replacement for CSS3 media queries or other forms of client-side feature detection.
21
22 We're committed to make Mobile_Detect the best open-source mobile detection resource and this is why before 
23 each release we're running [unit tests](./tests), we also research and update the detection rules on **daily** 
24 and **weekly** basis.
25
26 See also [the history](./docs/HISTORY.md) of the project.
27
28 #### Announcements
29
30 For `2.x` branch we are only integrating new regexes and User-Agents for our tests.
31 On `2.x` releases we are focusing on **new tablets only**. All the pull requests about TVs, bots or optimizations will 
32 be closed and analyzed after `3.0.0-beta` is released.
33
34 Still working on `3.0.0` branch to provide you with device detection!
35 We're really excited on this one!
36 We would like to speed this up, but life and family gets in the way ;)
37
38 Many thanks **JetBrains** team for providing licenses for [PHPStorm](https://www.jetbrains.com/phpstorm/) and 
39 [DataGrip](https://www.jetbrains.com/datagrip/).
40
41 #### Install
42
43 **Download and include manually**
44 > Use this to quickly test the demo.
45
46 * [Download latest release](../../tags)
47 * [Mobile_Detect.php](./Mobile_Detect.php)
48
49 ```php
50 require_once "libs/Mobile_Detect.php";
51 ```
52
53 **Install as a [composer package](https://packagist.org/packages/mobiledetect/mobiledetectlib)**
54 > Use this method to get continuous updates.
55
56 ```
57 composer require mobiledetect/mobiledetectlib
58 ```
59 or include the dependency in the `composer.json` file:
60 ```json
61 {
62     "require": {
63         "mobiledetect/mobiledetectlib": "^2.8"
64     }
65 }
66 ```
67
68 #### Demo 
69
70 * [:iphone: Live demo!](http://is.gd/mobiletest)
71 * [Code examples](../../wiki/Code-examples)
72
73 #### Contribute
74
75 *Submit a PR*
76 > Submit a pull request but before make sure you read [how to contribute](../../docs/CONTRIBUTING.md) guide.
77
78 *Donate*
79
80 |Pledgie|Paypal|
81 |-------|------|
82 |[Donate :+1:](https://pledgie.com/campaigns/21856)|[Donate :beer:](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mobiledetectlib%40gmail%2ecom&lc=US&item_name=Mobile%20Detect&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted)|
83
84
85 I'm currently paying for hosting and spend a lot of my family time to maintain the project and planning the future releases.
86 I would highly appreciate any money donations that will keep the research going.
87
88 Special thanks to the community :+1: for donations, JetBrains team for the continuous support and [Dragos Gavrila](https://twitter.com/grafician) who contributed with the logo.
89
90 #### Modules, plugins, ports
91 > [Submit new module, plugin, port](../../issues/new?title=New%203rd%20party%20module&body=Name,%20Link%20and%20Description%20of%20the%20module.)
92
93 :point_right: Keep `Mobile_Detect.php` class in a separate `module` and do NOT include it in your script core because of the high frequency of updates.
94 :point_right: When including the class into you `web application` or `module` always use `include_once '../path/to/Mobile_Detect.php` to prevent conflicts.
95
96 **JavaScript**
97
98 * mobile-detect.js - A [JavaScript port](https://github.com/hgoebl/mobile-detect.js) of Mobile-Detect class. Made by [Heinrich Goebl](https://github.com/hgoebl).
99
100 **Varnish Cache**
101
102 * [Varnish Mobile Detect](https://github.com/willemk/varnish-mobiletranslate) - Drop-in varnish solution to mobile user 
103 detection based on the Mobile-Detect library. Made by [willemk](https://github.com/willemk).
104 * [mobiledetect2vcl](https://github.com/carlosabalde/mobiledetect2vcl) - Python script to transform the Mobile 
105 Detect JSON database into an UA-based mobile detection VCL subroutine easily integrable in any Varnish Cache 
106 configuration. Made by [Carlos Abalde](https://github.com/carlosabalde).
107
108 **LUA**
109
110 * [mobile-detect.lua](https://github.com/yourpalmark/mobile-detect.lua) is a port of Mobile-Detect to Lua for 
111 NGINX HTTP servers. Follows closely to mobile-detect.js. Supports all methods that server-side 
112 mobile-detect.js supports. Fully unit-tested and synced with Travis CI (Build Passing badge included). 
113 Made by [Mark Walters](https://github.com/yourpalmark).
114
115 **PHP**
116
117 **WordPress**
118
119 * [Mobile Detect for WordPress](https://wordpress.org/plugins/tinywp-mobile-detect/) - WordPress has a built-in function 
120 (`wp_is_mobile()`) to detect mobile devices. There is (at least) one catch, though. It considers iPad (iPad pro, 
121 and any tablet) as a mobile. So, this 3rd party module changes the way `wp_is_mobile()` works with the help of 
122 Mobile Detect PHP library!
123 Made by [Pothi Kalimuthu](https://github.com/pothi)
124
125 * [WordPress Mobile Detect](https://wordpress.org/plugins/wp-mobile-detect/) - Gives you the ability to wrap that 
126 infographic in a `[notdevice][/notdevice]` shortcode so at the server level WordPress will 
127 decide to show that content only if the user is NOT on a phone or tablet. 
128 Made by [Jesse Friedman](https://profiles.wordpress.org/professor44/).
129
130 * [mobble](https://wordpress.org/plugins/mobble/) - provides mobile related conditional functions for your site. 
131 e.g. `is_iphone()`, `is_mobile()` and `is_tablet()`. Made by Scott Evans.
132
133 * [WordPress Responsage](https://github.com/iamspacehead/responsage) - A small WordPress theme plugin that allows 
134 you to make your images responsive. Made by [Adrian Ciaschetti](https://github.com/iamspacehead).
135     
136 * [WP247 Body Classes](https://wordpress.org/plugins/wp247-body-classes/) - Add unique classes to the `body` tag for 
137 easy styling based on various attributes (archive, user, post, mobile) and various WordPress "is" functions. 
138 Mobile attributes include type of device, Operating System, Browser, etc. Examples: .is-mobile, .is-not-mobile, 
139 .is-tablet, .is-ios, .is-not-ios, .is-androidos, .is-chromebrowser. 
140 Made by [wescleveland56](https://github.com/wescleveland56).
141
142 **Drupal**
143
144 * [Drupal Mobile Switch](https://www.drupal.org/project/mobile_switch) - The Mobile Switch Drupal module provides a 
145 automatic theme switch functionality for mobile devices, detected by Browscap or Mobile Detect. 
146 Made by [Siegfried Neumann](https://www.drupal.org/user/45267).
147
148 * [Drupal Context Mobile Detect](https://www.drupal.org/project/context_mobile_detect) - This is a Drupal context module 
149 which integrates Context and PHP Mobile Detect library.
150 Created by [Artem Shymko](https://www.drupal.org/user/432492).
151
152 * [Drupal Mobile Detect](https://www.drupal.org/project/mobile_detect) - Lightweight mobile detect module for Drupal
153  created by [Matthew Donadio](https://www.drupal.org/user/325244).
154
155 **Joomla**
156
157 * [yagendoo Joomla! Mobile Detection Plugin](http://www.yagendoo.com/en/blog/free-mobile-detection-plugin-for-joomla.html) - Lightweight PHP plugin for Joomla! 
158 that detects a mobile browser using the Mobile Detect class.
159 Made by yagendoo media.
160  
161 * [User Agent Detector plugin](https://github.com/renekreijveld/UserAgentDetector) - This system plugin detects the user 
162 agent of your website visitor and sets a session variable accordingly. Based on the user agent, the plugin detects if the 
163 site is running on a desktop pc, tablet or smartphone. It can also detect if the visitor is a spider bot (search engine). 
164 Session variable that is set: `ualayout`. Possible values: desktop, tablet, mobile, bot.
165 Made by @ReneKreijveld.
166
167 **Magento**
168
169 * [Magento helper](http://www.magentocommerce.com/magento-connect/catalog/product/view/id/16835/) from Optimise Web enables 
170 the use of all functions provided by Mobile Detect. Made by [Kathir Vel](http://www.kathirvel.com).
171
172 * [Magento 2 Mobile Detect Theme Change](https://github.com/EaDesgin/magento2-mobiledetect) is an extension for Magento 2 
173 that will change the theme or redirect to a different URL. Also containing a helper to check for the device type.
174
175 **PrestaShop**
176
177 * [PrestaShop](https://www.prestashop.com) is a free, secure and open source shopping cart platform. Mobile_Detect 
178 is included in the default package since 1.5.x.
179
180 **Laravel**
181
182 * [Agent](https://github.com/jenssegers/agent) is a user agent class for Laravel based on Mobile Detect with some 
183 additional functionality. 
184 Made by [Jens Segers](https://github.com/jenssegers).
185
186 * [Laravel Mobile Detect](https://github.com/riverskies/laravel-mobile-detect) is a package that enables you to use device detection right in your Laravel Blade templates. (Utilises the well-known, constantly updated PHP mobile detection library.)
187 Made by [Barnabas Kecskes](https://github.com/barnabaskecskes).
188
189 * [BrowserDetect](https://github.com/hisorange/browser-detect) is a browser and mobile detection package, collects 
190 and wrap together the best user-agent identifiers for Laravel. 
191 Created by [Varga Zsolt](https://github.com/hisorange).
192
193 **Zend Framework**
194
195 * [ZF2 Mobile-Detect](https://github.com/neilime/zf2-mobile-detect.git) is a Zend Framework 2 module that provides 
196 Mobile-Detect features (Mobile_Detect class as a service, helper for views and plugin controllers). 
197 Made by [neilime](https://github.com/neilime).
198
199 * [ZF2 MobileDetectModule](https://github.com/nikolaposa/MobileDetectModule) facilitates integration of a PHP MobileDetect 
200 class with some ZF2-based application. Has similar idea like the existing ZF2 Mobile-Detect module, 
201 but differs in initialization and provision routine of the actual Mobile_Detect class. 
202 Appropriate view helper and controller plugin also have different conceptions. 
203 Made by [Nikola Posa](https://github.com/nikolaposa).
204
205 **Symfony**
206
207 * [Symfony2 Mobile Detect Bundle](https://github.com/suncat2000/MobileDetectBundle) is a bundle for detecting mobile devices, 
208 manage mobile view and redirect to the mobile and tablet version.
209 Made by [Nikolay Ivlev](https://github.com/suncat2000).
210
211 * [Silex Mobile Detect Service Provider](https://github.com/jbinfo/MobileDetectServiceProvider) is a service provider to 
212 interact with Mobile detect class methods.
213 Made by [Lhassan Baazzi](https://github.com/jbinfo).
214
215 **Slim Framework**
216
217 * [Slim_Mobile_Detect](https://github.com/zguillez/slim_mobile_detect) implements Mobile_Detect lib for different 
218 responses write on Slim Framework App.
219
220 **ExpressionEngine**
221
222 * [EE2 Detect Mobile](https://github.com/garethtdavies/detect-mobile) is a lightweight PHP plugin for EE2 that detects
223  a mobile browser using the Mobile Detect class. Made by [Gareth Davies](https://github.com/garethtdavies).
224
225 **Yii Framework**
226
227 * [Yii Extension](https://github.com/iamsalnikov/MobileDetect) - Mobile detect plugin for Yii framework. 
228 Made by [Alexey Salnikov](https://github.com/iamsalnikov).
229
230 * [Yii Extension](https://github.com/candasm/yii1-mobile-detect-component) - Mobile detect component for Yii framework 
231 1.x version which supports composer package manager. Made by [Candas Minareci](https://github.com/candasm).
232
233 * [Yii2 Device Detect](https://github.com/alexandernst/yii2-device-detect/) - Yii2 extension for Mobile-Detect library. 
234 Made by [Alexander Nestorov](https://github.com/alexandernst).
235
236 **CakePHP**
237
238 * [CakePHP MobileDetect](https://github.com/chronon/CakePHP-MobileDetectComponent-Plugin) is a plugin component for 
239 CakePHP 2.x. Made by [Gregory Gaskill](https://github.com/chronon).
240
241 **FuelPHP**
242
243 * [Special Agent](https://github.com/rob-bar/special_agent) is a FuelPHP package which uses php-mobile-detect to 
244 determine whether a device is mobile or not. It overrides the Fuelphp Agent class its methods. 
245 Made by [Robbie Bardjin](https://github.com/rob-bar).
246
247
248 **TYPO3**
249
250 * [px_mobiledetect](https://typo3.org/extensions/repository/view/px_mobiledetect) is an extension that helps to detect 
251 visitor's mobile device class (if that’s tablet or mobile device like smartphone). Made by Alexander Tretyak.
252
253 **Other**
254
255 * [PageCache](https://github.com/mmamedov/page-cache) is a lightweight PHP library for full page cache, 
256 with built-in Mobile-Detect support. Made by [Muhammed Mamedov](https://github.com/mmamedov).
257
258 * [Statamic CMS Mobile Detect](https://github.com/haikulab/statamic-mobile-detect) is a plugin. 
259 Made by [Sergei Filippov](https://github.com/haikulab/statamic-mobile-detect) of Haiku Lab.
260
261 * [Kohana Mobile Detect](https://github.com/madeinnordeste/kohana-mobile-detect) is an example of implementation of 
262 Mobile_Detect class with Kohana framework. 
263 Written by [Luiz Alberto S. Ribeiro](https://github.com/madeinnordeste).
264
265 * [MemHT](https://www.memht.com) is a Free PHP CMS and Blog that permit the creation and the management online 
266 of websites with few and easy steps. Has the class included in the core.
267
268 * [concrete5](https://www.concrete5.org) is a CMS that is free and open source. The library is included in the core.
269
270 * [engine7](https://github.com/QOXCorp/exengine) is PHP Open Source Framework. The Mobile_Detect class is included in 
271 the engine.
272
273 * [Zikula](http://zikula.org) is a free and open-source Content Management Framework, which allows you to run 
274 impressive websites and build powerful online applications. The core uses Mobile-Detect to switch to a special 
275 Mobile theme, using jQueryMobile.
276
277 * [UserAgentInfo](https://github.com/quentin389/UserAgentInfo) is a PHP class for parsing user agent strings 
278 (HTTP_USER_AGENT). Includes mobile checks, bot checks, browser types/versions and more.
279 Based on browscap, Mobile_Detect and ua-parser. Created for high traffic websites and fast batch processing. 
280 Made by [quentin389](https://github.com/quentin389).
281
282 * [LJ Mobile Detect](https://github.com/lewisjenkins/craft-lj-mobiledetect) is a simple implementation of Mobile Detect 
283 for Craft CMS. Made by [Lewis Jenkins](https://github.com/lewisjenkins).
284
285 * [Grav Plugin Mobile Detect](https://github.com/dimitrilongo/grav-plugin-mobile-detect/) is a simple implementation 
286 of Mobile Detect for Grav CMS. Made by [Dimitri Longo](https://github.com/dimitrilongo).
287
288
289 **Perl**
290
291  * [MobileDetect.pm](https://www.buzzerstar.com/development/) is a Perl module for Mobile Detect. 
292  Made by [Sebastian Enger](https://devop.tools/).
293
294 **Python**
295
296 * [pymobiledetect](https://pypi.python.org/pypi/pymobiledetect) - Mobile detect python package. 
297 Made by Bas van Oostveen. 
298
299 **Ruby**
300
301 * [mobile_detect.rb](https://github.com/ktaragorn/mobile_detect) is a Ruby gem using the JSON data exposed by the 
302 php project and implementing a basic subset of the API (as much as can be done by the exposed data). 
303 Made by [Karthik T](https://github.com/ktaragorn).
304
305 **Go**
306
307 * [GoMobileDetect](https://github.com/Shaked/gomobiledetect) is a Go port of Mobile Detect class. 
308 Made by [https://github.com/Shaked](Shaked).
309
310
311 **LUA**
312
313 * [ua-lua](https://github.com/robinef/ua-lua) is a small lib written in LUA providing device type detection. 
314 ua-lua is detecting mobile or tablet devices based on user-agent inside nginx daemon. 
315 Made by [Frédéric Robinet](https://github.com/robinef).
316
317 **.Net**
318
319 * [mobile-detect](https://github.com/validide/mobile-detect) is a .Net partial port written in C#. 
320 Made by [Valentin Dide](https://github.com/validide).