I tried to use print user_badges_for_uid($uid); in comment.tpl.php but badges doesn't display. What's the matter? In node.tpl there are no problems.

Comments

heine’s picture

Status: Active » Fixed

The parameter to user_badges_for_uid has to be a user id. In comment.tpl.php the uid of the comment author is held in $comment->uid, so you can use:

 print user_badges_for_uid($comment->uid); 
Anonymous’s picture

Status: Fixed » Closed (fixed)