Rate a site kind of script..

Discussion in 'PHP' started by NeoGen, Dec 4, 2006.

  1. #1
    Does any one know of a php script that can be used for rate a site kind of site.

    Thanks
     
    NeoGen, Dec 4, 2006 IP
  2. Yeldarb

    Yeldarb Active Member

    Messages:
    209
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    55
    #2
    It would be pretty easy to write one yourself. Database with 3 columns, site id, number of points, number of votes.

    Rating is round( number of points / number of votes )
     
    Yeldarb, Dec 6, 2006 IP
  3. krakjoe

    krakjoe Well-Known Member

    Messages:
    1,795
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    135
    #3
    why points and votes ?
     
    krakjoe, Dec 6, 2006 IP
  4. Linkbait

    Linkbait Peon

    Messages:
    373
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Well say you have a rating scale of 1 - 5 :

    Every time someone votes, the scale number they click is added to the cell that contains the points, and the number of votes is updated by + 1. Then you divide the number of points by the number of votes.

    For example, you have a site that gets a rating of 4 and then 5. The number in the points cell would be 9 and the number of votes would be two.

    After a simple division statement you would get a rating of 4.5. I also wrote a script like this for my tutorials site. But mine used CSS hovers and what not for stars and also rounded answers for numbers without decimals.
     
    Linkbait, Dec 6, 2006 IP
  5. Yeldarb

    Yeldarb Active Member

    Messages:
    209
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    55
    #5
    Yeah, basically it's an average.
     
    Yeldarb, Dec 6, 2006 IP