Hello everyone, i just installed User point model to my Drupal 6.2 website, and it seems to work great,
now i want to show the user points under his name in the post page, i already search and find the same issue but i tried it and didnt work for me (i am not that good in php)
here what i tried
i paste this code in the node.tpl.php

<?php if ($page): ?>
<div class="points">Earned points :<?php print userpoints_get_current_points($user->uid);?></div>
<?php endif; ?>

am not sure about the ($user->uid) part,
anyway it is showing the point for the logged on user, not the owner of the post as i want it
check it here
abudhabiliving.net

could u advice about this plz

Comments

btmash’s picture

The user->uid that you look at is the current logged in user. You might want to try

<?php if ($page): ?>
<div class="points">Earned points :<?php print userpoints_get_current_points($node->uid);?></div>
<?php endif; ?>
AbuDhabi’s picture

Status: Active » Fixed

Thankx alot thats work just the way i want

thanks BTMash,,,,

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.