In first place, sorry for my english...i am spanish and...
Some time ago I'm looking for a solution to this problem that apparently should not be too complicated to implement. Let me explain.
I installed the module "Userpoints" for users of a website I'm creating obtain points based on their participation.
Once everything is installed and running, I got the idea to create a ranking with scores of users based on their points. To achieve this I got the module "User points to contributors ", which creates a list sorted by the votes of the users, resulting in more or less what I wanted.
However, making a deeper analysis, I realized that is not exactly what I wanted, although the latter module can serve me to create a general list. Actually, what I want is to put the ranking of a user (user obtained points) in the User tab. For a better understanding of what I mean, here's an example:
A user participating in the web and get 36 points and appears in the ranking at Number 4. Well, what I mean is that when the user clicks its tab user (user profile), see their points (36) and their place in the ranking (4th) in a block or something.
I tried with a view and some programming in php that I could find here, and nothing, there is no way. And I wonder, because a feature of this type looks like something that is usually seen in many websites.
Does anyone know how to get such functionality?
"Any idea how to work? Any help? Please!
In any case,
Greetings to the whole community
Barry Collins
Comments
Comment #1
Fidelix commentedSubscribing...
I really need this too
Comment #2
dcine commentedOk, finally i used this:
The first code is for the user points, the second for the user rank (the div class is for css)
I hope it serves you, it works for me.
Greetings
Barry Collins
Comment #3
Fidelix commentedOh god... its just that easy?
I should have checked the userpoints table...
Thank you dcine!
Comment #4
berdirThat table comes from http://drupal.org/project/userpoints_top_contributors.
Doing the same with just userpoints.module is a bit more complex.
Comment #5
dcine commentedYeah, yeah sorry for forgetting, but it's true, you must install the module beforehand "Userpoints top contributors". You can then use the code above.
Greetings
Barry Collins
Comment #6
glitz commentedi have "Userpoints top contributors" installed but i still cant get this to show. maybe im doing it wrong, i have this code entered in a custom php field in views....
Comment #7
glitz commentedi made sure i added the "Userpoints: User" relationship as well....
All I see is:
Ranking: (blank)
for each member...
Comment #8
berdirWell, you need to figure out what you need to use instead of $uid.
Anyway, what you really want is views integration for the userpoints_top_contributors module, using the custom PHP code is a bad alternative since it executes a query for every row in your result.
I'm setting this to fixed, I suggest to open up follow-up issues in the userpoints_top_contributors module.