After posting a comment, users are forwarded to /whatevernode#comment. For a particular setup I'm doing on a drupal site, I need users to be forwarded to /comment/whatevernode instead. What would be the easiest way to accomplish this?

Comments

tdailey’s picture

In drupal 4.6.5, look at the bottom of comment_post in comment.module, you'll see:

<?php
      // Explain the approval queue if necessary, and then
      // redirect the user to the node he's commenting on.
      if ($status == 1) {
        drupal_set_message(t('Your comment has been queued for moderation by site administrators and will be published after approval.'));
        drupal_goto('node/'. $edit['nid']);
      }
      else {
        drupal_goto('node/'. $edit['nid'], NULL,  'comment-'. $edit['cid']);
      }
?>

That's the part that takes the user to the comment, just edit that to your taste.