New and Improved Comment System for BlogEngine.NET

by Filip Stanek 2. March 2010 02:24

BlogEngine.NET had a pretty decent commenting system, but it lacked some of the functionality I wanted in a comment system for my blog. So I decided to update it myself, which turned out to be a bigger deal than I thought it would be. Still, after a few evenings of work, I got my comment system. The following is a summary of the new additions.

Comment Listing By Type

comment_type_tabs 

The comments are now arranged in tabs, organized by type.  Although the image above shows three types, there are actually four:

  1. Spam
  2. Unapproved Comments
  3. Trackbacks (and Pingbacks)
  4. Comments

The ‘Spam’ and ‘Unapproved Comments’ tabs are only visible to authenticated users. ‘Trackbacks’ and ‘Comments’ are only visible if there’s something there. The number in parentheses next to each tab contains the number of comments of that type in the tab.  It is also possible to have a ‘Spam’ comment in the ‘Comments’ tab, if that ‘Spam’ comment has a reply which is not spam.  In such cases, the ‘Spam’ comment will be collapsed and users will not be able to see the contents, but they will be able to see the reply.  The inverse applies to the ‘Spam’ and ‘Unapproved Comments’ tabs.

Comment Rating System

rating

Visitors to this blog can now rate the comments, in similar fashion to how users can digg items on Digg ( I even hijacked their thumbs up and down images, I hope they don’t sue! ).

Improved Comment Administration Interface

admin_comment_moderation

In the current version of BlogEngine.NET, there are basically two comment states: Approved and Spam. I added a third comment state: ‘Unapproved Comments’. These are comments that have not yet been either approved or marked as Spam. In the current implementation on this blog, no comments ever go to the Spam tab automatically – they have to be placed there by a moderator. However, if they fail a Spam check, they will be marked as ‘Unapproved Comments’ and not be visible to the public.

The Code

If you’re even thinking about putting this in your blog, you should read these release notes. I have uploaded a file that contains all changes to this location. However, keep in mind that these are NOT SIMPLE CHANGES. There was a lot of code modified, and  you should be fairly familiar with ASP.NET before attempting to put these in your blog. You will need to recompile the BlogEngine.Core project to make this work. Also, if you are using anything other than the XmlProvider that comes with the blog as your data provider, you will need to update that for the comment rating and spam properties, as these are new.  One other note about the zip containing the source: it assumes that you are also using the reCaptcha control I wrote not too long ago, although not all of the files necessary for the reCaptcha are in the zip.

Tags:

Comments

  • Trackbacks (3)
  • Comments (28)

+0 Vote Up     Vote Down # Filip United States on 3/2/2010 2:54:17 AM

Filip

SAMPLE COMMENT FOR DEMONSTRATION PURPOSES: Example of a comment that can be rated up or down.

Reply

+0 Vote Up     Vote Down # Filip on 3/2/2010 2:55:38 AM

Filip

This is a reply to a spam comment.  The spam comment appears "collapsed", although the look can be easily changed in your theme.

Reply

+0 Vote Up     Vote Down # CreepinJesus Australia on 3/2/2010 9:07:34 PM

CreepinJesus

I think I'll have a go at putting this on my site... I'm pretty much doing anything I can get my hands on at the moment!  All for learning purposes, really Smile

I suppose I'll also need to turn on trackbracks, and find out what they are because I have no idea!

Thanks Smile

Reply

+0 Vote Up     Vote Down # Filip United States on 3/3/2010 11:14:47 AM

Filip

FYI, there's a problem with the rating system.  It doesn't seem to be saving the data (or maybe it is saving it but not loading it properly).

Reply

+0 Vote Up     Vote Down # Pozycjonowanie United States on 7/3/2010 2:09:26 PM

Pozycjonowanie

New comment system is really good. I like it.

Reply

+0 Vote Up     Vote Down # perubatan United States on 7/6/2010 11:38:31 AM

perubatan

I had few problems here. Since I start workout on heavy lifting as stated in the web, I always had back pain. Do I have nerve problem? Disc prolapse maybe? should I continue in doing heavy lifting?

Reply

+0 Vote Up     Vote Down # online mafia game United States on 8/27/2010 9:48:31 PM

online mafia game

Mafia style games rule, theres a ton online anymore to play too! its great.

Reply

+0 Vote Up     Vote Down # sonali kadam Canada on 8/28/2010 3:48:30 AM

sonali kadam

Shashi Tharoor replied: absolutely, in cattle class out of solidarity with all our holy cows.

It is very important to note here that Shashi Tharoor had not uttered these words to media or at any public place. It was one-to-one tweeting between Kanchan Gupta and Shashi Tharoor. In fact, even today, you cannot find the source of this tweeting completely, since the responses (in this case, response sent by Shashi Tharoor) is not visible to public. Only Kanchan Gupta was / is able to read it. This was not reported by media anywhere at the time of tweet. It is only afterwards, which found it somehow and propagated it. Moreover, Shashi had just repated the words in affirmation in response to what was asked from him. Means the words did not come at his own initiative.

Reply

+0 Vote Up     Vote Down # sonali kadam Algeria on 8/28/2010 3:56:35 AM

sonali kadam

Shashi Tharoor replied: absolutely, in cattle class out of solidarity with all our holy cows.

It is very important to note here that Shashi Tharoor had not uttered these words to media or at any public place. It was one-to-one tweeting between Kanchan Gupta and Shashi Tharoor. In fact, even today, you cannot find the source of this tweeting completely, since the responses (in this case, response sent by Shashi Tharoor) is not visible to public. Only Kanchan Gupta was / is able to read it. This was not reported by media anywhere at the time of tweet. It is only afterwards, which found it somehow and propagated it. Moreover, Shashi had just repated the words in affirmation in response to what was asked from him. Means the words did not come at his own initiative.

Reply

+0 Vote Up     Vote Down # cheap car insurance for young drivers United States on 8/28/2010 7:56:53 AM

cheap car insurance for young drivers

great post

Reply

+0 Vote Up     Vote Down # Autos United States on 9/1/2010 5:15:38 PM

Autos

Its really useful blog. So that each every one can gain the knowledge about the parts of cars.

Reply

+0 Vote Up     Vote Down # Bios Life Slim United States on 8/30/2010 7:28:34 AM

Bios Life Slim

Its Pleasure to read your blog.The above articles is very impressive, and I really enjoyed reading your blog and points that you expressed. I love to come back on a regular basis,post more on the subject.
Thanks for sharing...keep writing!!!

Reply

+0 Vote Up     Vote Down # ffxiv gil United States on 9/1/2010 1:17:11 AM

ffxiv gil

love the updates, it looks more organize and get away from those bots.

Reply

+0 Vote Up     Vote Down # Long Island Swimming Pools  United States on 9/2/2010 1:38:13 AM

Long Island Swimming Pools 

It's really a nice and helpful piece of information. I'm glad that you shared this helpful info with us. Please keep us informed like this. Thanks for sharing.

Reply

+0 Vote Up     Vote Down # healthe trim review United States on 9/4/2010 3:07:32 AM

healthe trim review

You made some good points there.

Reply

+0 Vote Up     Vote Down # Minneapolis Movers United States on 9/4/2010 7:12:32 AM

Minneapolis Movers

Talking about finding a needle in a haystack! If you are looking for a quality business to purchase - you better roll up your selves because only a small percentage of what you find will be worth your while to pursue.

Reply

+0 Vote Up     Vote Down # Dentysta Torun Netherlands on 9/5/2010 7:35:21 PM

Dentysta Torun

I don't agree with everything in this write-up, but you do make some very good points. I'm very interested in this matter and I myself do alot of research as well. Either way it was a well thoughtout and nice read so I figured I would leave you a comment.

Reply

+0 Vote Up     Vote Down # wisconsin wi real estate United States on 9/6/2010 7:52:57 AM

wisconsin wi real estate

this system is nice... i think its good to put this on a one site.. thanks for posting

Reply

+0 Vote Up     Vote Down # Custom Remodelers United States on 9/7/2010 2:12:38 AM

Custom Remodelers

Looking to buy a business in Australia? This article will tell you all you need to know.

Reply

+0 Vote Up     Vote Down # StarCraft 2 Cheats United States on 9/7/2010 2:13:34 AM

StarCraft 2 Cheats

Learn from the mistakes of others. Make better and different mistakes!

Reply

+0 Vote Up     Vote Down # Best Perfumes Australia on 9/7/2010 4:41:30 AM

Best Perfumes

It's a wonderful information. I really impressed by your work. Thanks for sharing this useful and informative information.

Reply

+0 Vote Up     Vote Down # apidexin review United States on 9/7/2010 4:44:56 AM

apidexin review

This is the perfect blog for anyone who wants to know about this topic.

Reply

+0 Vote Up     Vote Down # panic away scam review, does panic away work United States on 9/7/2010 5:07:18 AM

panic away scam review, does panic away work

Only want to say your article is brilliant. The clearness in your post is simply spectacular and i can assume you are an expert on this subject. Well with your permission allow me to grab your rss feed to keep up to date with succeeding post. Thanks a million and please keep up the effective work.

Reply

+0 Vote Up     Vote Down # Steven Panama on 9/7/2010 11:59:07 AM

Steven

Excellent article. This site is full of interesting posts, but I would like to tell you something - I am running Redhat with the latest version of Firefox, and the layout of your website is kind of weird looking for me. I can look at the blog post, but the navigation doesn't operate so good.

Reply

+0 Vote Up     Vote Down # Erectile Dysfunction United States on 9/8/2010 8:50:50 AM

Erectile Dysfunction

interesting article!

Reply

+0 Vote Up     Vote Down #  used Audi A4 2.0 T for sale  United States on 9/9/2010 3:32:20 AM

 used Audi A4 2.0 T for sale 

Many people approach Car Rental as a lowest-price-possible contest rather than to concentrate on the value of the deal they eventually would get, in terms of what type of car, what’s included (air conditioning, automatic gear shift etc’) as well as what type of service they are buying.

Reply

+0 Vote Up     Vote Down # Custom Remodelers United States on 9/9/2010 3:47:04 AM

Custom Remodelers

In today's market place both new and resale homes are selling briskly. Once you've evaluated the pros and cons of each alternative, you can make an intelligent, educated decision as to which option is best suited for your particular needs.

Reply

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading




Tag cloud

About Filip Stanek

Death Note Pic I'm a developer at ACG Multimedia in Cincinnati, OH. Besides working with ASP.NET, Flash, and other web technologies, I enjoy playing chess, video games, etc.

Currently playing:
- Final Fantasy XIII
E-mail me Send mail

Recent Comments

Comment RSS

Month List

Page List