Patch to allow nodecomments print

This commit is contained in:
Manuel Cillero 2017-07-26 19:34:08 +02:00
parent b70f11745a
commit 80b805f07d

View file

@ -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);