function recently_read_settings in Recently Read 7.2
Same name and namespace in other branches
- 6 recently_read.module \recently_read_settings()
- 7.3 recently_read.module \recently_read_settings()
- 7 recently_read.module \recently_read_settings()
Menu callback: Recently read admin settings form page. Form builder; Configure recently read settings.
1 string reference to 'recently_read_settings'
- recently_read_menu in ./
recently_read.module - Implements hook_menu().
File
- ./
recently_read.admin.inc, line 12 - Functionality for Recently read administration.
Code
function recently_read_settings($form, &$form_state) {
$types = node_type_get_types();
$options = array();
foreach ($types as $key => $type) {
$options[$key] = $type->name;
}
$form['node_types'] = array(
'#type' => 'checkboxes',
'#title' => t('Enable history tracking of the following content'),
'#description' => t('Select which content types will be tracked.'),
'#default_value' => variable_get('recently_read_node_types', array(
'page',
'article',
)),
'#options' => $options,
);
$form['anonymous_enabled'] = array(
'#type' => 'checkbox',
'#title' => t('Enable history tracking also for anonymous users'),
'#description' => t('If disabled, login is required to view recently read block.'),
'#default_value' => variable_get('recently_read_anonymous_enabled', FALSE),
);
$form['max_entries'] = array(
'#type' => 'textfield',
'#title' => t('Recently read list length'),
'#description' => 'Provide the maximum number of entires stored for each read content type (per user) in the database.',
'#default_value' => variable_get('recently_read_max_entries', 10),
'#required' => TRUE,
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Save configuration'),
);
return $form;
}