You are here

function geoip_admin_settings in GeoIP API 6

Same name and namespace in other branches
  1. 5 geoip.module \geoip_admin_settings()
  2. 7.2 geoip.admin.inc \geoip_admin_settings()
  3. 7 geoip.admin.inc \geoip_admin_settings()

Menu callback and form builder for admin/settings/geoip.

1 string reference to 'geoip_admin_settings'
geoip_menu in ./geoip.module
Implementation of hook_menu().

File

./geoip.admin.inc, line 11
Admin functions for geoip module.

Code

function geoip_admin_settings() {
  $form['geoip_data_file'] = array(
    '#type' => 'textfield',
    '#title' => t('GeoIP data file location'),
    '#description' => t("The path to the GeoIP database file. If you're using the city database you'll need to provide the correct filename."),
    '#default_value' => variable_get('geoip_data_file', 'sites/all/libraries/geoip/GeoIP.dat'),
    '#after_build' => array(
      'geoip_data_file_validate',
    ),
  );
  $form['geoip_debug'] = array(
    '#type' => 'checkbox',
    '#title' => t('GeoIP debug mode'),
    '#description' => t('With this setting enabled, an IP may be passed in through the query string using the <kbd>geoip_debug</kbd> parameter. This should not be used on production sites.'),
    '#default_value' => variable_get('geoip_debug', FALSE),
  );
  return system_settings_form($form);
}