Hi,

I would like to know how I can add the username to the recent comments or the recent blog entries section? I tried messing around with the blocks, but I couldnt figure it out and couldnt find anything searching the forum?

Thanks

Comments

tdobbs’s picture

Anyone know how to do this? I would think it is a common thing that people want?

giorgosk’s picture

Here is a hack I just created,

add [c.name] after c.timestamp on line 324 on modules/comment/comment.module file

... c.timestamp, c.name FROM...

also add [.' by '. $comment->name] at the end of line 395

... ))) .' by '. $comment->name;

------
GiorgosK
Geoland Web development/web design

------
GiorgosK
Web Development

parka’s picture

Thanks. This works and is very useful!

hruodland’s picture

In 7.0 you don't need the first change and you make the second (or something like it) to line 597. As changed, I have that line as

$items[] = l($comment->subject, 'comment/' . $comment->cid, array('fragment' => 'comment-' . $comment->cid)) .', by '. $comment->name .','. '&nbsp;<span>' . t('@time ago', array('@time' => format_interval(REQUEST_TIME - $comment->changed))) . '</span>';