我的网站不能显示评论头像,是由于Emlog调用Gravatar图像,Gravatar被墙了导致图像无法显示。被墙,由于XX、版权或者经济政治原因被屏蔽了上不去 需要翻墙(使用代理),听着特别扭。
我的解决办法:
1、打开网站\include\lib文件夹下的function.base.php文件,第639行到651行是系统获取Gravatar头像的代码。
2、修改第649行:
$avatar = "http://www.gravatar.com/avatar/$hash?s=$s&d=$d&r=$g";
改成:
$avatar = "http://gravatar.duoshuo.com/avatar/$hash?s=$s&d=$d&r=$g";
或者
$avatar = "https:/secure.gravatar.com/avatar/$hash?s=$s&d=$d&r=$g";
3、如果还不能显示,那可能还需要修改模板文件夹下面(content/templates/)的模板文件module.php
查找gravatar,进行修改,方法同第2步骤一样。
也就是修改为多说(http://gravatar.duoshuo.com/)的缓存,访问速度非常快。
改成http://q.qlogo.cn/avatar/$hash?s=$s&d=$d&r=$g"; 好像也行