Closed (fixed)
Project:
Mobile Tools
Version:
6.x-2.3
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
3 Nov 2011 at 16:00 UTC
Updated:
22 Jun 2012 at 03:41 UTC
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
Comment #1
devin carlson commentedIf 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 asbrowscap_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.