Closed (works as designed)
Project:
Node Vote
Version:
master
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Sep 2005 at 23:28 UTC
Updated:
30 Aug 2006 at 03:02 UTC
i can vote as a logged in user, but not as anonymous. i gave permissions to anonymous users in the access control panel, but to no avail.
http://fucktheregents.com/?q=node/48
drupal 4.6 with the most recent nodevote.
thanks!
-ryan
Comments
Comment #1
kbahey commentedBy design, anonymous users cannot vote.
Comment #2
ryanrain commentedadvice for people who want to allow anonymous users to vote:
1. i just took out a few of the "if" clauses in the "_nodevote_is_votable()" function (line 208). thanks for teh well-commented code!
2. then i used phpmyadmin to remove the keys in the nodevote table.
sloppy but easy.
Comment #3
kbahey commentedWell, before giving the details of the solution for those who need it, let me first warn those who want to allow anonymous users to vote that this opens the door to vote rigging. For example, a user can log off and vote on their own node. Moreover, they can vote multiple times!
Also, because this solution relies on removing the keys in the database table, it may be slow on large sites with lots of users, nodes, and votes.
If you still want to do this, then do the following:
The solution consists of two changes.
1. Change the database table from:
To
If you already have data in the nodevote table, then just use PHPmyadmin to remove the keys from the existing table in the database.
2. Change the code to allow anonymous voting:
In the nodevote.module file, locate the following piece of code in the function _nodevote_is_votable()
Change that to be like so:
Enjoy...
Comment #4
jasonwhat commentedWhile it isn't a perfect solution. Doesn't the "voting" module as well polls use php sessions to attempt to prevent rigging. Someone could clear their cookies and get by the system, but generally isn't this a good way to do it? Although, I don't really know the best way possible.
Comment #5
kbahey commentedChanging title back ...
Comment #6
kbahey commentedThis code was done for 4.6, and needs to be updated for 4.7.
Patches for this are welcome, provided they are parameterized.
Please see http://drupal.org/node/69564