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