Previous Thread
Next Thread
Print Thread
Rate Thread
#282715 12/22/2004 5:59 PM
Joined: Nov 2004
Posts: 6
Lurker
Lurker
Offline
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)

Sponsored Links
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)...

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.

Joined: Jun 2001
Posts: 356
Junior Member
Junior Member
Offline
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
Offline
Joined: Jun 2001
Posts: 356
Allow poll voting is set for registered users only...

Sponsored Links
Joined: Jun 2001
Posts: 356
Junior Member
Junior Member
Offline
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
Offline
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.

Sponsored Links
Joined: Jun 2001
Posts: 356
Junior Member
Junior Member
Offline
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
Offline
Joined: Jun 2001
Posts: 356
Mr Twisty, you are a star!
Thankyou!


Link Copied to Clipboard
Donate Today!
Donate via PayPal

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.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
AllenAyres
AllenAyres
Texas
Posts: 21,079
Joined: March 2000
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)