Skip to main content
added 635 characters in body
Source Link
M a m a D
  • 3.8k
  • 2
  • 32
  • 62

You need to distinct those specific nodes using taxonomy or a custom field, like a boolean field, say, 0 means no vote and 1 means needs voting. Then use the the flag module to filter those nodes. like this

enter image description here


UPDATE :

The basic idea is, when user flags a content, you can set all of the 1s to 0 in this way no more content will be votable. To do so you need to use hook_flag_flag function. in this function use node_load to load the nodes of boolean value 1, set it to 0 then use node_save to save the node.

You need to distinct those specific nodes using taxonomy or a custom field, like a boolean field, say, 0 means no vote and 1 means needs voting. Then use the the flag module to filter those nodes. like this

enter image description here

You need to distinct those specific nodes using taxonomy or a custom field, like a boolean field, say, 0 means no vote and 1 means needs voting. Then use the the flag module to filter those nodes. like this

enter image description here


UPDATE :

The basic idea is, when user flags a content, you can set all of the 1s to 0 in this way no more content will be votable. To do so you need to use hook_flag_flag function. in this function use node_load to load the nodes of boolean value 1, set it to 0 then use node_save to save the node.

Source Link
M a m a D
  • 3.8k
  • 2
  • 32
  • 62

You need to distinct those specific nodes using taxonomy or a custom field, like a boolean field, say, 0 means no vote and 1 means needs voting. Then use the the flag module to filter those nodes. like this

enter image description here