You are here

function mobile_tools_form_alter in Mobile Tools 6.3

Same name and namespace in other branches
  1. 5 mobile_tools.module \mobile_tools_form_alter()
  2. 6 mobile_tools.module \mobile_tools_form_alter()
  3. 7.2 mobile_tools.module \mobile_tools_form_alter()

Alteration to global setting form

File

./mobile_tools.module, line 671
Mobile Tools provides a range of functionality assisting in creating a mobile Drupal site . this functionality contains:

Code

function mobile_tools_form_alter(&$form, $form_state, $form_id) {
  switch ($form_id) {
    case 'node_configure':
      $form['default_nodes_main_mobile'] = array(
        '#type' => 'select',
        '#title' => t('Number of posts on main page for the mobile version'),
        '#default_value' => variable_get('default_nodes_main_mobile', variable_get('default_nodes_main', 10)),
        '#options' => array(
          1 => 1,
          2 => 2,
          3 => 3,
          4 => 4,
          5 => 5,
          6 => 6,
          7 => 7,
          8 => 8,
          9 => 9,
          10 => 10,
          15 => 15,
          20 => 20,
          25 => 25,
          30 => 30,
        ),
        '#description' => t('The default maximum number of posts to display per page on overview pages such as the main page (on Mobile).'),
      );
      break;
  }
}