function advpoll_ranking_install in Advanced Poll 7.3
Same name and namespace in other branches
- 7 advpoll_ranking/advpoll_ranking.install \advpoll_ranking_install()
- 7.2 advpoll_ranking/advpoll_ranking.install \advpoll_ranking_install()
Implements hook_install().
File
- advpoll_ranking/
advpoll_ranking.install, line 58 - Install file for Advanced Ranking Poll.
Code
function advpoll_ranking_install() {
$t = get_t();
// Add borda and run-off to allow ranking-style display and voting.
$field = array(
'field_name' => 'advpoll_behavior',
'settings' => array(
'allowed_values' => array(
'approval' => $t('Approval voting'),
'pool' => $t('Pool votes and choices'),
'borda' => $t('Borda count (Ranking Poll)'),
'runoff' => $t('Instant-runoff (Ranking Poll)'),
'borda_all' => $t('Borda count drag and drop (Ranking Poll)'),
'runoff_all' => $t('Instant-runoff drag and drop (Ranking Poll)'),
),
'allowed_values_function' => '',
),
);
field_update_field($field);
}