Welcome, Guest
Username Password: Remember me

Do you support api for detect mobile device?
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Do you support api for detect mobile device?

Do you support api for detect mobile device? 12 years, 5 months ago #6438

  • tho
  • OFFLINE
  • Fresh Boarder
  • Posts: 7
  • Karma: 0
I think it's great if you support api.
To developers can detect mobile device and switch features, template of the component for mobile optimization

Re: Do you support api for detect mobile device? 12 years, 3 months ago #7002

  • tho
  • OFFLINE
  • Fresh Boarder
  • Posts: 7
  • Karma: 0
I want to global a var $is_mobile for other component

any one know to generate is_mobile boolse using mobile joomla class?

Re: Do you support api for detect mobile device? 12 years, 3 months ago #7005

  • dryabov
  • OFFLINE
  • Administrator
  • Denis Ryabov, Lead Developer
  • Posts: 4866
  • Karma: 105
tho wrote:
I want to global a var $is_mobile for other component

any one know to generate is_mobile boolse using mobile joomla class?


It's possible to check _MJ constant
if (defined('_MJ')) { mobile } else { desktop }

Re: Do you support api for detect mobile device? 12 years, 1 month ago #7436

  • mmw_canada
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
  • Karma: 0
This is a good way to integrate moblie joomla with virtuemart.

I used this
if (defined('_MJ')) { $products_per_row = 1; }
in my com_virtuemart/themes/default/templates/browse/includes/browse_layouttable.tpl.php
to limit the product display to one column when using a mobile device.

I also used this
if (defined('_MJ')) { $categories_per_row = 1; } 
in my com_virtuemart/themes/default/templates/common/categoryChildlist.tpl.php
to show only one subcategory image per row
Last Edit: 12 years, 1 month ago by mmw_canada.
  • Page:
  • 1
Time to create page: 0.18 seconds

By continuing to use this site you consent to the use of cookies on your device as described in our cookie policy unless you have disabled them. This site will not function correctly without cookies.

I accept cookies from this site.