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 (30)

+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

Filip United States on 3/2/2010 2:54:48 AM

+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 # IT Management Services United States on 7/15/2010 3:59:17 PM

IT Management Services

I'm loving BlogEngine.Net...

Reply

+0 Vote Up     Vote Down # lose stomach fat United States on 7/17/2010 8:58:22 AM

lose stomach fat

Hello, I found your blog from search engine. And I found one thing also that google is also very accurate in result...I found exactly what I was looking for...Have a nice day.

Reply

+0 Vote Up     Vote Down # lose belly fat fast United States on 7/17/2010 9:11:53 AM

lose belly fat fast

-A comment from me for your mind blowing work   

Reply

+0 Vote Up     Vote Down # Terapeak United Kingdom on 7/17/2010 1:36:17 PM

Terapeak

super post and great info, makes me want to read through more.

Reply

+0 Vote Up     Vote Down # Start Sharing Not Selling Indonesia on 7/18/2010 5:00:09 AM

Start Sharing Not Selling

Nice information for a new blogger who is using blogengine net.Thanks

Reply

+0 Vote Up     Vote Down # PHP Clone Scripts United States on 7/19/2010 3:26:29 AM

PHP Clone Scripts

Great Work. Thanks

Reply

+0 Vote Up     Vote Down # Flower store in uk United States on 7/21/2010 2:59:10 AM

Flower store in uk

http://flowersstore.co.uk

Reply

+0 Vote Up     Vote Down # jobplus United States on 7/21/2010 6:47:09 AM

jobplus

Nice post.

Reply

+0 Vote Up     Vote Down # web design company United States on 7/27/2010 1:53:02 AM

web design company

Web applications such as WordPress and Movable Type have created easily implemented blog environments for individual Web sites.

Reply

+0 Vote Up     Vote Down # internet and computer United States on 7/27/2010 5:35:38 AM

internet and computer

what version this improvement can find? I want to know more.

Reply

+0 Vote Up     Vote Down # casino online Israel on 7/28/2010 10:58:08 AM

casino online

Great Job welldone

Reply

+0 Vote Up     Vote Down # uniquehoodiareview.net United States on 7/29/2010 10:37:44 AM

uniquehoodiareview.net

UniqueHoodia – Hoodia you can trust for effective weight loss http://www.uniquehoodiareview.net/http://www.uniquehoodiareview.net/http://www.uniquehoodiareview.net/http://www.uniquehoodiareview.net/

Reply

+0 Vote Up     Vote Down # uniquehoodiareview.net United States on 7/29/2010 10:38:15 AM

uniquehoodiareview.net

UniqueHoodia – Hoodia you can trust for effective weight loss http://www.uniquehoodiareview.net/http://www.uniquehoodiareview.net/http://www.uniquehoodiareview.net/http://www.uniquehoodiareview.net/

Reply

+0 Vote Up     Vote Down # uniquehoodiareview.net United States on 7/29/2010 10:38:38 AM

uniquehoodiareview.net

UniqueHoodia – Hoodia you can trust for effective weight loss http://www.uniquehoodiareview.net/http://www.uniquehoodiareview.net/http://www.uniquehoodiareview.net/http://www.uniquehoodiareview.net/

Reply

+0 Vote Up     Vote Down # electronic cigarette United States on 7/30/2010 8:56:07 AM

electronic cigarette

this is my second time i visit here.

I discovered so many fascinating stuff in your pages especially it's discussion.

From the loads of comments on your articles, I assume I am not the only one having all the enjoyment here!

Keep up the good work. Thanks a lot !!

Have a  Happy  day !!

Reply

+0 Vote Up     Vote Down # wedding photographer neath United Kingdom on 7/30/2010 2:21:55 PM

wedding photographer neath

sure am liking the comment system

Reply

+0 Vote Up     Vote Down # redwings tickets United States on 7/31/2010 4:35:42 AM

redwings tickets

thanks for the informative post.

Reply

+0 Vote Up     Vote Down # magic tickets United States on 7/31/2010 4:36:18 AM

magic tickets

Excellent Blog! I really admire your thinking and the way you have put these information in this post. Thanks for sharing an informative post.

Reply

+0 Vote Up     Vote Down # Daredorm United States on 7/31/2010 3:47:17 PM

Daredorm

Ive not seen this on a Blog Engine site before and in my line of work I see alot Smile

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