If the drupalit was using module_invoke_all('drupalit') when a vote is casted, other module could be notified of a vote and react to it.

Other modules would simply have to implement a hook_drupalit($nid, $data) function to do whatever they want when a user votes.

For example, the userpoints_contrib module could have a module that give points to users which votes on a node using drupalit module. I wrote such module but I cannot contribute it back unless the drupalit module uses a hook.

Here's my proposed solution (attached).

What do you think?

CommentFileSizeAuthor
hook_drupalit.patch726 bytesroychri

Comments

ergelo’s picture

i would be very interested in this functionality, especially if it would allow integration with the actions module.. unfortunately i rather not test as my site is live already and wouldn't want to interfere with current functionality.. will give it a go as soon as i have time to create an empty setup.. plz let me know how its going
b.