Tracking topics in the forum

Vote:
 

I would like to add the possibility to notify people (through e-mail) when a reply has been added to a topic.

Any ideas on how to do this? I was thinking of adding a list of userIDs to the topic in some way and when someone posts a reply, e-mails are sent to the people on that list. Perhaps this list can be stored in an attribute of the topic?

Or is there already funcionality for tracking topics?

Thanks in advance!

 

#29238
Apr 17, 2009 10:27
Vote:
 

One solution would be to add a new attribute to topics. That is:

1. Go to the Community tab and click on "Attributes"

2. Click on the "Create Attribute" button.

3. Type in "Subscribers" as Attribute name, set For type to EPiServer.Community.Forum.Topic and Of type to EPiServer.Common.Security.IUser and click "Save information".

You can then get all subscribers to a topic:

IList subscribers = topic.GetAttributeValues("Subscribers");

 

And add new subscribers:

subscribers.Add(CurrentUser);
topic = (Topic) topic.Clone();
topic.SetAttributeValue("Subscribers", subscribers);

 

#29267
Apr 19, 2009 12:51
Vote:
 

I got a little inspired by this topic and decided to build a more complete solution than the one described above. You'll find a blog entry about it, along with some source code, here.

#29269
Apr 19, 2009 16:58
Vote:
 

Thanks Joel!

My solution was exactly like the one you suggested, which works fine, but I'll take a look at your blog entry as well.

 

#29402
Apr 24, 2009 13:43
This thread is locked and should be used for reference only. Please use the Legacy add-ons forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.