From: <dam...@us...> - 2004-04-30 21:01:33
|
Update of /cvsroot/tikiwiki/tiki/lib/rankings In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5784/lib/rankings Modified Files: Tag: BRANCH-1-8 ranklib.php Log Message: New module Top Forum Posters, shows avatar,name, and no. of posts Index: ranklib.php =================================================================== RCS file: /cvsroot/tikiwiki/tiki/lib/rankings/ranklib.php,v retrieving revision 1.6.2.4 retrieving revision 1.6.2.5 diff -u -d -r1.6.2.4 -r1.6.2.5 --- ranklib.php 29 Mar 2004 20:58:35 -0000 1.6.2.4 +++ ranklib.php 30 Apr 2004 21:01:24 -0000 1.6.2.5 @@ -146,6 +146,23 @@ return $ret; } + function forums_top_posters($qty) { + $query = "select `user`, `posts` from `tiki_user_postings` order by ".$this->convert_sortmode("posts_desc"); + $result = $this->query($query, array(),$qty); + $ret = array(); + + while ($res = $result->fetchRow()) { + $aux["name"] = $res["user"]; + $aux["posts"] = $res["posts"]; + $ret[] = $aux; + } + + $ret["data"] = $ret; + + return $ret; + } + + function forums_ranking_top_topics($limit) { $query = "select tc.`average`,tc.`title`,tf.`name`,tf.`forumId`,tc.`threadId`,tc.`object` |