UBB.Dev
Posted By: Cale Voters IP Addresses - 12/23/2004 12:59 AM

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)
Posted By: Twisty Re: Voters IP Addresses - 12/23/2004 1:44 AM
Ok here's a simple hack for ya.

In dopoll.php...

FIND THIS (or something very similar)...

Code
// -------------------------------------------------------------------------- <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:

Code
// -------------------------------------------------------------------------- <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.
Posted By: monkeyra Re: Voters IP Addresses - 01/05/2005 3:19 PM
Just done this for my 6.5b6 and now it allows everyone to vote as many times as they wish!
Surely not right...
Posted By: Twisty Re: Voters IP Addresses - 01/05/2005 3:58 PM
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.
Posted By: monkeyra Re: Voters IP Addresses - 01/05/2005 4:08 PM
Allow poll voting is set for registered users only...
Posted By: monkeyra Re: Voters IP Addresses - 01/05/2005 4:10 PM
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?
Posted By: Twisty Re: Voters IP Addresses - 01/05/2005 4:11 PM
Yes 0, I edited my post. You're too fast
Posted By: Twisty Re: Voters IP Addresses - 01/05/2005 4:14 PM
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.
Posted By: monkeyra Re: Voters IP Addresses - 01/05/2005 4:40 PM
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.
Posted By: Twisty Re: Voters IP Addresses - 01/06/2005 6:29 AM
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.
Posted By: monkeyra Re: Voters IP Addresses - 01/06/2005 9:45 AM
lol, well, it depends on your coding skill!
To me, it's difficult, in fact, nigh on impossible!
Posted By: Twisty Re: Voters IP Addresses - 01/06/2005 12:41 PM
Then lucky for you that I decided to code it ;-)

https://www.ubbdev.com/forum/showflat.php/Cat/0/Number/124336/Main/124336/#Post124336
Posted By: monkeyra Re: Voters IP Addresses - 01/06/2005 1:21 PM
Mr Twisty, you are a star!
Thankyou!
© UBB.Developers