邪罗刹的菠萝阁


网上大多都是直接引用 [/cache/avatar/] 目录的头像
但是这个插件涉及到PHP字符串
新手可能会搞糊涂 在这里稍微提示下
此插件的作者Mg12的注解很规范 看 [Core.php] 代码

// 当不包含默认头像时
} else {
$avatar = '<div class="rc_avatar rc_' . $position . '">
' . get_avatar($email, $size) . '</div>';
}

我们需要修改下字符串
在PHP里的"."符号是连接字符串的意思
所以我们要在DIV标签后面加上IMG标签
这里的md5函数需要进行PHP运算 所以要在单引号的外面

// 当不包含默认头像时
} else {
$avatar = '<div class="rc_avatar rc_' . $position . '">
<img src="缓存插件目录/cache/avatar/'. md5(strtolower($email)) .'" /></div>';
}
Leave a comment
3 Comments.
  1. W31ill Mozilla Firefox Windows 坐沙发!#1

    谢谢 刚好用上 。

    @
  2. 邪 罗刹 Google Chrome Windows 坐板凳!#2

    @W31ill
    真令人高兴 多谢支持 ~

    @

Leave a Reply


[ Ctrl + Enter ]

Trackbacks and Pingbacks: