You are here

function forum_admin_configure in Drupal 4

Implementation of hook_settings

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

File

modules/forum.module, line 177
Enable threaded discussions about general topics.

Code

function forum_admin_configure() {
  $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('The default number of topics displayed per page; links to browse older messages are automatically being displayed.'),
  );
  $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('The default display order for topics.'),
  );
  return system_settings_form('forum_admin_configure', $form);
}