Approval is needed to publish anonymous users' comment. While anonymous users cannot see their comment right away after submission, they simply make duplicate submissions. (Yes there is system message to tell them approval is needed, but seems we need a more obvious way to catch attention from human eyes)

I tired the Trigger and Action function to redirect users to "thank you page" after posting a comment so that anonymous users are alerted not to make duplications. However, trigger do not allow me to select anonymous user only and logged in users were also redirected.

So,

- how can I redirect anonymous users only after they submitted a comment?

alternatively,

- is it possible to render a link to go back to the node from the "thank you page" ? I tried :

<a href="<?php echo $_SERVER['HTTP_REFERER'];?>" onClick="history.go(-1); return false;">Go Back</a>

but sometimes they're replying to another comment and thus the "go back link" carry them to the comment/reply page, similar to this situation: http://drupal.org/node/345404

Comments

shawnmeng’s picture

In your custom module, call hook_comment(). http://api.drupal.org/api/function/hook_comment/6

Here is an example:

function yourmodule_comment (&$a1, $op) {
  global $user;
  if ($op == 'insert' && $user->uid == 0){
    drupal_goto('the_thanks_page_url');
  }
}

Anyway, if you have deploy some cache module like boost, it may not work to anonymous user, since the cache system provide the anonymous users cached static pages.