View Full Version : Ranking Dropdowns (non-duplicates)
aggiefan
09 Feb 2008, 04:17
What I'm trying to do is have the user rank from 1-25 (or something like that) a list of items. I don't want the numbers to be repeated, so there needs to be some kind of validation to where it removes or changes the selection if you pick/type a duplicate.
Are dropdowns the easiest way to go here? If so, i haven't found anywhere how to accomplish this. Can anybody point me in the right direction or give me some advice on how to accomplish this?
MoT3rror
09 Feb 2008, 04:29
When I made a ranking system for a ladder system, I used this code.
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
I found this was the easiest way to keep a update ranking system without storing it in the database and updating every hour, day, etc.
Then when I wanted to get it for a individual clan, I used this code
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
aggiefan
09 Feb 2008, 04:34
Thanks for the quick reply. I'm however, looking to commit the value (eventually) to the database (and am using it on a form). My intention is to use it in the VBContest hack I created.
It is a pick 'em contest for sports. What I want to have is "confidence" ranking where you just don't pick the winner of each game, you pick the winner and assign a confidence value (1-20). If you win, you get that value. If you lose, you get zero. Adds another dimension to the game.
If you do ESPN Bowl Pick 'Em -- it's just like that.
MoT3rror
09 Feb 2008, 04:49
You can have a column in like your user table called confidence_points. This column will hold the points they have gain total. When a user goes to assign a confidence value, the game id(if are you wanting to use it or you can use a different way to tell games part) and the value is stored in a new table. When the game is finished/reported into system, the system will then find all the users that guess correct and add the points to the column confidence_points.
Then a query like this can determine who has the most points.
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
There is still a lot to fill in the system but that should get you the basic ranking system.
Sorry I never played ESPN Bowl Pick 'Em but this my understanding of their system after a quick look through.
aggiefan
09 Feb 2008, 05:58
For example:
On the entry form, we list 20 games (Texas vs Texas A&M, etc). They pick a winner, then in another field, rank it in confidence 1-20.
I need a way to make sure they don't duplicate the ranking in more than one game. That's what I'm looking for. I don't want them to be able to put Texas A&M as 18 and Michigan as 18.
MoT3rror
09 Feb 2008, 18:36
You can have a table like this.
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Then a table like this.
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Then when they send in their confidence points, you just run a query like this.
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
vBulletin® v3.6.12, Copyright ©2000-2013, Jelsoft Enterprises Ltd.