At the bottom of the instructions it say:

To display user badges in your theme use :

print user_badges_for_uid($uid);

I am not exactly sure where in the theme I would put this. Can you clarify please?
Thanks

Comments

heine’s picture

Where you want the picture to go.

Suppose you want to replace the user picture in a node by the userbadge, then open node.tpl.php and replace the if($picture) { print $picture; } part

  <div class="node<?php if ($sticky) { print " sticky"; } ?><?php if (!$status) { print " node-unpublished"; } ?>">
    <?php print user_badges_for_uid($node->uid); ?>
    <?php if ($page == 0) { ?><h2 class="title"><a href="<?php print $node_url?>"><?php print $title?></a></h2><?php }; ?>
    <span class="submitted"><?php print $submitted?></span>
    <span class="taxonomy"><?php print $terms?></span>
    <div class="content"><?php print $content?></div>
    <?php if ($links) { ?><div class="links">&raquo; <?php print $links?></div><?php }; ?>
  </div>
heine’s picture

Status: Active » Fixed

I consider this fixed, if not, don't hesitate to reopen.

Anonymous’s picture

Status: Fixed » Closed (fixed)