Drupal-
Link Blog and Top Commentators for Drupal
I want to point out a few new features added to this blog in the past few days.
Link Blog
The first is the addition of a link blog. I track hundreds of feeds everyday, so of course I see a lot of great posts that I never get a chance to blog about. From now on, the best of these posts will go into the link blog. You can see the most recent additions in the sidebar under the heading "Great Posts Elsewhere". Clicking the "more" link under those posts will take you to an archive of all links (I just started this, so there's no much in the archive yet). There's also a feed available if anyone's interested.
Notice I didn't go the usual route of creating a shared feed through Google Reader, although that's certainly the easiest way to create a link blog. Google Reader is great, but I prefer to use an offline reader. Also, if I used Google's javascript widget to publish those links here, it wouldn't pass any link love. I'm only linking to posts that really deserve the attention, so I want those links to be visible to both users and search engines.
Top Commentators
The second addition is the "top commentators" block, which rewards those who've commented here in the past 30 days. Right now it lists the top 6 contributors. Wordpress users can accomplish this easily with a plugin, but this blog is powered by Drupal, which has no such plugin. Still, I was able to implement something similar with a bit of PHP. If you're blogging with Drupal and want to add this, here's the code I'm using in that block:
<?php$users = db_query("SELECT COUNT(cid) AS count, mail, name, homepage FROM {comments} WHERE uid != 1 And timestamp > (unix_timestamp(now()) - 3600*24*30) GROUP BY mail ORDER BY count DESC LIMIT 6");print "<ul>";while ($user = db_fetch_object($users)) {print "<li>".l($user->name,"$user->homepage")." ($user->count)</li>";}print "</ul>";?>
Note that this assumes your comments are from anonymous users (without an account on your drupal installation). If you have a mix of anonymous and registered users (other than yourself) you'll need to do some tweaking to make it work.























