You are here

function geoip_admin_settings in GeoIP API 5

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

/admin/settings/geoip

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

File

./geoip.module, line 63
API for using the MaxMind GeoLite Country database

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.dat file.  You can download a free GeoIP Country data file from !link.', array(
      '!link' => l('MaxMind', 'http://www.maxmind.com/app/geolitecountry'),
    )),
    '#default_value' => variable_get('geoip_data_file', drupal_get_path('module', '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 GEOIP_DEBUG parameter. This should not be used on production sites.'),
    '#default_value' => variable_get('geoip_debug', FALSE),
  );
  return system_settings_form($form);
}