Patch to allow nodecomments print
This commit is contained in:
parent
b70f11745a
commit
80b805f07d
1 changed files with 7 additions and 1 deletions
|
@ -560,7 +560,13 @@ function _print_generate_node($nid, $cid = NULL, $format = PRINT_HTML_FORMAT, $t
|
|||
|
||||
if (function_exists('comment_render') && (($cid != NULL) || ($print_comments))) {
|
||||
// Print only the requested comment (or if $cid is NULL, all of them)
|
||||
$comments = comment_render($node, $cid);
|
||||
// Replace of "$comments = comment_render($node, $cid);" to print node comments:
|
||||
if (!empty($node->comment)) {
|
||||
$comments = comment_render($node, $cid);
|
||||
}
|
||||
else if (!empty($node->node_comment)) {
|
||||
$comments = nodecomment_render($node, $cid);
|
||||
}
|
||||
|
||||
// Remove the comment forms
|
||||
$comments = preg_replace('!<form.*?id="comment-.*?">.*?</form>!sim', '', $comments);
|
||||
|
|
Reference in a new issue