I want to write a code for custom rule.I want to that when some one post a comment then one can able to like his/her post or comment i.e a single click on the Like will 'like' pieces of content and a message is send to that user who posted that comment . Is it possible with rules ??

  • for liking are u using voting api or flag?
    – No Sssweat
    Sep 18, 2015 at 8:10
  • nothing till ...which would be best to use . ? i just want something similar to "facebook like". Is it possible by creating a custom rule ?? Sep 18, 2015 at 8:14

1 Answer 1


You can use flag module.

Def: Flag is a flexible flagging system that is completely customizable by the administrator. Using this module, the site administrator can provide any number of flags for nodes, comments, users, and any other type of entity.

Once you install the module, its very simple. Goto structure->flag->add new flag. Give title for the flag and use the count option to display the like-count.

In my example, 'Node Like' is the title of the flag, the flag count can be achieved in token


enter image description here

To answer your question, its possible but complex to achieve just using rules.

  • great....i will try this too.. Sep 21, 2015 at 5:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.