Guidelines on comment submission - like for node submission

Cvbge - December 31, 2005 - 19:15
Project:Drupal
Version:7.x-dev
Component:comment.module
Category:feature request
Priority:normal
Assigned:Unassigned
Status:patch (code needs work)
Description

This patch adds a textarea on admin/comment/configure. Whatever you enter there will be displayed to the user when replying to a comment. This is similar to what is already possibile for admin/settings/content-types/page

AttachmentSize
comment_guidelines.diff1.29 KB

#1

Jaza - January 17, 2007 - 03:58
Version:x.y.z» 6.x-dev
Status:patch (code needs review)» patch (code needs work)

Interesting feature. Personally, I don't think it's needed, though.

Moving to 6.x-dev queue.

#2

christefanø - January 19, 2007 - 05:36

I disagree that this isn't needed. Countless weblogs and web columns today have posting guidelines and I've always been surprised that Drupal doesn't have built-in support for it.

#3

hpn - April 16, 2007 - 11:45

I agree with christefano. This is a very vital feature.

#4

archetwist - April 27, 2007 - 17:37

It's incredible how long it takes to incorporate such a simple and useful feature.

#5

mki - June 20, 2007 - 10:10
Title:Add guidelines when replying to comment - like for any node type» Guidelines on comment submission - like for node submission

Some changes and update to Drupal HEAD from 2007/06/19.

Please devote your time to review and add this to Drupal core. Thank you.

AttachmentSize
comment.module_78.patch1.05 KB

#6

mki - June 20, 2007 - 15:20
Assigned to:Cvbge» mki

#7

mki - June 20, 2007 - 15:24
Assigned to:mki» Anonymous

Cvbge don't work on it, so I changed assigned person to nobody.

#8

mki - June 22, 2007 - 11:17

In node module we have submission guidelines ($type->help variable) in help system:

<?php
function node_help($section) {
...
  if (
arg(0) == 'node' && arg(1) == 'add' && $type = arg(2)) {
   
$type = node_get_types('type', str_replace('-', '_', arg(2)));
    return
'<p>'. (isset($type->help) ? filter_xss_admin($type->help) : '') .'</p>';
  }
}
?>

But help is at the top of page. On reply submission we will have on page:
(1) help = commend submission guidelines,
(2) node (+comments) / comment
(3) comment form.
Any ideas?

#9

christefanø - January 8, 2008 - 03:38

What I ended up doing is add something like this to template.php:

/**
* Display posting guidelines at the top of comment submission forms.
* It is useful for helping or instructing your users.
*/
function phptemplate_comment_form($form) {
  $output .= '<div>';
  $output .= '<div class="comment_help">Comment guidelines go here.</div>';
  $output .=  drupal_render($form);
  $output .= '</div>';
  return $output;
}

I've written up a more elaborate tutorial that allows editing of the comment guidelines from within Drupal (instead of editing template.php).
Check my drupal.org profile for a link to my Drupal development column.

This is crossposted at http://drupal.org/node/15248 (#comment-242999).

#10

keith.smith - January 8, 2008 - 03:42
Version:6.x-dev» 7.x-dev

This will be a nice feature for 7.x (since 6.x is both string- and feature-frozen).

 
 

Drupal is a registered trademark of Dries Buytaert.