发现很多Emlog评论区用户头像有问题

如:

H~LPAW~CNKA8M8@DPT_[K{X.png


如何解决呢?



其实很简单

一、打开:根目录/include/lib/function.base.php文件

手机模板打开:根目录/m/index.php文件)


二、找到这一段


电脑模板:


@J2(D1@{HD~9%OXO7`IE90F.png


手机模板:


F]3MD3]2{{N13TZR7KU_TKT.png

三、替换一下代码


手机模板替换:



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;
}


四、完成


CUWPWA~$G59){369SU$~L[4.png

扫描进入手机浏览

欢迎留言