You are here

function statcounter_settings in StatCounter 5

Same name and namespace in other branches
  1. 6 statcounter.module \statcounter_settings()

Create the setting form.

1 string reference to 'statcounter_settings'
statcounter_menu in ./statcounter.module
Implementation of hook_menu().

File

./statcounter.module, line 123
Provides an integration with StatCounter which logs user activity.

Code

function statcounter_settings() {
  $from = array();
  $form['general'] = array(
    '#type' => 'fieldset',
    '#title' => t('General'),
    '#description' => t('General setup information.'),
  );
  $form['general']['statcounter_code'] = array(
    '#type' => 'textarea',
    '#rows' => '12',
    '#title' => t('Code'),
    '#description' => t('Place the StatCounter code that will be inserted on pages within the specified scope.'),
    '#default_value' => variable_get('statcounter_code', ''),
  );
  $form['general']['statcounter_scope'] = array(
    '#type' => 'radios',
    '#title' => t('Scope'),
    '#description' => t('The pages that the StatCounter code will be inserted on.'),
    '#default_value' => variable_get('statcounter_scope', 'home'),
    '#options' => array(
      'all' => t('All pages'),
      'user' => t('Non-admin pages'),
      'admin' => t('Admin pages'),
      'home' => t('Home page'),
    ),
  );
  return system_settings_form($form);
}