我有一个内容类型和登录用户投票的可能性。节点上有5种不同的5种投票方式(类别)。现在我想添加用户名,并想问一问,当一个用户投票时,他在节点上的每一次投票都能得到1分,如果他在每一个类别中投票的话,他会得到5分。他有可能在稍后改变投票结果,但是他不应该再得到任何分数了。这个是可能的吗?
问候
发布于 2014-03-25 10:21:34
虽然似乎没有一个现有的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 =)
我希望这能帮到你。告诉我是怎么回事!
https://stackoverflow.com/questions/22621698
复制相似问题