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.
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
Comment #1
heine commentedThe 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:
Comment #2
(not verified) commented