You are here

function talk_nodeapi in Talk 6

Same name and namespace in other branches
  1. 5 talk.module \talk_nodeapi()

Implementation of hook_nodeapi().

File

./talk.module, line 127
Comments are displayed in a separate 'talk' tab, for node types you wish

Code

function talk_nodeapi(&$node, $op) {
  switch ($op) {
    case 'load':
      if (talk_activated($node->type) && arg(0) == 'node' && !arg(2)) {

        // Overwrite setting of comment module and set comments for this node to disabled.
        // This prevents the comments of being displayed.
        $output['comment_original_value'] = $node->comment;
        $output['comment'] = 0;
        return $output;
      }
      break;
  }
}