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.)
| Comment | File | Size | Author |
|---|---|---|---|
| comment.module.zip | 18.8 KB | laura s |
Comments
Comment #1
magico commentedSo everyone of us can theme the output of this block anyway we want.
Comment #2
killes@www.drop.org commentedfixed in cvs.
Comment #3
(not verified) commented