diff options
author | Steven Wittens <steven@10.no-reply.drupal.org> | 2005-02-26 23:53:39 +0000 |
---|---|---|
committer | Steven Wittens <steven@10.no-reply.drupal.org> | 2005-02-26 23:53:39 +0000 |
commit | fb4b224a3762075a89e6afd286970115cedab62f (patch) | |
tree | c43a3b266ce42c5650c5998b97de9bb060718bf6 /modules | |
parent | ca1330ae7cc8db1dfb176f85703a40ed1ce5da5a (diff) | |
download | brdo-fb4b224a3762075a89e6afd286970115cedab62f.tar.gz brdo-fb4b224a3762075a89e6afd286970115cedab62f.tar.bz2 |
#16951: Move forum settings to configure tab (drumm)
Diffstat (limited to 'modules')
-rw-r--r-- | modules/forum.module | 11 | ||||
-rw-r--r-- | modules/forum/forum.module | 11 |
2 files changed, 16 insertions, 6 deletions
diff --git a/modules/forum.module b/modules/forum.module index 9066786de..456b17d92 100644 --- a/modules/forum.module +++ b/modules/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; 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; |