garethtdavies / detect-mobile Goto Github PK
View Code? Open in Web Editor NEWLightweight PHP plugin for EE2/EE5 that detects a mobile browser using the PHP Detect Mobile class
License: MIT License
Lightweight PHP plugin for EE2/EE5 that detects a mobile browser using the PHP Detect Mobile class
License: MIT License
I get this error on most templates:
Fatal error: Cannot redeclare class Mobile_detect in /var/www/vhosts/sagmeisterwalsh.com/httpdocs/admin/expressionengine/third_party/detect_mobile/libraries/Mobile_detect.php on line 35
On pages with no other plugins or EE tags it seems to work...
Any idea what might cause this?
Can you please add some more functionality for detecting if the device is iOS or Android based?
(code snippets from: https://github.com/serbanghita/Mobile-Detect )
// Check for a specific platform with the help of the magic methods:
if( $detect->isiOS() ){
}
if( $detect->isAndroidOS() ){
}
Also, can you add the ability to look up version numbers?
// Get the version() of components.
$detect->version('iPad'); // 4.3 (float)
$detect->version('iPhone') // 3.1 (float)
$detect->version('Android'); // 2.1 (float)
$detect->version('Opera Mini'); // 5.0 (float)
This way I can use these to detect if the device properly supports certain CSS elements or rules. For example, I'd like to put a body class on my pages for older android versions (below 2.3) to indicate that they don't support fixed-position headers.
Can you check current release?
Running EE2.5.5
Ta, Liam
Redirects to mobile when tablet="no" and visiting on iPad
Hi Gareth,
This plugin has the {exp:detect_mobile:isphone} tag. It'd be nice if there was also a {exp:detect_mobile:isnotphone} tag too (and I guess, a not equivalent of any other tags that exist, if they don't have one).
We could then use these in simple conditionals, without having to use the advanced if:else conditionals (which I think, has performance benefits).
Thanks,
Stephen
Opera 17 is treated as a mobile.
I´m on a mac, os x 10.9.
Maybe this is solved in the new 2.7.1 version of Mobile-Detect?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.