我有一个内容类型和登录用户投票的可能性。节点上有5种不同的五星投票(类别)。现在我想添加用户点,并想询问当用户投票时他是否有可能在节点上每次投票获得1分,如果他在每个类别中投票,则为5分。他有可能在以后改变投票,但随后他不再得到任何积分。这有可能吗?
招呼
答案 0 :(得分:0)
虽然看起来没有现成的7.x或8.x模块可以实现这一目标,但有两种方法可以实现目标:
txn_id
设置为当前节点ID,字段ID和用户ID的某种组合: 'txn_id' => (int) Transaction ID of a current points record. If
present an UPDATE occurs
Compare Userpoints before the transaction
- This condition is used to compare the amount of userpoints the user had before the userpoints was added to/deducted from the user against a specified value.
- The 'Amount to compare' value is checked as >= (greater than or equal to) and the Negate checkbox will change the condition to < (less than) as it will be any value other than >=. If you would like to get an exact value, say 1, you can add two of the condition to use >= and < to specify one number. Simple math stuff here =)
我希望这会有所帮助。让我知道它是怎么回事!