Typecho自定义评论样式

typecho教程 2020-08-25

  可以设置自定义评论样式,具体代码如下:

  

  function threadedComments($comments,$singleCommentOptions) {

  $imgUrl = Helper::options()->siteUrl . ‘usr/themes/thinkH/images/pingback.jpg’;

  $author = ‘url.'” rel=”external nofollow” target=”_blank”>’.$comments->author.”;

  $depth = $comments->levels +1;

  if($depth

  $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;”‘;

  }

  ?>

  

  • theId(); ?>”>

      

    “>

      

      

      $tLC = (Helper::options()->ShGravatar)?(Helper::options()->ShGravatar):0;

      if ($tLC == 0) {

      ?>

      

      

      gravatar(32, ‘identicon’, ‘X’, ‘avatar’); ?>

      mail); ?>date(‘Y-m-d H:i:s’) ?>

      This

      levels == 0): ?>

      sequence == 1): ?>沙发

      sequence == 2): ?>板凳

      sequence == 3): ?>地毯

      sequence == 4): ?>门口

      sequence == 5): ?>走廊

      sequence == 6): ?>楼梯

      sequence == 7): ?>宅院

      sequence == 8): ?>小区

      sequence == 9): ?>街道

      

      第sequence(); ?>号大院

      

      

      

      reply(‘reply’); ?>

      

      

      [agent)?> @ agent)?>]

      

      

      

    content(); ?>

      

  •   

      children) { ?>threadedComments($singleCommentOptions); ?>

      

      

      

      

      }

      ?>

    评论 (0)
      Top