You are here

function talk_comment in Talk 5

Same name and namespace in other branches
  1. 6 talk.module \talk_comment()

Implementation of hook_comment() Changing the destination to the talk page after posting a comment

File

./talk.module, line 149
Comments are displayed in a separate 'talk' tab, for node types you wish Made for Drupal 5.x

Code

function talk_comment($a1, $op) {
  if ($op == 'insert' || $op == 'update') {
    $nid = $a1['nid'];
    $node = node_load($nid);
    if (talk_activated($node->type)) {
      $_REQUEST['destination'] = 'node/' . $a1['nid'] . '/talk';
    }
  }
}