aggregator_admin_settings

5 aggregator.module aggregator_admin_settings()
6 aggregator.admin.inc aggregator_admin_settings()

Form builder; Configure the aggregator system.

See also

system_settings_form()

Related topics

1 string reference to 'aggregator_admin_settings'

File

modules/aggregator/aggregator.admin.inc, line 233
Admin page callbacks for the aggregator module.

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('A space-separated list of HTML tags allowed in the content of feed items. (Tags in this list are not 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('Number of feed items displayed in feed and category summary pages.'),
  );

  $form['aggregator_clear'] = array(
    '#type' => 'select', 
    '#title' => t('Discard items older than'), 
    '#default_value' => variable_get('aggregator_clear', 9676800), 
    '#options' => $period, 
    '#description' => t('The length of time to retain feed items before discarding. (Requires a correctly configured <a href="@cron">cron maintenance task</a>.)', array('@cron' => url('admin/reports/status'))),
  );

  $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 displayed on categorization pages. (For a small number of categories, checkboxes are easier to use, while a multiple selector work well with large numbers of categories.)'),
  );

  return system_settings_form($form);
}
Login or register to post comments