1
我有一個內容類型'內容'字段'值'(一個整數)和一個標誌'發佈內容並授予用戶點數'。每當內容被標記爲與此國旗,我想授予內容的作者一些用戶點,等於'價值'字段中的值。如何授予用戶用戶點數等於某個字段的值/計算值?
我試圖解決我的問題的第一部分,像這樣的規則模塊:
*Event: A node has been flagged, under "Publish Content and grant points to user"
*Conditions: Content is of type 'Content'
*Actions: Grant points to a user: ...
但是,這是不可能挑flagged-node:field-value
在點部分。我也試過:
*Event: A node has been flagged, under "Publish Content and grant points to user"
*Conditions: Content is of type 'Content'
*Actions:
- Calculate a value: `[flagged-node:field-value]` "+" 0. (Variable name = result)
- Grant points to a user: ...
但是,然後,變量'結果'不可用。我該如何解決這個問題?
因此,每次用戶點擊標記節點時,規則都必須將+1添加到「值」字段? – OnengLar
不,添加內容的用戶必須獲得與「值」字段相同數量的用戶點。只有我作爲管理員可以標記內容。標記後,「值」字段中的值不會更改。 – Jeroen
你可以制定5個規則,每個規則有: '如果值爲1 =授予1','如果值爲2 =授予2'...'如果值爲5 =授予5' – OnengLar