Jump to content

Simple problem - any simple solutions?


Anti-Moronic

Recommended Posts

I have a little issue and not entirely how I should be going about this.

 

I have a comment rating system where people can rate each comment. To reduce abuse, I restrict each rating to one ip....my question is, what happens if 10,000 users rate a single comment (it's happened)? It just doesn't save the new ip to the database, so when it reaches that threshold, anybody can rate without their ip being recorded.

 

Is there a solution to this or a better way to go about it?

 

Should I flush ip's at set intervals or when the field fills up or can I store in a better way?

 

Finally, I use in_array() to search for ip when a new comment is processed. Is that ok? Is there a faster or better way to confirm?

 

Thanks.

Link to comment
Share on other sites

Don't restrict on IP that just doesn't work and only frustrates people because IP's change and users will think your system is flawed because they get a "can't vote because you already voted today" while they just met your website. One of these websites that has this annoyance is megaupload.com when it tells me I already downloaded 10GB.. unless I sleepwalk what I doubt.

 

Plus you also have another problem for example 5 users vote on an item giving it a 5-star rating giving it a total of 5 stars. Now second item received 400 votes and gets an average of 4 stars. You see my point?

Link to comment
Share on other sites

Yes Daniel0 gave them to me recently

 

http://en.wikipedia.org/wiki/Bayesian_average

http://en.wikipedia.org/wiki/Binomial_proportion_confidence_interval

 

I recommend Bayesian average as it is the easiest to implement

 

The simplest of them all is calculating the median altough I'm not sure if this correct the previous stated problem:

http://en.wikipedia.org/wiki/Median

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.