diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 393318a..f11ded6 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -1180,6 +1180,12 @@ function comment_form_node_type_form_alter(&$form, $form_state) { DRUPAL_REQUIRED => t('Required'), ), ); + $form['comment']['comment_help'] = array( + '#type' => 'textarea', + '#title' => t('Explanation or submission guidelines'), + '#default_value' => variable_get('comment_help_' . $form['#node_type']->type, ''), + '#description' => t('This text will be displayed at the top of the comment submission form. It is useful for helping or instructing your users.') + ); } } @@ -1975,6 +1981,14 @@ function comment_form($form, &$form_state, $comment) { '#access' => $is_admin, ); + // Display the comment help if specified. + if (variable_get('comment_help_' . $form['#node']->type, '')) { + $form['help'] = array( + '#markup' => '

' . variable_get('comment_help_' . $form['#node']->type, '') . '

', + '#weight' => -2, + ); + } + $form['subject'] = array( '#type' => 'textfield', '#title' => t('Subject'),