Community & Support

Telling users their comment will go into the moderation queue *before* they post

I have comment moderation turned on, and I get a lot of duplicate comments, presumably from people who think posting the comment didn't work. They don't see the message at the top of the page, because they are redirected to a place at the bottom.

So I am wondering if there is a chance to add a message to the comment input form telling them that posted comments will not show up immediately before they hit "submit". Is there a chance to add that without hacking the comment module? Is there perhaps a provision for this in 5.0? I can't update right now, so a solution for 4.7 would still be appreciated.

Comments

In your theme directory, put

In your theme directory, put the code below in template.php (if you don't have template.php, make one).

<?php
function phptemplate_comment_form($form) {
 
$output = '<br />WRITE WHAT YOU WANT HERE.';
 
$output .= form_render($form);
  return
$output;
}
?>

Thanks!

Thanks for the quick help! That works beautifully.

EagerEyes.org

A re-arrangement...

Thanks for this snippet. It does the job for me also.

I just altered it slightly so as to put the message at the end of the form, just under the submit button as it seems more prominent there. I also included a styling tag so as to be able to give a background color (or whatever) to make the message unmissable. Thanks.

<?php
function phptemplate_comment_form($form) { 
 
$output = form_render($form);
 
$output .= "<div class=\"message_highlight\">Your comment will be queued for moderation, and may not show up immediately.</div>";
  return
$output;
}
?>

subscribing

subscribing

How in D6?

How in D6?

Still waiting for the D6

Still waiting for the D6 version...;)

the code supplied is a

the code supplied is a function, how/where can we call that function? can we add the code anywhere in the template.php file?

Just use the warning module

Just use the warning module to display any messages after you submit a comment.
http://drupal.org/project/warning

nobody click here