In doing the 4.6.3 update, I lost a little hack I did on the comments.module so that the "author" information is added to the recent comments block. I always felt that the block was rather mysterious about the recent comments, what with not saying who actually made the comments. Anyway, I went ahead and re-did the little hack on the comments module from the 4.6.3 tarball. Here are the particulars:

Starting at line 170, remove:

      $items[] = l($comment->subject, 'node/'. $comment->nid, NULL, NULL, 'comment-'. $comment->cid) .'<br />'. t('%time ago', array('%time' => format_interval(time() - $comment->timestamp)));

and replace it with this:

      $result2 = db_query('SELECT name FROM {comments} WHERE cid='.$comment->cid);
$comment_user = db_fetch_object($result2);
$items[] = l($comment->subject . '', 'node/'. $comment->nid, NULL, NULL, 'comment-'. $comment->cid) .' by '. $comment_user->name . '<br />'. t('%time ago', array('%time' => format_interval(time() - $comment->timestamp)));

This will add the commenter's name as entered in the comment into the "recent comments" block.

I hope this can be incorporated into the core distribution. It seems rather unhelpful to leave out this information in the recent comments module. (It might be nice to have this for the "recent blogs" block as well.)

(I've attached a modified comment.module for reference. Sorry I don't have a patch.)

CommentFileSizeAuthor
comment.module.zip18.8 KBlaura s

Comments

magico’s picture

Title: Add author info to "Recent Comments" block » "Recent Comments" block should have a theme function
Version: 4.6.3 » x.y.z

So everyone of us can theme the output of this block anyway we want.

killes@www.drop.org’s picture

Status: Active » Fixed

fixed in cvs.

Anonymous’s picture

Status: Fixed » Closed (fixed)