? files
? modules/comment/comment.admin.js
? sites/all/modules
? sites/default/settings.php
Index: modules/comment/comment.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v
retrieving revision 1.587
diff -u -F^f -r1.587 comment.module
--- modules/comment/comment.module	7 Oct 2007 19:25:57 -0000	1.587
+++ modules/comment/comment.module	10 Oct 2007 15:46:40 -0000
@@ -480,28 +480,32 @@ function comment_form_alter(&$form, $for
       '#options' => array(t('Disabled'), t('Read only'), t('Read/Write')),
       '#description' => t('Users with the <em>administer comments</em> permission will be able to override this setting.'),
     );
-    $form['comment']['comment_default_mode'] = array(
+    $form['comment']['advanced'] = array(
+      '#prefix' => '<div id="comment-advanced-settings">',
+      '#suffix' => '</div>',
+    );
+    $form['comment']['advanced']['comment_default_mode'] = array(
       '#type' => 'radios',
       '#title' => t('Default display mode'),
       '#default_value' => variable_get('comment_default_mode_'. $form['#node_type']->type, COMMENT_MODE_THREADED_EXPANDED),
       '#options' => _comment_get_modes(),
       '#description' => t('The default view for comments. Expanded views display the body of the comment. Threaded views keep replies together.'),
     );
-    $form['comment']['comment_default_order'] = array(
+    $form['comment']['advanced']['comment_default_order'] = array(
       '#type' => 'radios',
       '#title' => t('Default display order'),
       '#default_value' => variable_get('comment_default_order_'. $form['#node_type']->type, COMMENT_ORDER_NEWEST_FIRST),
       '#options' => _comment_get_orders(),
       '#description' => t('The default sorting for new users and anonymous users while viewing comments. These users may change their view using the comment control panel. For registered users, this change is remembered as a persistent user preference.'),
     );
-    $form['comment']['comment_default_per_page'] = array(
+    $form['comment']['advanced']['comment_default_per_page'] = array(
       '#type' => 'select',
       '#title' => t('Default comments per page'),
       '#default_value' => variable_get('comment_default_per_page_'. $form['#node_type']->type, 50),
       '#options' => _comment_per_page(),
       '#description' => t('Default number of comments for each page: more comments are distributed in several pages.'),
     );
-    $form['comment']['comment_controls'] = array(
+    $form['comment']['advanced']['comment_controls'] = array(
       '#type' => 'radios',
       '#title' => t('Comment controls'),
       '#default_value' => variable_get('comment_controls_'. $form['#node_type']->type, COMMENT_CONTROLS_HIDDEN),
@@ -512,7 +516,7 @@ function comment_form_alter(&$form, $for
         t('Do not display')),
       '#description' => t('Position of the comment controls box. The comment controls let the user change the default display mode and display order of comments.'),
     );
-    $form['comment']['comment_anonymous'] = array(
+    $form['comment']['advanced']['comment_anonymous'] = array(
       '#type' => 'radios',
       '#title' => t('Anonymous commenting'),
       '#default_value' => variable_get('comment_anonymous_'. $form['#node_type']->type, COMMENT_ANONYMOUS_MAYNOT_CONTACT),
@@ -525,26 +529,28 @@ function comment_form_alter(&$form, $for
     if (!user_access('post comments', user_load(array('uid' => 0)))) {
       $form['comment']['comment_anonymous']['#disabled'] = TRUE;
     }
-    $form['comment']['comment_subject_field'] = array(
+    $form['comment']['advanced']['comment_subject_field'] = array(
       '#type' => 'radios',
       '#title' => t('Comment subject field'),
       '#default_value' => variable_get('comment_subject_field_'. $form['#node_type']->type, 1),
       '#options' => array(t('Disabled'), t('Enabled')),
       '#description' => t('Can users provide a unique subject for their comments?'),
     );
-    $form['comment']['comment_preview'] = array(
+    $form['comment']['advanced']['comment_preview'] = array(
       '#type' => 'radios',
       '#title' => t('Preview comment'),
       '#default_value' => variable_get('comment_preview_'. $form['#node_type']->type, COMMENT_PREVIEW_REQUIRED),
       '#options' => array(t('Optional'), t('Required')),
       '#description' => t("Forces a user to look at their comment by clicking on a 'Preview' button before they can actually add the comment"),
     );
-    $form['comment']['comment_form_location'] = array(
+    $form['comment']['advanced']['comment_form_location'] = array(
       '#type' => 'radios',
       '#title' => t('Location of comment submission form'),
       '#default_value' => variable_get('comment_form_location_'. $form['#node_type']->type, COMMENT_FORM_SEPARATE_PAGE),
       '#options' => array(t('Display on separate page'), t('Display below post or comments')),
     );
+    drupal_add_js(drupal_get_path('module', 'comment') .'/comment.admin.js');
+    drupal_add_js(array('commentsDisabled' => COMMENT_NODE_DISABLED), 'setting');
   }
   elseif (isset($form['type']) && isset($form['#node'])) {
     if ($form['type']['#value'] .'_node_form' == $form_id) {
