function votingapi_settings_form in Voting API 6
Same name and namespace in other branches
- 6.2 votingapi.admin.inc \votingapi_settings_form()
- 7.3 votingapi.admin.inc \votingapi_settings_form()
- 7.2 votingapi.admin.inc \votingapi_settings_form()
1 string reference to 'votingapi_settings_form'
- votingapi_menu in ./
votingapi.module - Implementation of hook_menu. Adds the url path for the votingapi settings page.
File
- ./
votingapi.module, line 65
Code
function votingapi_settings_form($form_state) {
$period = array(
0 => t('Never'),
);
$period += drupal_map_assoc(array(
600,
3600,
10800,
21600,
32400,
43200,
86400,
), 'format_interval');
$form['votingapi_anonymous_window'] = array(
'#type' => 'select',
'#title' => t('Anonymous vote rollover'),
'#description' => t('The amount of time that must pass before two anonymous votes from the same computer are considered unique. Setting this to \'never\' will eliminate most double-voting, but will make it impossible for multiple anonymous on the same computer (like internet cafe customers) from casting votes.'),
'#default_value' => variable_get('votingapi_anonymous_window', 3600),
'#options' => $period,
);
$form['votingapi_calculation_schedule'] = array(
'#type' => 'radios',
'#title' => t('Vote tallying'),
'#description' => t('On high-traffic sites, administrators can use this setting to postpone the calculation of vote results.'),
'#default_value' => variable_get('votingapi_calculation_schedule', 'immediate'),
'#options' => array(
'immediate' => t('Tally results whenever a vote is cast'),
'cron' => t('Tally results at cron-time'),
'manual' => t('Do not tally results automatically: I am using a module that manages its own vote results.'),
),
);
return system_settings_form($form);
}