子比主题文章评论区添加评论用户的六位彩色ID号码

图片[1]-子比主题文章评论区添加评论用户的六位彩色ID号码-阿宅学院

修改文件:
子比主题: zib-comments-list.php (inc/functions/zib-comments-list.php)

找到大概27行的

$user_id = $comment–>user_id;  下面添加

$numStr = strval($user_id);  
   $uesrid_L6 = str_pad($user_id, 6, "0", STR_PAD_LEFT);
  switch (true) {
  //10的整数倍
  case ($user_id%10==0):
      $uid = "<span style='background: linear-gradient(to right, rgb(255, 0, 0) 0%, rgba(0, 0, 255, .8) 50%, rgb(128, 0, 128) 80%); -webkit-background-clip: text;color: transparent;'>   靓号:{$uesrid_L6}</span>";
        break;
    //1-10
    case ($user_id <= 11):
        $uid = "<span style='background: linear-gradient(to right, rgb(255, 0, 0) 0%, rgba(0, 0, 255, .8) 50%, rgb(128, 0, 128) 80%); -webkit-background-clip: text;color: transparent;'>   靓号:{$uesrid_L6}</span>";
        break;
    //100以内对子
    case ($user_id <= 99 && $numStr[0] === $numStr[1]):
        $uid = "<span style='background: linear-gradient(to right, rgb(255, 0, 0) 0%, rgba(0, 0, 255, .8) 50%, rgb(128, 0, 128) 80%); -webkit-background-clip: text;color: transparent;'>   靓号:{$uesrid_L6}</span>";
        break;
    //1000以内炸弹
    case ($user_id <= 999 && $numStr[0] === $numStr[1] && $numStr[1] === $numStr[2]):
        $uid = "<span style='background: linear-gradient(to right, rgb(255, 0, 0) 0%, rgba(0, 0, 255, .8) 50%, rgb(128, 0, 128) 80%); -webkit-background-clip: text;color: transparent;'>   靓号:{$uesrid_L6}</span>";
        break;
    //10000以内4同
    case ($user_id <= 9999 && $numStr[0] === $numStr[1] && $numStr[1] === $numStr[2]&& $numStr[2] === $numStr[3]):
        $uid = "<span style='background: linear-gradient(to right, rgb(255, 0, 0) 0%, rgba(0, 0, 255, .8) 50%, rgb(128, 0, 128) 80%); -webkit-background-clip: text;color: transparent;'>   靓号:{$uesrid_L6}</span>";
        break;
    default:
        $uid = "<span style='background: linear-gradient(to right, rgb(255, 0, 0) 0%, rgba(0, 0, 255, .8) 50%, rgb(128, 0, 128) 80%); -webkit-background-clip: text;color: transparent;'>   ID:{$uesrid_L6}</span>";
        break;
  }

大概在第52行找到

<name class="flex ac flex1">' . $user_name . $badge .'</name>

替换为:

<name class="flex ac flex1">' . $user_name . $badge . $uid.'</name>

    © 版权声明
    THE END
    支持博主,更新加速
    点赞12 分享
    勋章统计

    评论一下 抢沙发

    请登录后发表评论

      请登录后查看评论内容