我有一個內容類型和登錄用戶投票的可能性。有5個不同的五星級投票(類別)在節點上。現在我想添加用戶點,並想詢問用戶是否有可能在節點上投票時得到1分,如果他在每個類別中投票都得5分。他有可能在稍後改變投票,但是他不應該再得到任何分數。這可能嗎?Drupal 7 - Fivestar和用戶點
迎接
我有一個內容類型和登錄用戶投票的可能性。有5個不同的五星級投票(類別)在節點上。現在我想添加用戶點,並想詢問用戶是否有可能在節點上投票時得到1分,如果他在每個類別中投票都得5分。他有可能在稍後改變投票,但是他不應該再得到任何分數。這可能嗎?Drupal 7 - Fivestar和用戶點
迎接
雖然它看起來不像有完成此現有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 =)
我希望這有助於。讓我知道事情的後續!
嗨,謝謝你的回答,我的PHP知識非常小,所以我會盡力用規則來做。 – JOKER