Hi,

I was thinking about extending the functionality of this wonderful module like that:

A node could gain energy when someone votes for it, through Voting API for instance, insted when someone views it. That way it will be moremore flexible and will allow creating of different scenarios - like pligg/drigg for example and many others.

How does it sound?

Comments

skiminki’s picture

I'm thinking that maybe we should create plug-in support, because I don't want to include non-core drupal stuff for core radioactivity (except for views). This definitely sounds like "Radioactivity VotingAPI Support" module features. The implementation could be as follows:

  • Radioactivity plug-in modules need to have <module>_radioactivity_info() hook, which would return the module-provided energy types. For example: vote
  • The new energy types would show up in the radioactivity profile admin pages. There you could set 'vote' equals 5 energy units for some profile.
  • The next time someone votes, the Radioactivity VotingAPI plug-in would call radioactivity_add_energy($nid, 'vote'); and the node would receive 5 energies. I believe VotingAPI has the appropriate callbacks for this.

How about this? I could write the radioactivity plug-in support, but anyone interested in writing the VotingAPI plug-in? Naturally, I would be pleased to include the plug-in into radioactivity package.

eikes’s picture

it sounds good to me, I'm interested in this too!

skiminki’s picture

Assigned: Unassigned » skiminki

I've received some additional interest for this feature outside this issue. So, I'm going to write the plug-in support and the VotingAPI plugin. Expect patches in a week or two.

kufeiko’s picture

Unfortunately, I'm not a good coder, but I can help with testing, or if you have any other idea, I will be glad to help.

skiminki’s picture

VotingAPI support patched in, amongst others, see #255000: Energy provider and energy target plug-in support.

skiminki’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.