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
| Attachment | Size |
|---|---|
| comment_guidelines.diff | 1.29 KB |

#1
Interesting feature. Personally, I don't think it's needed, though.
Moving to 6.x-dev queue.
#2
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
I agree with christefano. This is a very vital feature.
#4
It's incredible how long it takes to incorporate such a simple and useful feature.
#5
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.
#6
#7
Cvbge don't work on it, so I changed assigned person to nobody.
#8
In node module we have submission guidelines ($type->help variable) in help system:
<?phpfunction 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
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
This will be a nice feature for 7.x (since 6.x is both string- and feature-frozen).