?> <div class="links"> <?php print $links; ?> </div> <?php } ?> <?php if ($node_bottom && !$teaser) { ?> <div id="node-bottom"> <?php print $node_bottom; ?> </div> <?php } ?> </div> <!-- /node-<?php print $node->nid; ?> --> <?php if (user_access('post comments')) { print comment_form_box(array('nid' => $node->nid), 'Комментарий'); }
/** * Renders a comment form. * * @param $node * The node which comment(s) needs rendering. * @param $form * Which form should be rendered: 'comment_form' or 'comment_controls'. */ function comment_display_comment_form_render($node, $form = 'comment') { $output = ''; $nid = $node->nid; $mode = _comment_get_display_setting('mode', $node); $order = _comment_get_display_setting('sort', $node); $comments_per_page = _comment_get_display_setting('comments_per_page', $node); if ($form == 'comment_form') { // If enabled, show new comment form if it's not already being displayed. $reply = arg(0) == 'comment' && arg(1) == 'reply'; if (user_access('post comments') && node_comment_mode($nid) == COMMENT_NODE_READ_WRITE && variable_get('comment_form_location_' . $node->type, COMMENT_FORM_SEPARATE_PAGE) == COMMENT_FORM_BELOW && !$reply) { $output .= comment_form_box(array('nid' => $nid), t('Post new comment')); } } elseif ($form == 'comment_controls') { $output .= drupal_get_form('comment_controls', $mode, $order, $comments_per_page); } return $output; }
<div class="source_and_time"><?php print $source_link; ?> | <?php print $time_ago; ?> </div><!--/source and date--> <div id="node-content"><?php print node_teaser(strip_tags($node->content['body']['#value'], '<a><b>')); ?> </div> <?php if (arg(0) == 'node' && is_numeric(arg(1))) { ?> <div id="visible-comments"> <h2>Comments:</h2> <?php print comment_render($node); ?> </div> <?php print comment_form_box(array('nid' => $node->nid), t('Post new comment')); ?> <?php } ?> </div><!--/ #mentions-detail-->