modules/node/node.module, строка 1338
- 5 – 6
node_comment_mode($nid)
Retrieve the comment mode for the given node ID (none, read, or read/write).
Retrieve the comment mode for the given node ID (none, read, or read/write).
- comment_links in modules/comment/comment.module
- Формирует управляющие ссылки для комментариев (редактировать, ответить, удалить) на основе прав доступа для текущего пользователя.
- comment_render in modules/comment/comment.module
- Отображает комментарии.
- 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:
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];
}
?>
Войдите или
зарегистрируйтесь, чтобы получить возможность отправлять комментарии