QUOTE(alex1985 @ Apr 20 2008, 07:26 AM)

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:
CODE
$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 rank
return $ranks[floor(strlen($string)/($highest_rank/(count($ranks)-1)))];
Reply