Typecho自定义评论样式
No Reply , Posted in 代码 on April 12, 2014
可以设置自定义的评论样式,具体代码如下:
siteUrl . 'usr/themes/thinkH/images/pingback.jpg'; $author = ''.$comments->author.''; $depth = $comments->levels +1; if($depth<=1){ $size = (int) Helper::options()->commentsPageSize; $curr = (int) $comments->currentPage;//这个数值为0,暂不清楚是干什么的,但我需要一个输出当前页数的函数!!! $cn = (int) $comments->sequence; $n = $cn + $curr*$size; $floor = 'For All '.$n.' The-FatherC'; // 主楼层 }else{ $floor = ($depth-1).'#InnerC'; // 子楼层 $style = 'style="margin-left:' . ceil(5/$depth) . 'px;"'; } ?>
content(); ?>
children) { ?>threadedComments($singleCommentOptions); ?>