You are here

function alinks_admin_settings in Alinks 6

Same name and namespace in other branches
  1. 7 alinks.module \alinks_admin_settings()
1 string reference to 'alinks_admin_settings'
alinks_menu in ./alinks.module
Implementation of hook_menu().

File

./alinks.module, line 71

Code

function alinks_admin_settings() {
  $form['alinks_settings'] = array(
    '#type' => 'fieldset',
    '#title' => t('Alinks Settings'),
    '#collapsible' => FALSE,
  );
  $form['alinks_settings']['alinks_node_types'] = array(
    '#type' => 'fieldset',
    '#title' => t('Alinks node types'),
    '#description' => t('Choose the node types into which alinks will automatically insert links.'),
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
  );
  $form['alinks_settings']['alinks_node_types']['alinks_node_types'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Alinks node types'),
    '#description' => t('Select node types'),
    '#options' => node_get_types('names'),
    '#default_value' => variable_get('alinks_node_types', array()),
  );
  $form['alinks_settings']['alinks_limit'] = array(
    '#type' => 'textfield',
    '#size' => 5,
    '#maxlenghth' => 3,
    '#title' => t('Alinks limit'),
    '#description' => t('Set the maxium instances an alink can replace. Use -1 if you want all instances in the node to be replaced.'),
    '#default_value' => variable_get('alinks_limit', 1),
  );
  return system_settings_form($form);
}