node_comment_mode

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

modules/node/node.module, строка 1096

Версии
5 – 6
node_comment_mode($nid)

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

▾ 4 функции вызывают node_comment_mode()

comment_links in modules/comment/comment.module
comment_render in modules/comment/comment.module
Отображает комментарии.
comment_reply in modules/comment/comment.module
This function is responsible for generating a comment reply form. There are several cases that have to be handled, including: replies to comments replies to nodes attempts to reply to nodes that can no longer accept comments respecting access...
comment_save in modules/comment/comment.module
Сохраняет новый или измененный комментарий.

Код

<?php
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];
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему