Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Comments With Ranking, PHP
alex1985
post Apr 20 2008, 02:26 PM
Post #1


Super Member
*********

Group: [HOSTED]
Posts: 387
Joined: 9-February 08
Member No.: 57,615



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.
Go to the top of the page
 
+Quote Post
darjin
post Apr 20 2008, 11:37 PM
Post #2


Newbie [Level 1]
*

Group: Members
Posts: 11
Joined: 20-April 08
Member No.: 61,086



QUOTE(alex1985 @ Apr 20 2008, 10: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.

Yes, I would like to know how this works as well. Do we rank each other or do the admins rank?
Go to the top of the page
 
+Quote Post
galexcd
post Apr 21 2008, 04:44 AM
Post #3


Define:EVIL PROGRAMMER (ē'vəl prō'grăm'ər)- n. An organism that converts caffeine into evil software.
*********

Group: [HOSTED]
Posts: 975
Joined: 25-September 05
From: The dungeon deep below the foundation of trap17
Member No.: 12,251



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)))];
Go to the top of the page
 
+Quote Post
alex1985
post Apr 21 2008, 08:00 AM
Post #4


Super Member
*********

Group: [HOSTED]
Posts: 387
Joined: 9-February 08
Member No.: 57,615



That's quite good. But do you know, how can I plug in or just join with my script, do I need to use if condition?

If you know more complicated tutorial on it, please let me know.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Here's A Nice And Interesting Way To Make Comments(9)
  2. New Free Php Photo Weblog Gallery(6)


 



- Lo-Fi Version Time is now: 25th July 2008 - 10:01 AM