打开主题目录里的主题支持函数 (functions.php)文件
然后开始看代码
<?php
// WordPress 2.5 or higher
if (function_exists('get_avatar') && get_option('show_avatars')) {
echo '<div class="userpic">'; echo get_avatar($comment, 24); echo '</div>';
// WordPress 2.3.3 or lower
} else if (function_exists('gravatar')) {
echo '<div class="userpic"><img class="avatar" src="';
gravatar("G", 24); echo '" alt="avatar" /></div>';
}
?>
这里和iNove完全不一样
所以要做如下修改
<?php
// WordPress 2.5 or higher
if (function_exists('get_avatar') && get_option('show_avatars')) {
echo '<div class="userpic">
<img src="你的头像缓存目录/cache/avatar/'.
md5(strtolower($comment->comment_author_email)) .'" alt=""
height="24" width="24" /></div>';
// WordPress 2.3.3 or lower
} else if (function_exists('gravatar')) {
echo '<div class="userpic"><img class="avatar" src="';
gravatar("G", 24); echo '" alt="avatar" /></div>';
}
?>
这里不能像我修改recent-comments插件似地
在这里是无法使用$mail的
所以我们用$comment->comment_author_email
完工鸟 ~~
对于技术类,我一般都飘过
@exia
呵呵 ~ 飘飘 ~