I really liked Girlie's "comment leader board". My only problem was that, I've been blogging for nearly two years. People who commented a lot on my site a year ago, don't neccessarily come by anymore – and there's new people who come by, who comment a lot, and I feel they should be able to get some recognition too… SO, I evened out the score. I modified the code so it will only look at the last month for top commenters.
Girlie has the original script here… Just replace this code:
$leaders = mysql_query("SELECT comment_email, comment_author, COUNT(*) as comment_count FROM mt_comment WHERE (comment_blog_id=8) AND (comment_author!='girlie') GROUP BY comment_author ORDER BY comment_count DESC LIMIT 5");
With this:
$leaders = mysql_query("SELECT comment_url, comment_author, COUNT(*) as comment_count, comment_created_on FROM mt_comment WHERE comment_blog_id=1 AND comment_author!='YOURNAME' AND unix_timestamp(now()) – unix_timestamp(comment_created_on) <= 2678400 GROUP BY comment_author ORDER BY comment_count DESC LIMIT 5");
Change "1" to the blog id of your blog, "YOURNAME" to whatever you use as your name when you comment in your own site, and "5" to how many "leaders" you want to display.
If you want to change the timeframe, you need to replace the "2678400". Here's some other numbers to use:
One week: 604800
Two weeks: 1209600
One month: 2678400 (used in example above)
Two months: 5266800
Six months: 15894000