ecshop购买记录和评论的用户名使用如下方式缩写:e***p

效果如下:

找到includes/lib_insert.php
如下代码:

$bought_notes[$key][‘add_time’] = local_date(“Y-m-d G:i:s”, $val[‘add_time’]);

在其下面添加这个:
$bought_notes[$key][‘user_name’] = mb_substr($val[‘user_name’], 0, 1, ‘utf-8′).’***’. mb_substr($val[‘user_name’], -1, 1, ‘utf-8’);
这是修改的购买记录!

找到includes/lib_main.php

$arr[$row[‘comment_id’]][‘username’] = $row[‘user_name’];
将其替换为:
$arr[$row[‘comment_id’]][‘username’] = mb_substr($row[‘user_name’], 0, 1, ‘utf-8′).’***’. mb_substr($row[‘user_name’], -1, 1, ‘utf-8’);
Ok了,大功告成!!!

评论0

请先

社交账号快速登录