Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,472
There are 1641 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     PHP and MySQL :

Rating system

Thread title: Rating system
Closed Thread    
    Thread tools Search this thread Display Modes  
06-05-2006, 04:39 PM
#1
Garyrae is offline Garyrae
Status: Request a custom title
Join date: Dec 2005
Location: Colchester, UK
Expertise:
Software:
 
Posts: 4,625
iTrader: 16 / 100%
 

Garyrae is on a distinguished road

Send a message via MSN to Garyrae Send a message via Skype™ to Garyrae

  Old  Rating system

Right... I have an articles system, that I want to implement a + - ratings system into.
How would I go about limiting each visitor to 1 vote per article? - The site doesn't use a membership system.

One solution was to store the visitor's IP into a table, then when they voted, check the IP isn't in the table before counting the vote. But, if the site became fairly large, it'd take a while to process it.

Any ideas?

Thanks in advance!

06-05-2006, 05:01 PM
#2
Village Genius is offline Village Genius
Village Genius's Avatar
Status: Geek
Join date: Apr 2006
Location: Denver, CO
Expertise: Software
Software: Chrome, Notepad++
 
Posts: 6,894
iTrader: 18 / 100%
 

Village Genius will become famous soon enough

  Old

have a free registration to rate, ips or cookies are the only other way

06-05-2006, 05:08 PM
#3
Garyrae is offline Garyrae
Status: Request a custom title
Join date: Dec 2005
Location: Colchester, UK
Expertise:
Software:
 
Posts: 4,625
iTrader: 16 / 100%
 

Garyrae is on a distinguished road

Send a message via MSN to Garyrae Send a message via Skype™ to Garyrae

  Old

Membership system would be too much hassle.
Cookies were another idea, but I'd just like to weigh up my options before making a final decision.

06-05-2006, 06:14 PM
#4
aLx is offline aLx
Status: Senior Member
Join date: Jan 2006
Location: USA
Expertise:
Software:
 
Posts: 922
iTrader: 13 / 100%
 

aLx is on a distinguished road

Send a message via AIM to aLx

  Old

On Vote Do This
1. Check For Cookie
2. If No Cookie
--Process The Vote
--Set Cookie "voted"

If Cookie = Voted
--echo 'youve already voted';

That would work for a single thing. If you wanted to make it once for each item.. you would set a variable in the cookie. so

setcookie with voted_id=1 as the data and then check for the cookie using another variable. I can do this for ya if you need for a small price. or you can find your way through that.

GL

06-06-2006, 03:40 PM
#5
karnetics is offline karnetics
Status: I'm new around here
Join date: Aug 2005
Location:
Expertise:
Software:
 
Posts: 7
iTrader: 0 / 0%
 

karnetics is on a distinguished road

  Old

you could try tracking each member by ip address. create a db that stores the ip address and if the ip exist in the db they can not vote again

06-06-2006, 03:58 PM
#6
aLx is offline aLx
Status: Senior Member
Join date: Jan 2006
Location: USA
Expertise:
Software:
 
Posts: 922
iTrader: 13 / 100%
 

aLx is on a distinguished road

Send a message via AIM to aLx

  Old

red his post he already thought of that but doesnt want to do that due to the size it would potentially be. Yoiu could do that and make a CRON to empty the db every week or month, thats what I would reccomend

06-06-2006, 04:14 PM
#7
karnetics is offline karnetics
Status: I'm new around here
Join date: Aug 2005
Location:
Expertise:
Software:
 
Posts: 7
iTrader: 0 / 0%
 

karnetics is on a distinguished road

  Old

what about if he uses session. Create a session script that will create session cookie and set it to expire when ever. When the user votes it save his session id or cookies id in a db to track users votes

06-06-2006, 04:52 PM
#8
Garyrae is offline Garyrae
Status: Request a custom title
Join date: Dec 2005
Location: Colchester, UK
Expertise:
Software:
 
Posts: 4,625
iTrader: 16 / 100%
 

Garyrae is on a distinguished road

Send a message via MSN to Garyrae Send a message via Skype™ to Garyrae

  Old

I've got a cookies system working now. Thanks all!

Closed Thread    


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed