Needs work
Project:
Plus 1
Version:
6.x-2.6
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
3 Feb 2010 at 05:22 UTC
Updated:
30 Dec 2010 at 18:19 UTC
Jump to comment: Most recent file
Is is possible to reset the votes cast?
That is, I would like to be able to reset the number of votes on a particular node.
Any help with this would be much appreciated.
Cheers in advance.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | plus1_reset.zip | 13.33 KB | agileware |
| #3 | plus1-703182-3.patch | 4.48 KB | agileware |
Comments
Comment #1
agileware commentedAfter a quick look at the code, the only time votes are deleted is when the node is deleted.
To reset all votes for a particular node you would have to add that feature.
You could put an option on the settings page where you could enter a node id and
click a button to reset it's votes.
You could also put an option on the node itself to do that.
Comment #2
agileware commentedIt would be a fairly straightforward thing to implement.
Comment #3
agileware commentedHere is a patch that adds this feature.
The patch:
* Adds an option on the plus1 settings page to enable the reset button on node edit pages. (admin/settings/plus1)
* Adds a user permission for "reset plus1 votes" (admin/user/permissions)
* If users have permissions and the setting is enabled the button will appear on the node edit form
Development for this patch was paid for by field4000
Comment #4
agileware commentedHere is a copy of plus1-6.x-2.6 with the patch already applied.
Comment #5
abowers commentedHi, I just installed the patch, and I'm noticing that the Reset Votes button shows up on all node edit pages, regardless of whether or not voting is allowed on them. I'm also noticing that it can be used to reset votes for Fivestar - maybe this is a separate module on its own? I'm in preliminary testing, but so far, so good! This patch covers exactly a client requirement!
Comment #6
jgreep commentedSubscribing
Comment #7
nancydruThis will reset all votes on the node, regardless of the module that registered the vote. I suspect that unless P1 uses a different votingapi tag, there is not going to be a good solution. See VotingAPI: Data storage overview.
Comment #8
nancydruSee also #788288: Delete user, delete vote.