Hey...am finally almost finished building my new site with Drupal. I've run into a small issue, though...it's with the user badges module. There's a piece of code to insert where you'd like user badges to be displayed:
<?php print user_badges_for_uid($uid); ?>
I inserted it directly below where the avatar is displayed in my theme, in the node-forum.tpl.php file (I'm using Friends Electric, with the Flatforum module). So far, so good. The user badge displays in the topmost post, but not in any of the comments below it. So, if I (as admin) start a topic, my admin badge appears in the first post, but not in any of the replies I make.
I have not tested this with the other badge I set up (for moderators), or for regular members. My account is the only one setup, so far.
Am I hitting a bug, or missing a spot in the theme?
Erm...not sure if I'm giving enough information. Here's the contents of me node-forum.tpl.php file:
<?php
if (!_is_forum()) {
include('node.tpl.php');
return;
}
$curr_user = user_load(array('uid' => $userid));
$sig = $curr_user->signature;
?>
<div class="comment forum-comment comment-<?php print $row_class; print $comment->new ? ' comment-new forum-comment-new' : ''; ?>">
<div class="comment-left">
<div class="author-name"><?php print $name ?></div>
<?php print $picture ?>
<?php print user_badges_for_uid($uid); ?>
<?php if (module_exist('flatforum')): ?>
<span class="author-posts">
<?php print t('Posts:') . ' ' . $posts; ?><br />
</span>
<span class="author-regdate">
<?php print t('Joined:') . ' ' . $joined; ?><br />
</span>
<?php endif ?>
</div>
<div class="comment-right">
<div class="title"><?php print check_plain($comment->subject) ?></div>
<?php if ($comment->new) : ?>
<a id="new"></a>
<span class="new"><?php print $new ?></span>
<?php endif ?>
<div class="content">
<?php print $content ?>
<?php if ($sig): ?>
<div class="author-signature">--<br /><?php print check_markup($sig); ?></div>
<?php endif ?>
<br class="clear" />
<div class="links"><?php print $submitted . ' ' . $links ?></div>
</div>
</div>
</div>
<br class="clear" />
If I can provide any other details...please let me know. Thanks for the help!!
Comments
Comments are not nodes
Comments are not nodes and must be themed separately.
Here you go
replace your line with these two and it will work
NetCEO
NetCEO, wow. Thank you so
NetCEO, wow. Thank you so much, that worked perfectly!
Great tip
Just chiming in so I can find this post again when I get home to work on my site. :)
Nice
Thanks. I needed that.