| 1 |
<?php
|
| 2 |
// $Id: atom.admin.inc,v 1.1 2009/09/21 15:39:52 davereid Exp $
|
| 3 |
|
| 4 |
/**
|
| 5 |
* @file
|
| 6 |
* Administrative page callbacks for the atom module.
|
| 7 |
*/
|
| 8 |
|
| 9 |
/**
|
| 10 |
* Administration settings form.
|
| 11 |
*
|
| 12 |
* @see system_settings_form()
|
| 13 |
*/
|
| 14 |
function atom_settings_form() {
|
| 15 |
$form['atom_feed_entries'] = array(
|
| 16 |
'#type' => 'select',
|
| 17 |
'#title' => t('Maximum number of entries to include in feeds'),
|
| 18 |
'#default_value' => 15,
|
| 19 |
'#options' => drupal_map_assoc(range(1, 100))
|
| 20 |
);
|
| 21 |
$form['atom_display_summary'] = array(
|
| 22 |
'#type' => 'checkbox',
|
| 23 |
'#title' => t('Output the summary (teaser)'),
|
| 24 |
'#default_value' => TRUE,
|
| 25 |
);
|
| 26 |
$form['atom_display_content'] = array(
|
| 27 |
'#type' => 'checkbox',
|
| 28 |
'#title' => t('Output the full content (body)'),
|
| 29 |
'#default_value' => TRUE,
|
| 30 |
);
|
| 31 |
|
| 32 |
_atom_contrib_load();
|
| 33 |
$extra = module_invoke_all('atom_admin_settings');
|
| 34 |
if (count($extra) > 0) {
|
| 35 |
$form['extra'] = $extra;
|
| 36 |
$form['extra']['#type'] = 'fieldset';
|
| 37 |
$form['extra']['#title'] = t('Extra module settings');
|
| 38 |
}
|
| 39 |
|
| 40 |
return system_settings_form($form);
|
| 41 |
}
|