废话不多说 好了开始教程! 略略略略.....
在模板中module.php文件中找到评论列表函数
function blog_comments($comments)
替换
function blog_comments($comments,$params)
找到$isGravatar = Option::get('isgravatar');并在后面添加代码
$comnum = count($comments);
foreach($comments as $value){
if($value['pid'] != 0){
$comnum--;
}
}
$page = isset($params[5])?intval($params[5]):1;
$i= $comnum - ($page - 1)*Option::get('comment_pnum');
找到评论列表尾部
<?php endforeach; ?>
替换
<?php echo $i.'楼'; ?>
修改子评论
<?php blog_comments_children($comments, $comment['children']); ?>
替换
<?php blog_comments_children($comments, $comment['children'],$i,0); ?>
接下来
$comment = $comments[$child];
下面添加
$x=$x+1;
继续
function blog_comments_children($comments, $children)
替换
function blog_comments_children($comments, $children,$i,$x)
继续
<?php blog_comments_children($comments, $comment['children']); ?>
替换
<?php blog_comments_children($comments, $comment['children'],$i,$x); ?>
最后在你想加的位置添加
<?php echo $i.'-'.$x.'楼'; ?>
最后把echo_log.php和page.php两个文件中调用评论的函数
<?php blog_comments($comments);>
替换
<?php blog_comments($comments,$params); ?>
PS:终于好了!