?
avatar rudisten1
rudisten1
29 Jul 2016

Steps to reproduce the issue

echo the JBrowser::isMobile() method output browsing the page with an android smartphone

Expected result

true

Actual result

false

System information (as much as possible)

php 5.6.24
IIS 7
joomla 3.6
MySql 5.7

Additional comments

avatar rudisten1 rudisten1 - open - 29 Jul 2016
avatar brianteeman brianteeman - change - 29 Jul 2016
Category Libraries
avatar smehrbrodt
smehrbrodt - comment - 29 Jul 2016

See #6859

avatar n9iels
n9iels - comment - 30 Jul 2016

Calling JBrowser::isMobile() that why will give you a PHP error because that method is not made to call static. Instead use this:

$browser = JBrowser::getInstance();
$this->browser->isMobile();
avatar alexonbalangue
alexonbalangue - comment - 15 Sep 2016

hi tested until used on with template J3.6, is worked. You should need to "true/false", exemple:
[code]
$browser = JBrowser::getInstance();
if( $browser->isMobile() == true ){
#show on Mobile because = true
} else {
#show Desktop
}
[/code]


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11346.

avatar zero-24
zero-24 - comment - 15 Sep 2016

Closing as JBrowser::isMobile() is not valid syntax and @alexonbalangue confirmed it worked with the correct syntax.

If it still not work on your site please open a new issue with your useragent information you can find in the backend under system information. Thanks.

avatar zero-24 zero-24 - close - 15 Sep 2016
avatar zero-24 zero-24 - change - 15 Sep 2016
Status New Closed
Closed_Date 0000-00-00 00:00:00 2016-09-15 09:39:05
Closed_By zero-24

Add a Comment

Login with GitHub to post a comment