You are here

function node_comment_mode in Drupal 6

Same name and namespace in other branches
  1. 4 modules/node.module \node_comment_mode()
  2. 5 modules/node/node.module \node_comment_mode()

Retrieve the comment mode for the given node ID (none, read, or read/write).

4 calls to node_comment_mode()
comment_links in modules/comment/comment.module
Build command links for a comment (e.g.\ edit, reply, delete) with respect to the current user's access permissions.
comment_render in modules/comment/comment.module
Renders comment(s).
comment_reply in modules/comment/comment.pages.inc
This function is responsible for generating a comment reply form. There are several cases that have to be handled, including:
comment_save in modules/comment/comment.module
Accepts a submission of new or changed comment content.

File

modules/node/node.module, line 1364
The core that allows content to be submitted to the site. Modules and scripts may programmatically submit nodes using the usual form API pattern.

Code

function node_comment_mode($nid) {
  static $comment_mode;
  if (!isset($comment_mode[$nid])) {
    $comment_mode[$nid] = db_result(db_query('SELECT comment FROM {node} WHERE nid = %d', $nid));
  }
  return $comment_mode[$nid];
}