Portal Engine
Version 3.x > Portal Engine > API for forum subscriptions for a user View modes: 
User avatar
Member
Member
macfowler - 9/23/2008 1:51:31 PM
   
API for forum subscriptions for a user
Using the API how can you get a list of what forum subscriptions a user has setup? I'm putting together a custom web part that will list off all of the forums and show with check boxes what forums the user has an "email" subscription to.

Thanks,

-mac fowler

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 9/24/2008 5:24:42 AM
   
RE:API for forum subscriptions for a user
Hi,

you could select information about subscriptions from database (‘Forums_ForumSubscription’ table). The columns are called intuitively. The API is not suitable for selecting these information.

It could be helpful to use API - ForumInfoProvider class (GetAllForums() method) and ForumInfo class for displaying forums.

The API could be used also for inserting a new subscription. You could create a new subscription with the constructor:

CMS.Forums.ForumSubscriptionInfo.ForumSubscriptionInfo ()

Set the appropriate properties of this ForumSubscriptionInfo and save it with:

CMS.Forums.ForumSubscriptionInfoProvider.SetForumSubscriptionInfo(ForumSubscriptionInfo)

More information could be found in our API Reference - http://devnet.kentico.com/downloads/kenticocms_api.zip

Best regards,
Helena Grulichova

User avatar
Member
Member
macfowler - 9/24/2008 11:00:15 AM
   
RE:API for forum subscriptions for a user
I was able to setup a SQL query to pull the users subscriptions and get things working with the GetAllForums()

Thanks again for your help.