function talk_comment in Talk 6
Same name and namespace in other branches
- 5 talk.module \talk_comment()
Implementation of hook_comment(). Changing the destination to the talk page after posting a comment.
File
- ./
talk.module, line 215 - Comments are displayed in a separate 'talk' tab, for node types you wish
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';
}
}
}