Closed (fixed)
Project:
User Points
Version:
6.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
6 Jun 2008 at 16:47 UTC
Updated:
20 Jun 2008 at 21:42 UTC
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
Comment #1
btmash commentedThe user->uid that you look at is the current logged in user. You might want to try
Comment #2
AbuDhabi commentedThankx alot thats work just the way i want
thanks BTMash,,,,
Comment #3
kbahey commentedCheck these articles for more:
Userpoints how to display userpoints on all pages.
Userpoints: showing points block only to users with a minimum threshold.
Comment #4
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.