Jump to content
xisto Community
alex1985

Comments With Ranking PHP

Recommended Posts

Where can I obtain the tutorial which explains how to build comments system with ranking. This is really familiar to forum scripts, ranking depends on the amount the user wrote certain amount of characters in comments field. Ranks like: novice, and so on.

Share this post


Link to post
Share on other sites

Where can I obtain the tutorial which explains how to build comments system with ranking. This is really familiar to forum scripts, ranking depends on the amount the user wrote certain amount of characters in comments field.
Ranks like: novice, and so on.

Yes, I would like to know how this works as well. Do we rank each other or do the admins rank?

Share this post


Link to post
Share on other sites

Where can I obtain the tutorial which explains how to build comments system with ranking. This is really familiar to forum scripts, ranking depends on the amount the user wrote certain amount of characters in comments field.
Ranks like: novice, and so on.


Do you mean like somebody types in a comment and the longer it is the higher the ranking is? You could use strlen to judge the length, then have an array of "rankings".

Example:
$string="This is the comment or whatever you want to judge";$ranks=array("novice","member","pro");$highest_rank=500;  //how many characters are required to get to the highest rankreturn $ranks[floor(strlen($string)/($highest_rank/(count($ranks)-1)))];

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.