http://www.mytension.cn/comments/
具体演示看这里,现在都是一些写死的文件
我要增加是否开启头像,和头像大小的控制,还有默认头像等等!
modules/show.php
modules/comments.php
找到最下面的
$commentdb[]=$comment;
在上面加
if ( !empty( $comment['email'] ) ) {
$gravatar = md5( $comment['email'] );
$default = urlencode( $options[url].'/images/gravatar.png' );
$comment['avataraddress'] = "<a href='http://www.gravatar.com/' title='Get your own gravatar'><img src='http://www.gravatar.com/avatar.php?gravatar_id=$gravatar&rating=R&size=54&default=$default' alt='' /></a>";
}
再上面找到
$query = $DB->query("SELECT commentid,author,url,dateline,content FROM
改为
$query = $DB->query("SELECT commentid,author,url,email,dateline,content FROM
在模板头像处 调用
$comment[avataraddress]
[
本帖最后由 tension 于 2008-8-4 09:54 编辑 ]