I've ported the module to Drupal 7. Here is a zipped version.

CommentFileSizeAuthor
#6 voting_rules.zip5.08 KBAnonymous (not verified)
voting_rules.zip12.47 KBjide

Comments

sol roth’s picture

I installed it and when I rate anything I get this error:

"Fatal error: Call to undefined function dsm() in /sites/all/modules/voting_rules/voting_rules.module on line 29"

D7 using the latest version of the dev rate module and rules

sol roth’s picture

I commented out the line, looks like you just left a devel debug function in there. So far it's working great, I'm using it for a new project and will report any bugs / issues I find.

TimelessDomain’s picture

We should commit this & get the D7 branch going. thanks

Shadlington’s picture

Subbing

achton’s picture

Subscribing.

Anonymous’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new5.08 KB

I've also tested this D7 port. It's working, please move forward and open the D7 branch.

Just remove that line
dsm('voting_rules_' . $op . '_' . $vote['entity_type']);

And in voting_rules.tokens.inc remove the pass-by reference on line ~87
_voting_rules_token_data_info_recursion(&$info, $type, $property_info, $formatted_name);
to
_voting_rules_token_data_info_recursion($info, $type, $property_info, $formatted_name);

I use this module with Heartbeat templates, to create activity updates like "User X voted on node Y". Works really great.

Update attached (with some minor fixes).

Shadlington’s picture

The maintainer hasn't touched the project (or any other projects on d.o) in a while.

I wonder if another developer would be willing to come on as a co-maintainer?

univate’s picture

I am using #6 and it appears to be working for the rules I have setup so far.

heydemo’s picture

Sorry for the delay...I'm getting up to speed with Git right now...if someone wants to help me out that might expedite creating the Drupal 7 branch.

ambient.impact’s picture

I can also confirm that #6 works for me, at least within reacting to vote calculation.

lpalgarvio’s picture

+1

dropchew’s picture

subscribe

Leeteq’s picture

Title: Port to Drupal 7 » Port Voting Rules to D7
Version: 6.x-1.0-alpha1 » 6.x-1.0-beta1

Subscribing.

heydemo’s picture

Status: Reviewed & tested by the community » Fixed

Ok, started D7 branch and released as alpha1

heli0s’s picture

Version: 6.x-1.0-beta1 » 6.x-1.0-alpha1
Category: task » bug
Status: Fixed » Needs review

I'm having an issue, or possible just a lack of functionality. I'm trying to emulate user karma in a Digg fashion with Rate/VoteAPI/Rules/UserPoints in D7, since the karma module does not yet exists in D7. I setup two events, one for a vote down, and one for a vote up event. When the Rules event triggers on a vote, it works great and I get points accumulated or subtracted. Awesome!

Then I noticed a problem; you can game the system. Lets say you already voted "up" on a node. If you try to repeat that "up" vote even though you already voted "up", the event will trigger again non-the-less, which in my case adds more points which I don't want.

I'm posting this here because I think it this is something that could be fixed in Voting Rules. I think a functionality should exists for triggering a vote event only if that vote is valid, or not a repeat vote. I can understand someone possibly wanting an event trigger on every vote, repeat or not, but maybe another event for just valid ones? Is that possible? That seems more generally useful than the way it is IMO.

Thanks

Shadlington’s picture

Version: 6.x-1.0-alpha1 » 7.x-1.0-alpha1

heli0s, you should really raise that as a separate issue rather than re-opening this one.

Shadlington’s picture

Category: bug » task
Status: Needs review » Fixed

Oops, meant to do this too.

heli0s’s picture

Version: 7.x-1.0-alpha1 » 6.x-1.0-alpha1
Category: task » bug
Status: Fixed » Needs review

Sorry, actually meant to but was on the wrong page.

heli0s’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)
Issue tags: -drupal 7

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