When someone gets userpoints they don't get updated in their profile, but they do in the "top contributers".
Any way to make userpoints show the correct points in the profiles or simply remove them from the user profiles?
| Comment | File | Size | Author |
|---|---|---|---|
| #23 | Picture 72.png | 45.78 KB | giggler |
| #2 | userpoints_user_show_all_points.patch | 971 bytes | tobiasb |
Comments
Comment #1
TSNetwork commentedI managed to delete userpoints from showing in user's profiles but I still wonder why it always showed 0 points...
Great module though, very useful for motivating people!
Comment #2
tobiasbhere comes a patch, i hope this is right mr maintainer :D
Comment #3
tobiasbComment #4
kbahey commentedCan we get some people to test this?
Also @jredding, what do you think?
Comment #5
fred0 commentedYep, that seems to work just fine. However, the "User's makeup points" block does not seem to show all points for all categories. I have 3 categories and 1 point in each and, while this patch makes the user profile display 3, the block displays 1.
Comment #6
TSNetwork commentedHow to apply the patch? :]
Thanks for fixing this.
Comment #7
vm commentedhttp://drupal.org/patch/apply
Comment #8
jredding commentedhhmm...I worry about the performance implications of this. When doing
userpoints_get_current_points($uid, 'all')
it causes the following query
SELECT SUM(points) FROM {userpoints} WHERE uid = %d'
While I think this is OK from time to time I don't get a warm fuzzy feeling when implementing this as the default setting.
Maybe we make this is a, yet another, setting in the admin settings?
Comment #9
fred0 commentedOK... but how then do we solve the original problem? The profile display doesn't show all points. Why would one want to toggle a bug in and off in the admin settings?
Comment #10
jredding commentedfred0 what is a bug to you isn't a bug to everyone.
Point categorization is used, by many (including me) to "segregate" points not to combine them. Thus making the default 'all' (which SUMs all categories of points) a bug to me.
What is needed is a better way of showing these points on the user profile page.
We can do it simply to what's on the /myuserpoints page.. i.e
category a 5
category b 10
and so on.
OR we can present an option to the admin to select which category of points is displayed on the user profile page (a quick dropdown)
OR we can do a hybrid of both
Comment #11
fred0 commentedYes, understood.
Since the myuserpoints page provides the category detail, I'm not sure there's much call for replicating it on the profile page (but there's always someone who might want it, I guess).
As for option 2, I think multiple select checkboxes would be more useful to allow one to choose a (sub)set of categories to sum on the profile page.
Comment #12
jredding commentedSUMing individual categories on the user profile page is functionality that isn't provided anywhere else in the module and I can hardly find that useful.
My suggestion was to provide a select box to choose ONE category to display or the option to display ALL (summed).
Comment #13
jredding commentedOK I implemented a new choice under the categories to allow an admin to choose which category is displayed on the user's profile page. You can also choose "All" which will display a SUM of all categories.
If more functionality than this is provided we should take it to http://groups.drupal.org/user-points and work out a good model.
Comment #14
jredding commentedthis was implemented in dev so give it a few hours or check out directly from the DRUPAL-6--1 branch.
Comment #15
jredding commentedA solution was written and committed for this. I'm setting as fixed. Comments on the approach are welcome.
Comment #17
fred0 commentedSorry, have to set this back to active. I fully support the approach committed to dev, but it doesn't seem to be working.
Specifically, the array_merge function of this bit at line 413 seems to bork the storage of the variable id:
The term_data id seems to get truncated to a single digit. In my case, my userpoints taxonomy category ids are 22, 23, 24 and 25. The function saves them to as 2, 3, 4, or 5.
As a test, I replaced the options line with just
'#options' => userpoints_get_categories(),and it then saves the id properly. Of course, this doesn't provide the All option, but it was just a test.Comment #18
fred0 commentedOh, let me add that the All option is the only one that works with the array_merge function.
Comment #19
jredding commentedtested this with taxonomy ids <10, I will test again with large IDs.
Comment #20
jredding commentedI checked in new code that removed the use of array_merge but retained the "all" option.
Please check and make as fixed if corrected.
Comment #21
fred0 commentedYes, that works!
Comment #23
giggler commentedSorry to open this up again, but is this fixed in the latest release because I just updated it to the latest and when creating content type it will have "User * earned 1 points Total now is 0 points."
In the My Point page. It will list the points by each instance, but the total on the bottom is all wrong. The points in profile also shows as "0" still while it shows the correct points under "top contributor":
(see attached image)
Uncategorized points Balance: 0
Userpoint for Login points Balance: 1
Approved points Balance: 1
Points awaiting moderation: 0
Net points Balance: 1
Comment #24
giggler commentedok, I've just reset all the points and tried it again and the points in the profile page does show the correct number now..
Comment #25
Passionate_Lass commentedHi.
Is this patch going to be built into the userpoints module soon? I'm working on a production site which is having this issue and I'm skittish about applying patches as it is a production site, but also because despite having TRIED several times to apply patches it ends up being a real ordeal.
Comment #26
vm commentedjredding in #20 posted the comment in February of 09, and the last 6.x-1.0 release is from January.
based on my reading of the issue, the patch was a put into 6.x-1.x-dev and is likely still there awaiting a roll into a release other than -dev.
Comment #27
Passionate_Lass commentedAh. Ok this is why I'm still experiencing the issue. :) Do we know when abouts they will roll out a new release?
Comment #28
vm commentedI'd guess when enough users test -dev and state that the patch has fixed the issue
Comment #29
Passionate_Lass commentedI'm going to be adding the dev module. If it works for me to fix this bug I'll be posting here. :)
Comment #30
Passionate_Lass commentedIssue resolved for me now by updating to the dev version. :) Found the setting to "display all" points on profile.
Comment #31
adam_c commentedSorry to re-open this but I didnt really want to create a new post when the question I want answering has gone un-answered in here.
In the original post, the question was asked... 'how can you remove the user points block from the profile page altogether?'
Could anyone answer this please?