You are here

function forum_admin_settings in Drupal 6

Same name and namespace in other branches
  1. 5 modules/forum/forum.module \forum_admin_settings()
  2. 7 modules/forum/forum.admin.inc \forum_admin_settings()

Form builder for the forum settings page.

See also

system_settings_form()

1 string reference to 'forum_admin_settings'
forum_menu in modules/forum/forum.module
Implementation of hook_menu().

File

modules/forum/forum.admin.inc, line 187
Administrative page callbacks for the forum module.

Code

function forum_admin_settings() {
  $form = array();
  $number = drupal_map_assoc(array(
    5,
    10,
    15,
    20,
    25,
    30,
    35,
    40,
    50,
    60,
    80,
    100,
    150,
    200,
    250,
    300,
    350,
    400,
    500,
  ));
  $form['forum_hot_topic'] = array(
    '#type' => 'select',
    '#title' => t('Hot topic threshold'),
    '#default_value' => variable_get('forum_hot_topic', 15),
    '#options' => $number,
    '#description' => t('The number of posts a topic must have to be considered "hot".'),
  );
  $number = drupal_map_assoc(array(
    10,
    25,
    50,
    75,
    100,
  ));
  $form['forum_per_page'] = array(
    '#type' => 'select',
    '#title' => t('Topics per page'),
    '#default_value' => variable_get('forum_per_page', 25),
    '#options' => $number,
    '#description' => t('Default number of forum topics displayed per page.'),
  );
  $forder = array(
    1 => t('Date - newest first'),
    2 => t('Date - oldest first'),
    3 => t('Posts - most active first'),
    4 => t('Posts - least active first'),
  );
  $form['forum_order'] = array(
    '#type' => 'radios',
    '#title' => t('Default order'),
    '#default_value' => variable_get('forum_order', '1'),
    '#options' => $forder,
    '#description' => t('Default display order for topics.'),
  );
  return system_settings_form($form);
}