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:

  1. <?php
  2. $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");
  3. print "<ul>";
  4. while ($user = db_fetch_object($users)) {
  5. print "<li>".l($user->name,"$user->homepage")." ($user->count)</li>";
  6. }
  7. print "</ul>";
  8. ?>

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.

Interesting additions, i like both features. I just got into feedreading myself, much easier that way

(Comment added Sun, 03/11/2007 - 10:43)

Awesome, that'll help a Drupal site as active in comments as in a Wordpress system.

(Comment added Thu, 03/15/2007 - 17:55)

I think you'll find that these will help drive visitors to you're site.. at least that's what I was told :)

good luck!

(Comment added Fri, 03/16/2007 - 17:56)

I like the idea of adding a link blog in addition to a normal blog, like you said, it's an easy way to share the items that you think are interesting.

I'm doing a similar thing using Google Reader's shared items. You can generate an embed script for putting your links into a page and then just click "Share" on any items that you want to add. It's nice and easy.

(Comment added Fri, 03/23/2007 - 01:54)

I think the "link blog" is a great idea. Something that I'm going to have to try on my blog.

(Comment added Wed, 04/04/2007 - 00:49)

The linkblog is a good ideea. I'm sure the blogs you're reading will appreciate the link back as well. As for the top commentators, it's been proven to increase comments a lot !

(Comment added Wed, 04/04/2007 - 20:19)

This will definitely improve blog participation, good going.

(Comment added Thu, 04/12/2007 - 20:27)

Adding this plugin really does help people commenting. It is a good way to motivate your readers to add a comment. I added it to my blog and saw an immediate increase in comments.

(Comment added Wed, 07/18/2007 - 03:32)

i will implement this on my blog! it seems to work, you get more people commenting!

(Comment added Fri, 07/27/2007 - 12:39)

This will definitely improve blog participation, good going.

The linkblog is a good idea. I'm sure the blogs you're reading will appreciate the link back as well. As for the top commentators, it's been proven to increase comments a lot !

(Comment added Sat, 09/15/2007 - 06:03)

Thanks for sharing the Top Commenters code. I've added it to my site and it works great!

(Comment added Thu, 03/20/2008 - 02:13)

Hi,
I'm Joseph the google adwords guru personally feels that the linkblog is a great idea. Such a unique feature helps people to comment. A large number of google reader are being motivated to comment on the blog. It's really nice and easy.

(Comment added Fri, 04/25/2008 - 00:25)

it works for me too, thanks

(Comment added Sat, 09/06/2008 - 06:12)

Add my weblog to your directory
http://onlykhatami.persianblog.ir/

(Comment added Wed, 12/03/2008 - 08:56)

Nice tip, Kevin. This will be of great help to us bloggers. Cheers!

(Comment added Tue, 01/06/2009 - 00:48)

Hope this works well for you.

(Comment added Tue, 02/10/2009 - 03:20)

It's very usefule.

???????

(Comment added Tue, 09/08/2009 - 03:18)

Where can I find top commentators code please??

Agence communication Montreal

(Comment added Thu, 10/22/2009 - 17:53)

???????? ??????????, ??? ??????? ????? ?????? ??? ??? ?????????. ?????-?????? ???????-????? ????? ????????? ???? ?????????? ???????????, ? ?????? ? ????, ? ??-???? ????? ??????????? ??? ??? ?????? ??? ? ???????. ??? ????? ????? ???????? ? ?????????? ???????????

(Comment added Sun, 01/10/2010 - 04:48)

Thanks, great.

(Comment added Mon, 01/25/2010 - 10:28)

Very Useful information , this is both good reading for, have quite a few good key points, and I learn some new stuff from it too, thanks for sharing your information.

regards,
handbags

(Comment added Thu, 02/11/2010 - 00:42)

Thank you very rich indeed a site

(Comment added Fri, 03/26/2010 - 00:21)

konteyner, prefabrik, kabin, su deposu uret?m? ve sat?m?

(Comment added Sat, 03/27/2010 - 07:59)

I would put my tail between my legs and beg joomla to take me back. Joomla is really nice, she is readily cusomizable. You need just a day of reading one of the books on her, and she will treat you well. You seem like a tech guy. Read a joomla book to famililize with creating custome html, etc.

(Comment added Sun, 04/04/2010 - 22:43)

Thankyou for sharing..

(Comment added Fri, 04/16/2010 - 11:30)

it works for me too, thanks

(Comment added Sat, 05/08/2010 - 05:08)

What I find so itnerseitng is you could never find this anywhere else.

(Comment added Mon, 09/26/2011 - 07:53)

u9KJ4C busqougxhkzg

(Comment added Tue, 09/27/2011 - 01:06)

86Mb8p uxjeunhwepgi

(Comment added Sat, 10/01/2011 - 09:20)

Thanks for sharing the Top Commenters code. I've added it to my site and it works great!

(Comment added Wed, 06/16/2010 - 13:27)

Read it all! Nice information, many thanks to the author. It is incomprehensible to me now, but in general, the usefulness and significance is overwhelming. Thanks again and good luck!

(Comment added Wed, 09/29/2010 - 05:57)

IMHO, ut's easier to build a view using Views module with the core Statistic module enabled. Create a view for comments, sort them by Most viewed, descending, and limit your list to, say, 10. You'll be able to add whatever fields you deem necessary, such as title of a commented node, or user's comments count, or user's URL…

(Comment added Mon, 11/08/2010 - 12:10)

Top Commentator surely helps to attract good non-spammy comments to your website. This in turns helps you with new and original content. Thus even if you don't post too often, your web page is continuously renewed which is a good sign for Google.

(Comment added Thu, 11/18/2010 - 04:39)

We will explode your mega income by promoting your site Worldwide.
I offer full advertising and optimization to boost your business up on top for only $99! contact me office@adseo.org (www.adseo.org)

(Comment added Wed, 04/27/2011 - 15:43)

I have seen here the article and i read your drupal code which is very good. It is very helpful to many persons.

(Comment added Wed, 06/01/2011 - 22:34)

Genial entrada me encanta tu manera de escribir. He leído rápidamente sus mensajes y puedo ver que su sitio web tiene un potencial enorme para ayudar a muchas personas que buscan este tipo de soluciones. Sin embargo todos los que trabamos en internet tenemos necesidades para mejorar nuestros negocios y esta es una buena manera de hacerlo.

Gracias por dejarme escribir aqui en su pagina.

(Comment added Mon, 06/06/2011 - 12:17)

I will be implementing it on my site and really it is very helpful to me and thanks for sharing this code.

(Comment added Thu, 09/01/2011 - 04:53)

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <dl> <dt> <dd> <li>
  • Lines and paragraphs break automatically.

More information about formatting options