You are here

function mobile_tools_external_modules_configuration_form in Mobile Tools 6

Same name and namespace in other branches
  1. 6.3 mobile_tools.admin.inc \mobile_tools_external_modules_configuration_form()
  2. 6.2 mobile_tools.admin.inc \mobile_tools_external_modules_configuration_form()
  3. 7.2 mobile_tools.admin.inc \mobile_tools_external_modules_configuration_form()

Configuration of external modules

1 string reference to 'mobile_tools_external_modules_configuration_form'
mobile_tools_menu in ./mobile_tools.module
Implementation of hook_menu().

File

./mobile_tools.admin.inc, line 279
Adminstrative pages for Mobile Tools

Code

function mobile_tools_external_modules_configuration_form() {
  $form['mobile_tools_detection'] = array(
    '#type' => 'fieldset',
    '#title' => t('External detection modules'),
    '#collapsible' => TRUE,
    '#description' => t('You can let other modules do the device detection or detect if your site is being mobilised.'),
  );
  $form['mobile_tools_detection']['mobile-tools-device-detection'] = array(
    '#type' => 'radios',
    '#title' => 'Device detection module',
    '#default_value' => variable_get('mobile-tools-device-detection', 'mobile_tools'),
    '#options' => _mobile_tools_external('device-detection'),
    '#description' => t('Choose which module is in charge for detecting if the visiting device is a mobile device. The Mobile Tools provides a standard implementation. You can also use other modules'),
  );
  $device_capability = _mobile_tools_external('device-capability');
  $mess = '';
  if (count($device_capability) == 0) {
    $mess = 'No device capability modules installed';
  }
  $form['mobile_tools_detection']['mobile-tools-device-capabilities'] = array(
    '#type' => 'radios',
    '#title' => 'Device capability detection',
    '#default_value' => variable_get('mobile-tools-device-capabilities', 'wurfl'),
    '#options' => $device_capability,
    '#prefix' => $mess,
    '#description' => t('The mobile tools module gives an abstract api in order to get capabilities of the mobile devices. These capability can be fetched by calling mobile_tools_devicecapability($capability). Capability can be for example "is_wireless_device". A full range of parameters can be found on !wurfl you need at least one capability module (like !wurfl2) to use this functionality', array(
      '!wurfl' => l('http://wurfl.sourceforge.net/help_doc.php', 'http://wurfl.sourceforge.net/help_doc.php'),
      '!wurfl2' => l('http://drupal.org/project/wurfl', 'http://drupal.org/project/wurfl'),
    )),
  );
  return system_settings_form($form);
}