Webmastersite.net
Register Log In

Poll votes - 1 per member (not IP based)

Comments on Poll votes - 1 per member (not IP based)

babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Apr 28, 2007 - 8:43 AM:

I need to do a poll that allows 1 vote per member, not IP address, as some members are family and therefore have the same IP address. Is this possible?
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7867
Paul
Posted Apr 28, 2007 - 4:44 PM:

The IP check is kind of pointless with members, will remove. In classes/poll.php change
if (strstr(','. $this->iplist .',', ','. $_SERVER['REMOTE_ADDR'] .',')) $result = '1';
to
if ($thismember->isguest() && strstr(','. $this->iplist .',', ','. $_SERVER['REMOTE_ADDR'] .',')) $result = '1';
babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Apr 29, 2007 - 1:17 AM:

Paul wrote:
The IP check is kind of pointless with members, will remove. In classes/poll.php change
if (strstr(','. $this->iplist .',', ','. $_SERVER['REMOTE_ADDR'] .',')) $result = '1';
to
if ($thismember->isguest() && strstr(','. $this->iplist .',', ','. $_SERVER['REMOTE_ADDR'] .',')) $result = '1';


Thanks Paul - that's great!
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.