I'm wondering if Mobile Tools will help with an issue I'm trying to address. I'm working on a responsive theme for a site and want to use different information a particular section depending if the device is mobile or not (in this case, call a PHP include file for desktop and a separate one if mobile). Is there a function that returns TRUE/FALSE with Mobile Tools depending if the site is being accessed from a mobile device? Or is this mobile overkill for that? I'd rather not maintain a separate theme and code-base just for a couple small changes.

Thanks,
Matt

Comments

devin carlson’s picture

Status: Active » Fixed

If you are just looking for a function that identifies if a visitor is using a mobile device, you can use the mobile_tools_is_mobile_device() function provided by Mobile Tools or you can use other functions such as browscap_get_browser() which is provided by the Browscap module.

Calling either function (with the appropriate module installed) will return an array of properties about the current website visitor's device including whether it is a mobile device or not.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.