Email Notification For InstantKB Comments


Hi,  in previous versions we used to get emailed when ever a comment was added an needed to be approved, I've only just noticed this week that we are no longer getting notified of comments getting added.  I'm not sure if this is only resent, or since the we upgraded to 2.0

Is this actually still avalible?

Thank you
The Prophet
InstantKB Suggestion

Hi Prophet, Hope your very well. Very nice to hear from you again.

Sorry for my delay responding here. I just wanted to confirm your quite right. With 2.0 emails are not generated when a comment is added. For InstantKB.NET 2010 we'll provide an option within member permissions to generate emails when a new comment is added. If your comfortable modifying 2.0.6 I would be happy to post information on how you could generate an email & where you would add the code. Please let me know if this would help.

http://www.instantasp.co.uk/images/line.gif
Kindest Regards,

Ryan Healey



ryan@instantasp.co.uk
www.instantasp.co.uk
Blog | Community | Docs

http://www.instantasp.co.uk/core/assets/images/email/facebook.png http://www.instantasp.co.uk/core/assets/images/email/twitter.png http://www.instantasp.co.uk/core/assets/images/email/google.png http://www.instantasp.co.uk/core/assets/images/email/linkedin.png

Hi Ryan,

Thanks for getting back to me.  Yes if I could get that code sample that would be appreciated.  This would help us greatly, especially as our KB is growing quite well.

Thank you

Regards

The Prophet

Hi Prophet,

Hope your very well. Thank you for your patience. I've had a chance to create the code sample to show how to generate an email whenever a new comment is added to InstantKB.

You'll need to modify the following file…

InstantASP.InstantKB.UI\Controls\AddArticleComment.vb

Within this file locate the "InsertComment" method.

You'll see the following line…

If intCommentID > 0 Then


The intCommentID variable contains the CommentID from the InstantKB_ArticleComments table for the newly added comment. You can modify this method to read…

If intCommentID > 0 Then

' get the sender
If strEmailAddress = "" Then
   strEmailAddress = MyBase.CurrentContext.CurrentUser.EmailAddress
End If

' create our mail
Dim Mail As New InstantASP.Common.Components.MailMessage
Mail.To = "you@yoursite.com"
Mail.From = strEmailAddress
Mail.Body = "You have a new comment"

' add mail to queue
InstantASP.Common.Mail.Queue.Add(Mail)


This will generate your mail whenever a new comment is added.

We'll be looking to provide this option out the box with the 2010 update. If I can assist further or provide any additional examples please don't hesitate to respond,

http://www.instantasp.co.uk/images/line.gif
Kindest Regards,

Ryan Healey



ryan@instantasp.co.uk
www.instantasp.co.uk
Blog | Community | Docs

http://www.instantasp.co.uk/core/assets/images/email/facebook.png http://www.instantasp.co.uk/core/assets/images/email/twitter.png http://www.instantasp.co.uk/core/assets/images/email/google.png http://www.instantasp.co.uk/core/assets/images/email/linkedin.png

Hello Ryan - Our affiliated company that is running KB 2011 on our web server wants to have the feature where someone gets notified when a new comment is added. I've looked in member permissions for their instance and don't see this option there. Is it available somewhere else in KB2011 or does it still require some special coding? Please advise - thank you!
GO

Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....







InstantASP Forums


Search