Project:User Points
Version:6.x-1.x-dev
Component:Code: userpoints_views
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (duplicate)

Issue Summary

Hello, I'm not sure if this issue is duplicated (search on issues seems to work strange in drupal website now) I'd like to know how to add categorized points using Rules, it seems it's not possible to select the category. Any help? Thanks!

Comments

#1

Title:Adding Categorized Points with Rules» Showing categorized Points on views
Component:Code: userpoints_rules/userpoints_workflow_ng» Code: userpoints_views

Hello, I'm not sure if this issue is duplicated (search on issues seems to work strange in drupal website now) I'd like to know how to show categorized points on Views. I cannot find any option to select the category. Thanks!

#2

its not currently possible to select the category for the points.

#3

for views or for rules.

#4

I'm trying both, that's why I have written two different issues. But I think Drupal made something strange with the issues and mix them (I wrote this while Drupal was changing to 6) This should be two.

Knowing that is not possible to select categories with Rules I just leave this issue with the Views question. Sorry for the mixing :( Maybe I should close this one and start a new because I cannot change the first post...

I tried to create both a page view and a block view but I couldn't find how to show just a category or show all of them. Thanks

#5

What i get in views after adding a "Userpoints: points" field is a row for every category of points for every user.
what i need is a column for every category, so that a user would have one row with multiple points columns.

Possible...?

#6

Its a simple thing ...

You can use hook_userpoints($op, $params){---}

OP = 'points before' and params = parameters passed by userpoint module now you can do some manipulation in your module by calling this hook...and assign cataegory ID which is a termID to $params['tid'] and then again call userpoints_userpointsapi($params) function to process updated $params variable and by doing this you can add your points to specific category...

regarding Views... i think its again a simple thing to do... only we need to add extra logic in userpoints module in hook_views_data() to apply termid in joins... i dont know how to do that.. and if somebody have some experinnce in playing with views can easily do that...

any thought from community is welcome, for implementation of category points let me know if some one need a code example

Qandeel

#7

Status:active» needs review

This joins the userpoints table with the taxonomy table (term_data) so you can use all the available taxonomy information (field name etc.)

AttachmentSizeStatusTest resultOperations
userpoints-378910-1826174.patch446 bytesIgnored: Check issue status.NoneNone

#8

thijsvdanker Is this patch used for views? Can you give an example of how to use it? I applied the patch but I don't seem to see any type of relationship between terms and user points with this patch.

#9

subscribing

#10

+1 subscribing

#11

Title:Showing categorized Points on views» Views show categorized Points

I tried #7 and patch applied but I don't see any text in Userpoints Category column.
I have 2 categories created and users have points from both and values in Points column is shown correctly.

#12

same - chatted with yaz085 and we don't know how to use this at the moment

#13

Status:needs review» closed (duplicate)

Patch for Views category is here #871126: Fix Bugs in Views Integration (only for D7, will be backported).