You are here

function fivestar_settings in Fivestar 7.2

Same name and namespace in other branches
  1. 5 fivestar.module \fivestar_settings()
  2. 6.2 includes/fivestar.admin.inc \fivestar_settings()
  3. 6 fivestar.module \fivestar_settings()

Callback function for admin/settings/fivestar. Display the settings form.

1 string reference to 'fivestar_settings'
fivestar_menu in ./fivestar.module
Implements hook_menu().

File

includes/fivestar.admin.inc, line 11
Configuration pages for Fivestar module.

Code

function fivestar_settings($form, $form_state) {
  $form['tags'] = array(
    '#tree' => FALSE,
    '#type' => 'fieldset',
    '#title' => t('Voting tags'),
    '#description' => t('Choose the voting tags that will be available for node rating. A tag is simply a category of vote. If you only need to rate one thing per node, leave this as the default "vote".'),
    '#weight' => 3,
  );
  $form['tags']['tags'] = array(
    '#type' => 'textfield',
    '#title' => t('Tags'),
    '#default_value' => variable_get('fivestar_tags', 'vote'),
    '#required' => TRUE,
    '#description' => t('Separate multiple tags with commas.'),
  );
  $form['#submit'][] = 'fivestar_settings_submit';
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Save configuration'),
    '#weight' => 45,
  );
  return $form;
}