/** * 输出评论 * @param Comment[] $comment_list 评论列表 * @param int $deep 深度 */ public function show_comment($comment_list = NULL, $deep = 1) { if ($comment_list === NULL) { $comment_list =& $this->comment_top_list; } $deep = intval($deep); if ($deep === 1) { $deep_class = " comment-reply-top"; } else { if ($deep > 1 && $deep <= comment_deep()) { $deep_class = " comment-reply-deep"; } else { $deep_class = ""; } } foreach ($comment_list as &$v) { echo "<div id='Comment-id-", $v->getCommentId(), "' class='comment-list{$deep_class}'>\n"; $this->__view($this->view_path . "/" . $this->view_style . "comment.php", ['comment' => &$v]); $sub = $v->getSubNode(); if (count($sub) > 0) { $this->show_comment($sub, $deep + 1); } echo "</div>\n"; } }
<input type="number" name="comment_one_page" class="form-control" value="<?php echo comment_one_page(); ?> " id="CommentOnePage" placeholder="数量"> <p class="help-block">评论每页显示的顶级评论数量</p> </div> </div> <div class="form-group"> <label for="CommentOnePage" class="col-sm-2 control-label">评论嵌套数</label> <div class="col-sm-10"> <input type="number" name="comment_deep" class="form-control" value="<?php echo comment_deep(); ?> " id="CommentDeep" placeholder="最大层数"> <p class="help-block">评论CSS最大的嵌套层数</p> </div> </div> <div class="form-group"> <label for="inputAvatar" class="col-sm-2 control-label">网站默认头像</label> <div class="col-sm-10"> <select name="default_avatar" class="form-control"> <option value="default"<?php echo strtolower(default_avatar_config()) == "default" ? " selected" : "";