cge_is_smartphone returns false for Android phones

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
User avatar
rotezecke
Power Poster
Power Poster
Posts: 411
Joined: Fri Apr 18, 2008 9:34 pm

cge_is_smartphone returns false for Android phones

Post by rotezecke »

i got this in my page template:

Code: Select all

{$is_mobile = {cge_is_smartphone} scope=global}
at least two android phones (motorola, samsung) return "NO" with:

Code: Select all

{if $is_mobile}YES{else}NO{/if}
i wrote a quick udt:

Code: Select all

$br = get_browser(null,true);
print_r($br);
and the output is this:
Array (
[browser_name_regex] => ~^mozilla/5\.0 \(.*linux.*android.4\.3.* build/.*\) applewebkit/.* \(khtml,.*like gecko.*\) version/1\.5.*chrome.*safari.*$~
[browser_name_pattern] => Mozilla/5.0 (*Linux*Android?4.3* Build/*) AppleWebKit/* (KHTML,*like Gecko*) Version/1.5*Chrome*Safari*
[parent] => Android WebView 1.5
[comment] => Android WebView 1.5
[browser] => Android WebView
[browser_maker] => Google Inc
[version] => 1.5
[majorver] => 1
[minorver] => 5
[platform] => Android
[ismobiledevice] => 1
[device_type] => Mobile Phone
[device_pointing_method] => touchscreen
[win32] =>
[win64] =>
[istablet] => )
any idea why this would be happening?


----------------------------------------------

Cms Version: 1.12.1

Installed Modules:

CMSMailer: 5.2.2
FileManager: 1.4.5
MenuManager: 1.8.7
News: 2.15.2
CGSmartImage: 1.20.3
Search: 1.7.13
TinyMCE: 2.9.12
CGSimpleSmarty: 1.9.1
CGExtensions: 1.49.9
CGBlog: 1.13.1
CGFeedback: 1.7.3
Captcha: 0.5.2
FormBuilder: 0.8.1.2
JQueryTools: 1.3.7


Config Information:

php_memory_limit:
process_whole_template:
max_upload_size: 2000000
url_rewriting: mod_rewrite
page_extension: .html
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding: utf-8
admin_encoding: utf-8
set_names: true


Php Information:

phpversion: 5.6.14-0+deb8u1
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 2048
E_DEPRECATED: 8192
memory_limit: 128M
max_execution_time: 30
output_buffering: 4096
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 8M
upload_max_filesize: 2M
session_save_path: /var/lib/php5/sessions (1733)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)


Server Information:

Server Api: apache2handler
Server Db Type: MySQL (mysql)
Server Db Version: 5.5.46
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable
Server Time Diff: No filesystem time difference found


----------------------------------------------
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: cge_is_smartphone returns false for Android phones

Post by calguy1000 »

{cge_is_smartphone} does not use the get_browser() function. It uses a different third party class that can be a bit out of date.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Post Reply

Return to “Modules/Add-Ons”