Hi martin,
Inside ~/Sitefinity/ControlTemplates/Forums/
EditPost.ascx - you can get newly added content and all previous posts and send an emil to a user. Create a code behind of
EditPost.ascx template and on Page_Load subscribe for save button click.
sample code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Data.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Forums.WebControls;
using Telerik.Forums;
using Telerik.Security;
using System.Web.Security;
using Telerik.Web.UI;
using System.Net.Mail;
using System.Collections;
using Telerik.Forums.Data;
public partial class Sitefinity_ControlTemplates_Forums_EditPost : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
this.saveButton.Click += new EventHandler(saveButton_Click);
}
void saveButton_Click(object sender, EventArgs e)
{
if (!String.IsNullOrEmpty(HttpContext.Current.Request.QueryString["mode"]) && !String.IsNullOrEmpty(HttpContext.Current.Request.QueryString["thread"]))
{
// send email to our subscriber that there is a new post
foreach (var email in query)
{
MailMessage message = new MailMessage("yourhost@here.com", email);
message.IsBodyHtml = true;
message.Body = "<b>ThreadConversation</b>:" + tbQuote.Content + "<b>LastReply is:</b>" + editor.Content + "<br />" + "<i>Click the link below to reply</i>" + "<p>" + uri;
message.From = new MailAddress("yourhost@here.com");
message.Sender = new MailAddress("yourhost@here.com");
SmtpClient client = new SmtpClient();
client.Send(message);
}
}
}
}
Regards,
Ivan Dimitrov
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items