diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 393318a..da6d9b1 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_guidelines'] = array( + '#type' => 'textarea', + '#title' => t('Explanation or submission guidelines'), + '#default_value' => variable_get('comment_guidelines_' . $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.') + ); } } @@ -1901,6 +1907,14 @@ function comment_form($form, &$form_state, $comment) { $date = ''; } + // Display the comment help if specified. + if (variable_get('comment_guidelines_' . $form['#node']->type, '')) { + $form['help'] = array( + '#markup' => '
' . variable_get('comment_help_' . $form['#node']->type, '') . '
', + '#weight' => -5, + ); + } + // Add the author name field depending on the current user. if ($is_admin) { $form['author']['name'] = array(