12-11 3766人
发现很多Emlog评论区用户头像有问题
发现很多Emlog评论区用户头像有问题
如:
如何解决呢?
其实很简单
一、打开:根目录/include/lib/function.base.php文件
(手机模板打开:根目录/m/index.php文件)
二、找到这一段
电脑模板:
手机模板:
三、替换一下代码
手机模板替换:
function getGravatarX($email, $s = 40, $d = 'mm', $g = 'g', $img = false, $atts = 'array') { preg_match_all('/((\d)*)@qq.com/', $email, $vai); if (empty($vai['1']['0'])) { $hash = md5($email); $avatar = "http://gravatar.wp-china-yes.net/avatar/$hash?s=$s&d=$d&r=$g"; if ($img) { $avatar = '<img src="' . $avatar . '"'; foreach ($atts as $key => $val) $avatar .= ' ' . $key . '="' . $val . '"'; $avatar .= ' />'; } }else{ $avatar = "//q1.qlogo.cn/g?b=qq&nk=$email&s=$s"; } return $avatar; }
手机模板替换:
function getGravatar($email, $s = 40, $d = 'mm', $g = 'g', $img = false, $atts = 'array') { preg_match_all('/((\d)*)@qq.com/', $email, $vai); if (empty($vai['1']['0'])) { $hash = md5($email); $avatar = "http://gravatar.wp-china-yes.net/avatar/$hash?s=$s&d=$d&r=$g"; if ($img) { $avatar = '<img src="' . $avatar . '"'; foreach ($atts as $key => $val) $avatar .= ' ' . $key . '="' . $val . '"'; $avatar .= ' />'; } }else{ $avatar = "//q1.qlogo.cn/g?b=qq&nk=$email&s=$s"; } return $avatar; }
四、完成
欢迎留言