You are here

function plus1_settings in Plus 1 6

Same name and namespace in other branches
  1. 6.2 plus1.admin.inc \plus1_settings()
  2. 7 plus1.admin.inc \plus1_settings()

Menu callback to configure module settings.

1 string reference to 'plus1_settings'
plus1_menu in ./plus1.module
Implementation of hook_menu().

File

./plus1.module, line 40
A simple +1 voting widget module.

Code

function plus1_settings() {
  $form['plus1_nodetypes_fieldset'] = array(
    '#type' => 'fieldset',
    '#title' => t('Content type settings'),
    '#description' => t('Select all node types to which a +1 voting widget can be added.'),
  );
  $form['plus1_nodetypes_fieldset']['plus1_nodetypes'] = array(
    '#type' => 'checkboxes',
    '#options' => node_get_types('names'),
    '#default_value' => variable_get('plus1_nodetypes', array(
      'story',
    )),
  );
  $form['plus1_display'] = array(
    '#type' => 'fieldset',
    '#title' => t('Display settings'),
    '#description' => t('You may select none, one or both options.'),
  );
  $form['plus1_display']['plus1_in_teaser'] = array(
    '#type' => 'checkbox',
    '#title' => t('Add a +1 voting widget to the node in teaser view.'),
    '#default_value' => variable_get('plus1_in_teaser', 0),
  );
  $form['plus1_display']['plus1_in_full_view'] = array(
    '#type' => 'checkbox',
    '#title' => t('Add a +1 voting widget to the node in full view.'),
    '#default_value' => variable_get('plus1_in_full_view', 1),
  );
  $form['array_filter'] = array(
    '#type' => 'hidden',
  );
  return system_settings_form($form);
}