How to create a ranking system that have points and leaderboard

4 Replies - 5796 Views - Last Post: 04 May 2010 - 05:28 AMRate Topic:

Ranking system with PHP? Help

Posted 04 May 2010 - 03:00 AM

As the topic stated ,
How can i create a ranking system in php for my site . I am just a normal php programmer so i need real help .

How it works (my idea is like this):
Users will get some points when they done some activity like adding comments and inviting people .
After getting points like 100points . user from level1 will level up to 2 . This repeat every 100 points .

If anyone knows how to do it ,
PLEASE post a code or an advice here .
You can post give me a link for a tutorial about ranking system in PHP

Re: Ranking system with PHP? Help

Posted 04 May 2010 - 04:33 AM

Don't ask for code. Ask for advice in a specific problem, posting your code that you've written, or pseudo-code examples. Otherwise It's not worth it.
I'll tell you something: Even that you're nice and thank people for everything in advance, they will not spend their time writing and testing a code for your purpose, as well, as they will not do something just to complete someone's task, that will not teach him anything.

You said you're normal PHP programmer, you can't think of anything like this?:

Create database table in your MySQL db, name it 'users'
store there all the information you want about your users (personal details)
AS WELL, add a column called 'rating_score'

every time, when user performs an action in your code that should be rewarded, just update your rating_score column by adding 1 point to existing sum.

Re: Ranking system with PHP? Help

Posted 04 May 2010 - 04:59 AM

Fratyr, on 04 May 2010 - 03:33 AM, said:

Don't ask for code. Ask for advice in a specific problem, posting your code that you've written, or pseudo-code examples. Otherwise It's not worth it.
I'll tell you something: Even that you're nice and thank people for everything in advance, they will not spend their time writing and testing a code for your purpose, as well, as they will not do something just to complete someone's task, that will not teach him anything.

You said you're normal PHP programmer, you can't think of anything like this?:

Create database table in your MySQL db, name it 'users'
store there all the information you want about your users (personal details)
AS WELL, add a column called 'rating_score'

every time, when user performs an action in your code that should be rewarded, just update your rating_score column by adding 1 point to existing sum.

And so on... Don't be lazy, It looks pity.

Sorry lol , I will try to learn it ,what I mean is do anyone know a tutorial like this exist and hopefully someone can provide me with a link . Thanks for your advice .

Re: Ranking system with PHP? Help

Posted 04 May 2010 - 05:28 AM

The best tutorial is to learn the very basics, which is not enough.
Then you must know how to work with them.

The tutorial you request might be very messy, because tutorials never written according to your experience and needs, so there will be a code that can confuse you. I've already gave you an algorithm on how to do that, now google for php and mysql functions on how to accomplish it.