Results 1 to 8 of 8

Thread: How to create nice looking ranking system?

  1. #1
    Join Date
    Aug 2009
    Posts
    399
    Thanks
    42
    Thanked 4 Times in 4 Posts

    Default How to create nice looking ranking system?

    Hi,
    I have some files, and want them to be ranked by users... How I can do something like in this site? HERE

    There you can see stars, blue line and how many votes... Something like that would fit my needs Thanks

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    What I would do is have a database looking like this:

    And then, say since there are 4 votes for poll #1, I would get everyone that has 1 [true or yes], and do [number of votes for yes] * 100 / total votes, then have a div thats 100px and every percent counts as 1 px. So:
    1: 50% ( 2 * 100 / 4 = 50)
    2: 50% ( 1 * 100 / 2 = 50)

    If you don't understand I can make you an example, also for the stars that would be 2.5 stars / 5 because:
    1: 50% ( 2 * 100 / 4 = 50), 2.5 stars ( 5 * 2 / 4 )
    2: 50% ( 1 * 100 / 2 = 50), 2.5 stars ( 5 * 1 / 2 )
    Jeremy | jfein.net

  3. #3
    Join Date
    Aug 2009
    Posts
    399
    Thanks
    42
    Thanked 4 Times in 4 Posts

    Default

    Thanks, that is a good idea...

  4. #4
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Need help, or do you completely understand?
    Jeremy | jfein.net

  5. #5
    Join Date
    Aug 2009
    Posts
    399
    Thanks
    42
    Thanked 4 Times in 4 Posts

    Default

    I understood it nicely But it looks like in the page stars are divided into 5 stars... its javascript or what?

  6. #6
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Oh - the hover effect? Yes... this is javascript. I find this very cool: http://www.nickstakenburg.com/projects/starbox/ But it uses prototype. Search around google vote rating star scripts or something like that
    Jeremy | jfein.net

  7. #7
    Join Date
    Aug 2009
    Posts
    399
    Thanks
    42
    Thanked 4 Times in 4 Posts

    Default

    whats the difference with prototype?

  8. #8
    Join Date
    Aug 2009
    Posts
    399
    Thanks
    42
    Thanked 4 Times in 4 Posts

    Default

    Maybe there is a way to do it without the prototype?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •