function counter_admin_settings in Counter 5
Same name and namespace in other branches
- 6.2 counter.settings.inc \counter_admin_settings()
- 6 counter.module \counter_admin_settings()
- 7 counter.settings.inc \counter_admin_settings()
1 string reference to 'counter_admin_settings'
- counter_menu in ./
counter.module - Menu callback. Prints a listing of active nodes on the site.
File
- ./
counter.module, line 56 - The counter module used for displaying Site Counter.
Code
function counter_admin_settings() {
$form = array();
// only administrators can access this function
// Generate the form - settings applying to all patterns first
$form['counter_settings'] = array(
'#type' => 'fieldset',
'#weight' => -20,
'#title' => t('Basic settings'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
'#description' => l(t('Click here to access: Site Counter Report'), "counter/report"),
);
$form['counter_settings']['counter_show_site_counter'] = array(
'#type' => 'checkbox',
'#title' => t('Show Site Counter'),
'#default_value' => variable_get('counter_show_site_counter', 1),
'#description' => t('Show Site Counter'),
);
$form['counter_settings']['counter_show_unique_visitor'] = array(
'#type' => 'checkbox',
'#title' => t('Show Unique Visitors'),
'#default_value' => variable_get('counter_show_unique_visitor', 1),
'#description' => t('Show Unique Visitors'),
);
$form['counter_settings']['counter_registered_user'] = array(
'#type' => 'checkbox',
'#title' => t('Show Registered Users'),
'#default_value' => variable_get('counter_registered_user', 1),
'#description' => t('Show Registered Users'),
);
$form['counter_settings']['counter_unregistered_user'] = array(
'#type' => 'checkbox',
'#title' => t('Show Unregistered Nodes'),
'#default_value' => variable_get('counter_unregistered_user', 1),
'#description' => t('Show Unregistered Users'),
);
$form['counter_settings']['counter_published_node'] = array(
'#type' => 'checkbox',
'#title' => t('Show Published Nodes'),
'#default_value' => variable_get('counter_published_node', 1),
'#description' => t('Show Published Nodes'),
);
$form['counter_settings']['counter_unpublished_node'] = array(
'#type' => 'checkbox',
'#title' => t('Show Unpublished Users'),
'#default_value' => variable_get('counter_unpublished_node', 1),
'#description' => t('Show Unpublished Users'),
);
$form['counter_settings']['counter_show_ip'] = array(
'#type' => 'checkbox',
'#title' => t('Show Client IP'),
'#default_value' => variable_get('counter_show_ip', 1),
'#description' => t('Show Client IP'),
);
$form['counter_settings']['counter_show_counter_since'] = array(
'#type' => 'checkbox',
'#title' => t('Show Sice Counter Since'),
'#default_value' => variable_get('counter_show_counter_since', 1),
'#description' => t('Show the first entry date in the Site Counter'),
);
$form['counter_initial'] = array(
'#type' => 'fieldset',
'#weight' => -20,
'#title' => t('Initial Values'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
'#description' => t("Set initial values for Site Counter."),
);
$form['counter_initial']['counter_initial_counter'] = array(
'#type' => 'textfield',
'#title' => t('Initial value of Site Counter'),
'#default_value' => variable_get('counter_initial_counter', 0),
'#description' => t('Initial value of Site Counter'),
);
$form['counter_initial']['counter_initial_unique_visitor'] = array(
'#type' => 'textfield',
'#title' => t('Initial value of Unique Visitor'),
'#default_value' => variable_get('counter_initial_unique_visitor', 0),
'#description' => t('Initial value of Unique Visitor'),
);
$form['counter_initial']['counter_initial_since'] = array(
'#type' => 'textfield',
'#title' => t("Replace 'Since' value with this string"),
'#default_value' => variable_get('counter_initial_since', ''),
'#description' => t("If you leave this field blank than Counter module will use the first date of Counter record. This field type is textfield, so you can enter: '2008-08-12 or 12 August 2008 06:39'."),
);
return system_settings_form($form);
}