You are here

function aggregator_admin_settings in Drupal 5

Same name and namespace in other branches
  1. 6 modules/aggregator/aggregator.admin.inc \aggregator_admin_settings()
1 string reference to 'aggregator_admin_settings'
aggregator_menu in modules/aggregator/aggregator.module
Implementation of hook_menu().

File

modules/aggregator/aggregator.module, line 196
Used to aggregate syndicated content (RSS, RDF, and Atom).

Code

function aggregator_admin_settings() {
  $items = array(
    0 => t('none'),
  ) + drupal_map_assoc(array(
    3,
    5,
    10,
    15,
    20,
    25,
  ), '_aggregator_items');
  $period = drupal_map_assoc(array(
    3600,
    10800,
    21600,
    32400,
    43200,
    86400,
    172800,
    259200,
    604800,
    1209600,
    2419200,
    4838400,
    9676800,
  ), 'format_interval');
  $form['aggregator_allowed_html_tags'] = array(
    '#type' => 'textfield',
    '#title' => t('Allowed HTML tags'),
    '#size' => 80,
    '#maxlength' => 255,
    '#default_value' => variable_get('aggregator_allowed_html_tags', '<a> <b> <br> <dd> <dl> <dt> <em> <i> <li> <ol> <p> <strong> <u> <ul>'),
    '#description' => t('The list of tags which are allowed in feeds, i.e., which will not be removed by Drupal.'),
  );
  $form['aggregator_summary_items'] = array(
    '#type' => 'select',
    '#title' => t('Items shown in sources and categories pages'),
    '#default_value' => variable_get('aggregator_summary_items', 3),
    '#options' => $items,
    '#description' => t('The number of items which will be shown with each feed or category in the feed and category summary pages.'),
  );
  $form['aggregator_clear'] = array(
    '#type' => 'select',
    '#title' => t('Discard news items older than'),
    '#default_value' => variable_get('aggregator_clear', 9676800),
    '#options' => $period,
    '#description' => t('Older news items will be automatically discarded. Requires crontab.'),
  );
  $form['aggregator_category_selector'] = array(
    '#type' => 'radios',
    '#title' => t('Category selection type'),
    '#default_value' => variable_get('aggregator_category_selector', 'checkboxes'),
    '#options' => array(
      'checkboxes' => t('checkboxes'),
      'select' => t('multiple selector'),
    ),
    '#description' => t('The type of category selection widget which is shown on categorization pages. Checkboxes are easier to use; a multiple selector is good for working with large numbers of categories.'),
  );
  return system_settings_form($form);
}