function alinks_admin_settings in Alinks 7
Same name and namespace in other branches
- 6 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 79 - this module allows users to associates defined text to links
Code
function alinks_admin_settings() {
// Get node types and create array for options field
$types = node_type_get_types();
$types_options = array();
foreach ($types as $k => $v) {
$types_options[$k] = $v->name;
}
$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' => $types_options,
'#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);
}