diff options
Diffstat (limited to 'modules/forum/forum.module')
-rw-r--r-- | modules/forum/forum.module | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/modules/forum/forum.module b/modules/forum/forum.module index 9066786de..456b17d92 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -271,7 +271,9 @@ function _forum_get_vid() { /** * Implementation of hook_settings */ -function forum_settings() { +function forum_admin_configure() { + system_settings_save(); + $output .= form_textfield(t('Forum icon path'), 'forum_icon_path', variable_get('forum_icon_path', ''), 30, 255, t('The path to the forum icons. Leave blank to disable icons. Don\'t add a trailing slash. Default icons are available in the "misc" directory. You may use images of whatever size you wish, but it is recommended to use 15x15 or 16x16. ')); $number = drupal_map_assoc(array(5, 10, 15, 20, 25, 30, 35, 40, 50, 60, 80, 100, 10000)); $output .= form_select(t('Hot topic threshold'), 'forum_hot_topic', variable_get('forum_hot_topic', 15), $number, t('The number of posts a topic must have to be considered hot.')); @@ -280,7 +282,7 @@ function forum_settings() { $forder = array(1 => t('Date - newest first'), 2 => t('Date - oldest first'), 3 => t('Posts - most active first'), 4=> t('Posts - least active first')); $output .= form_radios(t('Default order'), 'forum_order', variable_get('forum_order', '1'), $forder, t('The default display order for topics.')); - return $output; + print theme('page', system_settings_form($output)); } /** @@ -416,7 +418,10 @@ function forum_menu($may_cache) { $items[] = array('path' => 'admin/forum/add/forum', 'title' => t('add forum'), 'access' => user_access('administer forums'), 'type' => MENU_LOCAL_TASK); - + $items[] = array('path' => 'admin/forum/configure', 'title' => t('configure'), + 'callback' => 'forum_admin_configure', + 'access' => user_access('administer forums'), + 'type' => MENU_LOCAL_TASK); } return $items; |