|
|
Joined: Nov 2004
Posts: 6
Lurker
|
Lurker
Joined: Nov 2004
Posts: 6 |
This just does not make any since. We are hosting the forum at one building and our office in a different state uses the forum. They all have the same public IP address because of the Firewall configuration. Once one person votes on a poll no one else can vote because they all have the same Public IP Address. Or am I missing somthing? Do i need to do something different some place that I missed?
HELP HELP ( i have a large group of pissy ppl here)
|
|
|
|
Joined: Sep 2003
Posts: 488
Code Monkey
|
Code Monkey
Joined: Sep 2003
Posts: 488 |
Ok here's a simple hack for ya. In dopoll.php... FIND THIS (or something very similar)... // -------------------------------------------------------------------------- <br />// If we allow all to vote, we check if the IP has voted, otherwise we check <br />// for the username <br /> if ($config['whovote']) { <br /> $checker = addslashes($IP); <br /> } <br /> else { <br /> $checker = addslashes($user['U_Number']); <br /> } CHANGE TO THIS: // -------------------------------------------------------------------------- <br />// If we allow all to vote, we check if the IP has voted, otherwise we check <br />// for the username <br /> if ($config['whovote']) { <br />// $checker = addslashes($IP); <br />// } <br />// else { <br /> $checker = addslashes($user['U_Number']); <br /> } This will force the use of their usernumber instead of their IP address for determining if they have previously voted in a given poll.
|
|
|
|
Joined: Jun 2001
Posts: 356
Junior Member
|
Junior Member
Joined: Jun 2001
Posts: 356 |
Just done this for my 6.5b6 and now it allows everyone to vote as many times as they wish! Surely not right...
|
|
|
|
Joined: Sep 2003
Posts: 488
Code Monkey
|
Code Monkey
Joined: Sep 2003
Posts: 488 |
Let's try this again... 1) Undo the hack. 2) The only viable option is to allow voting for registered users only. In config.inc.php make sure this... // Do you want everyone to vote, or just registered users? // 1 = everyone : 0 = registered $config['whovote'] = 0; ...is set to 0. That will automatically use their usernumber to track voting and not IP#'s. There is really no possible way to allow unregistered users to vote under the circumstances mentioned in the first post.
|
|
|
|
Joined: Jun 2001
Posts: 356
Junior Member
|
Junior Member
Joined: Jun 2001
Posts: 356 |
Allow poll voting is set for registered users only...
|
|
|
|
Joined: Jun 2001
Posts: 356
Junior Member
|
Junior Member
Joined: Jun 2001
Posts: 356 |
and this: // Do you want everyone to vote, or just registered users? // 1 = everyone : 0 = registered $config['whovote'] = 1; ...is set to 1. should be set to 0? 
|
|
|
|
Joined: Sep 2003
Posts: 488
Code Monkey
|
Code Monkey
Joined: Sep 2003
Posts: 488 |
Yes 0, I edited my post. You're too fast 
|
|
|
|
Joined: Sep 2003
Posts: 488
Code Monkey
|
Code Monkey
Joined: Sep 2003
Posts: 488 |
Hmm...can I ask why you are messing with this at all if you are only allowing registered users to vote? Maybe you were just trying to help the original poster along? If so, then no prob. I just was wondering if you have some kind of issue yourself that you're trying to solve.
|
|
|
|
Joined: Jun 2001
Posts: 356
Junior Member
|
Junior Member
Joined: Jun 2001
Posts: 356 |
I've got the same problem as the poster. It mainly affects people in the UK who use AOL, once one of them has voted, then no-one using that ISP can vote, they seem to share the same IP address. Hence I thought the above fix would fix it, as it sounds like exactly the same kind of issue i'm having.
|
|
|
|
Joined: Sep 2003
Posts: 488
Code Monkey
|
Code Monkey
Joined: Sep 2003
Posts: 488 |
Yeah the only way that I can see a workaround for it is to have a permanent cookie containing a unique ID# given to non-registered voters.
If a cookie is already present then the number is cross-checked against the database to see if it is found there. If not found, they get to vote, otherwise they are denied.
That would basically replace the IP# tracking.
It shouldn't really be that difficult to add such a hack.
|
|
|
|
Joined: Jun 2001
Posts: 356
Junior Member
|
Junior Member
Joined: Jun 2001
Posts: 356 |
lol, well, it depends on your coding skill! To me, it's difficult, in fact, nigh on impossible!
|
|
|
|
Joined: Sep 2003
Posts: 488
Code Monkey
|
Code Monkey
Joined: Sep 2003
Posts: 488 |
|
|
|
|
Joined: Jun 2001
Posts: 356
Junior Member
|
Junior Member
Joined: Jun 2001
Posts: 356 |
Mr Twisty, you are a star!  Thankyou!
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 417
Joined: November 2001
|
|
Forums63
Topics37,575
Posts293,930
Members13,823
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|