hi,

i am currently migrating a page I work for to D7. On the old D6 Page I wrote a little module that does vote from rules. While making my update plan I found your module and noticed that you do not provide a rules action to cast votes. As this was the needed feature for my usecase I decided to not port my module to D7 but to extend your module with this functionality.
The attached patch file contains all the changes that where needed to implement a voting action.
I would be happy if you would consider including this to your code.

Thanks in advance
Clemens

CommentFileSizeAuthor
#1 actions-implemented-1378040-1.patch2.87 KBcbergmann

Comments

cbergmann’s picture

StatusFileSize
new2.87 KB

After creating a issue ID.
Here is my properly named patch file.

BrilliantMkting’s picture

Thankyou cbergmann,

I have a different use case, but this is exactly what I need. I hope it makes it into the main module!

brycesenz’s picture

Status: Active » Needs review

Thanks for the patch, it seems to be exactly what I needed as well. Marking this as 'needs review' until a few other people can confirm that it works, but I hope it gets committed soon.

mfoda’s picture

Thanks for the patch. I'm trying to get this to work with options instead of points.

I have a simple Rate widget with two options, "Yes" and "No", with values "1" and "2" respectively.
Under the action configuration page I'm able to select "options" as the type of vote to case. However, under "Value" it says "How many points should be granted." It seems to me that this would work for points and percentages(?).

I tried using "1." And it partially worked. After the condition is met I navigate to the node where the Rate widget is displayed and it says underneath it "You have voted Yes." The first problem is that the count next to the widget still displays zero.

The other problem is that I can't vote on the other option. I tried to cast a "no" vote by changing the value to "2" (as it is under the widget type page), but this actually voted "yes" again, and I think will see two "yes" votes if I check the vote count.

Please tell me how to fix this, or whether the implementation for "option" type is not yet complete, so I can stop trying to do this and turn to something else.