BlogUmbraco and Things

Blog4Umbraco Comment Notifications

Author: Nigel Wilson
Posted: 4 August 2011

As part of the recent reskinning / upgrading of this site I became aware that I had received several comments on some of my Umbraco blog posts.

My first thought was - damn and how rude to not have responded and get to know other Umbraco users.

So I did a bit of Googling and found some reference on Codeplex that comment notification functionality is being built, however nothing currently existed.

So I thought I'd come up with a solution to this problem. The following is very much a temporary solution but one that at least helps fill a gap pending release of notification functionality within the core product.

Firstly, I wrote a very short and simple class that generates an email notification and compiled the project into a DLL file.

And then I made changes to the following files:

/usercontrols/Blog4Umbraco/AjaxCommentForm.ascx
Added another AJAX call where oyu specify the email address to send the notification to.

/config/restExtensions.config
Added the /rest extension for the class previously written.

The email generated is a simple one liner confirming a new comment has been added to a blog post. This could be extended to include the comment and the persons details - feel free to adjust to your own needs. 

Feel free to download all the associated code for this change - included in the zip file is :

  • The source code of the project I created for the class
  • The compiled DLL file to simply drop into the BIN directory.
  • The two files mentioned above with inserted code and comments wrapping the changes - I trust it will be a simple task to update your own blogs.

Be good to hear from you if you use this on your site and found it useful.

Cheers

Nigel

  1. Hi Nigel.

    This is a really quick and easy fix to a feature that has sadly been lacking in the current versions of Blog4Umbraco, so thank you. I might have a delve into the source code to see if i can pull through the actual comment text into the email also - I think this might be useful.

    Keep up the good work.

    Dave.

    Dave
    Posted Friday, September 23, 2011 at 10:06:19 PM

  2. Further to Dave's comment, I have updated the code so that the email now includes name, email and comment - thanks for the feedback Dave.

    Nigel
    Posted Sunday, September 25, 2011 at 8:18:02 AM

  3. Simply wish to say your article is as amazing. The clearness in your post is simply excellent and i can assume you’re an expert on this subject. Well with your permission allow me to grab your RSS feed to keep up to date with forthcoming post. Thanks a million and please continue the gratifying

    K.Stevenson
    Posted Saturday, January 14, 2012 at 1:28:45 AM

Post a Comment

Blog Topics

Archives