You are here

function vud_term_admin_settings in Vote Up/Down 7

Same name and namespace in other branches
  1. 6.3 vud_term/vud_term.module \vud_term_admin_settings()
  2. 6.2 vud_term/vud_term.module \vud_term_admin_settings()

Advanced menu settings callback.

1 string reference to 'vud_term_admin_settings'
vud_term_menu in vud_term/vud_term.module
Implementation of hook_menu().

File

vud_term/vud_term.module, line 42
Adds a voting widget to terms.

Code

function vud_term_admin_settings() {
  $form['vud_term_types'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Node types'),
    '#description' => t('Select the node types for which you want to activate voting on terms.'),
    '#default_value' => variable_get('vud_term_types', array()),
    '#options' => node_type_get_names(),
  );
  $form['vud_term_widget'] = array(
    '#type' => 'radios',
    '#title' => t('Widget selection'),
    '#description' => t('Select the voting widget theme that will be displayed.'),
    '#default_value' => variable_get('vud_term_widget', 'plain'),
    '#options' => vud_widget_get_names(),
  );
  $form['vud_term_votetable_show'] = array(
    '#type' => 'select',
    '#title' => t('Widget display'),
    '#description' => t('Choose when the voting table will be displayed.'),
    '#default_value' => variable_get('vud_term_votetable_show', 1),
    '#options' => array(
      0 => 'Teaser only',
      1 => 'Full display only',
      2 => 'Both teaser and full',
    ),
  );
  $form['vud_term_reset'] = array(
    '#type' => 'radios',
    '#title' => t('Votes reset'),
    '#description' => t('Choose if users are allowed to reset their vote on a term, on a node.'),
    '#default_value' => variable_get('vud_term_reset', 0),
    '#options' => array(
      0 => 'No',
      1 => 'Yes',
    ),
  );
  return system_settings_form($form);
}