Drupal 7 - Fivestar and Userpoints -
i have content type , possibility logged in users vote on it. there 5 different fivestar votings (categories) on node. want add userpoints , wanted ask if possible when user votes gets 1 point every vote on node, 5 points if votes in every category. has possibility change vote later, shouldn´t points anymore. possible?
greets
while doesn't there existing 7.x or 8.x module accomplishes this, there 2 ways should able accomplish goal:
- write module. userpoints api well-documented , should possible create module increment user's userpoint count when fivestar field modified. avoid duplication, note field looks should accomplish de-duping looking (assuming set
txn_id
combination of current node id, field id, , user id:
'txn_id' => (int) transaction id of current points record. if present update occurs
- use rules. userpoints module integrates rules, should able accomplish userpoints use case without writing code. according tho userpoints rules integration notes, can compare current userpoints number of points before transaction:
compare userpoints before transaction - condition used compare amount of userpoints user had before userpoints added to/deducted user against specified value. - 'amount compare' value checked >= (greater or equal to) , negate checkbox change condition < (less than) value other >=. if exact value, 1, can add 2 of condition use >= , < specify 1 number. simple math stuff here =)
i hope helps. let me know how goes!
Comments
Post a Comment