WebmasterSite.net: PHP scripts to enable your creativity
WSN Links PHP Directory Software
PHP Scripts Webmaster Links Support Forums

Register | Forgot Password

Poll votes - 1 per member (not IP based)

Version: 2.0.15F
printPrint


Poll votes - 1 per member (not IP based)
babrees
Expert
Avatar

Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 290
Total Posts: 938
Posted 04/28/07 - 05:43 AM:
quote post
#1
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
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 55
Total Posts: 6023
Posted 04/28/07 - 01:44 PM:
quote post
#2
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';

"Do things you love doing, because then it ain't work. Don't do something you don't really enjoy, because you're never going to work hard enough at it." - Bob Young, founder of Red Hat
babrees
Expert
Avatar

Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 290
Total Posts: 938
Posted 04/28/07 - 10:17 PM:
quote post
#3
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


You don't have permission to post.

Please login or register.

   
 
© 2008 Paul Knierim. All rights reserved.