Enables scripted content fragments to use Forums
- Properties
- Create
- Delete
- Get
- IsFavorite
- IsSubscribed
- List
- ListForQuickPost
- ListTaggedContent
- ListTags
- MarkAllRead
- Search
- SetFavorite
- SetSubscribed
- SubscriptionType
- Update
Properties
Name | Access | Type | Description |
---|---|---|---|
ApplicationTypeId | Read | Guid | Forums application type identifier |
ContentTypeId | Read | Guid | Forums content type identifier |
Current | Read | Forum | Current contextual forum |
TotalLicensedRemaining | Read | Int32 | Total number licensed forums |
Methods
Create
Create Overload 1
Creates a forum
Velocity
#set($forumResponse = $core_v2_forum.Create($groupId, $name))
JavaScript
var forumResponse = core_v2_forum.Create(groupId, name);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
groupId | Int32 | Group Id | Required | ||
name | String | Name | Required |
Create Overload 2
Creates a forum
Velocity
#set($forumResponse = $core_v2_forum.Create($groupId, $name, "%{ AllowedThreadTypes = $allowedThreadTypesArg, AutoLockingDefaultInterval = $autoLockingDefaultIntervalArg, AutoLockingEnabled = $autoLockingEnabledArg, DefaultThreadType = $defaultThreadTypeArg, Description = $descriptionArg, EmailFooter = $emailFooterArg, Enabled = $enabledArg, EnableMailingList = $enableMailingListArg, EnablePassiveMode = $enablePassiveModeArg, EnablePostPoints = $enablePostPointsArg, EnablePostStatistics = $enablePostStatisticsArg, EnableQualityVoting = $enableQualityVotingArg, ExtendedAttributes = $extendedAttributesArg, IndexPosts = $indexPostsArg, Key = $keyArg, MailingListAddress = $mailingListAddressArg, MailingListName = $mailingListNameArg, ModeratePosts = $moderatePostsArg, PassiveModeAddress = $passiveModeAddressArg }"))
JavaScript
var forumResponse = core_v2_forum.Create(groupId, name, { AllowedThreadTypes: allowedThreadTypesArg, AutoLockingDefaultInterval: autoLockingDefaultIntervalArg, AutoLockingEnabled: autoLockingEnabledArg, DefaultThreadType: defaultThreadTypeArg, Description: descriptionArg, EmailFooter: emailFooterArg, Enabled: enabledArg, EnableMailingList: enableMailingListArg, EnablePassiveMode: enablePassiveModeArg, EnablePostPoints: enablePostPointsArg, EnablePostStatistics: enablePostStatisticsArg, EnableQualityVoting: enableQualityVotingArg, ExtendedAttributes: extendedAttributesArg, IndexPosts: indexPostsArg, Key: keyArg, MailingListAddress: mailingListAddressArg, MailingListName: mailingListNameArg, ModeratePosts: moderatePostsArg, PassiveModeAddress: passiveModeAddressArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
groupId | Int32 | Group Id | Required | ||
name | String | Name | Required | ||
options | Options | Set of optional parameters including: | Required | ||
AllowedThreadTypes | String | A comma separated list of thread types supported. | Optional | Discussion | Discussion, QuestionAndAnswer |
AutoLockingDefaultInterval | Int32 | The number of days before a thread is automatically locked when the Forum Auto-Locking plugin is enabled. If not specified and auto-locking is enabled, the plugin's configuration value is used. | Optional | ||
AutoLockingEnabled | Boolean | Turns on auto locking of threads according to the configuration of the Forum Auto Locking plugin if it is enabled. | Optional | False | |
DefaultThreadType | String | The default thread type for the forum if both QuestionAndAnswer and Discussion threads are allowed | Optional | Discussion | Discussion, QuestionAndAnswer |
Description | String | Description | Optional | ||
EmailFooter | String | Email Footer | Optional | ||
Enabled | Boolean | Enabled | Optional | True | |
EnableMailingList | Boolean | Enable Mailing List | Optional | False | |
EnablePassiveMode | Boolean | Enable Passive Mode | Optional | False | |
EnablePostPoints | Boolean | Obsolete in 10.0. This option is no longer used. | Optional | True | |
EnablePostStatistics | Boolean | Enable Post Statistics | Optional | True | |
EnableQualityVoting | Boolean | Enable Quality Voting | Optional | False | |
ExtendedAttributes | String | Extended attributes are key-value pairs set using the syntax _ExtendedAttributes_key=value. i.e. _ExtendedAttributes_MyKey=MyValue sets ExtendedAttributes["MyKey"] to "MyValue". | Optional | ||
IndexPosts | Boolean | Index Posts | Optional | True | |
Key | String | String identifier uniquely identifying a forum within its containing group. Used in the url. If unspecified, will be auto-generated based on the Name | Optional | ||
MailingListAddress | String | Mailing List Address. Required if EnableMailingList is true | Optional | ||
MailingListName | String | Mailing List Name. Required if EnableMailingList is true | Optional | ||
ModeratePosts | Boolean | Moderate Posts | Optional | False | |
PassiveModeAddress | String | Passive Mode Address. Required if EnablePassiveMode is true. | Optional | True |
Returns
Delete
Deletes a forum
Velocity
#set($additionalInfoResponse = $core_v2_forum.Delete($id))
JavaScript
var additionalInfoResponse = core_v2_forum.Delete(id);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | Int32 | Forum Id | Required |
Returns
Get
Get Overload 1
Gets a forum
Velocity
#set($forumResponse = $core_v2_forum.Get($id))
JavaScript
var forumResponse = core_v2_forum.Get(id);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | Int32 | Forum Id | Required |
Get Overload 2
Gets a forum
Velocity
#set($forumResponse = $core_v2_forum.Get($applicationId))
JavaScript
var forumResponse = core_v2_forum.Get(applicationId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
applicationId | Guid | Forum Application Id | Required |
Get Overload 3
Gets a forum using the assigned key and its group's Id
Velocity
#set($forumResponse = $core_v2_forum.Get($key, $groupId))
JavaScript
var forumResponse = core_v2_forum.Get(key, groupId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
key | String | Forum key | Required | ||
groupId | Int32 | Group Id | Required |
Returns
IsFavorite
Returns favorited status for the accessing user. DEPRECATED: Use $core_v2_bookmark.Get() instead.
Velocity
#set($booleanResponse = $core_v2_forum.IsFavorite($forumId))
JavaScript
var booleanResponse = core_v2_forum.IsFavorite(forumId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
forumId | Int32 | Forum Id | Required |
Returns
Boolean
IsSubscribed
Returns subscribed status for the accessing user
Velocity
#set($booleanResponse = $core_v2_forum.IsSubscribed($forumId))
JavaScript
var booleanResponse = core_v2_forum.IsSubscribed(forumId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
forumId | Int32 | Forum Id | Required |
Returns
Boolean
List
List Overload 1
Lists forums
Velocity
#set($pagedListResponse = $core_v2_forum.List())
JavaScript
var pagedListResponse = core_v2_forum.List();
List Overload 2
Lists forums
Velocity
#set($pagedListResponse = $core_v2_forum.List("%{ ApplicationIds = $applicationIdsArg, GroupId = $groupIdArg, IncludeSubGroups = $includeSubGroupsArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg, PermissionId = $permissionIdArg, SortBy = $sortByArg, SortOrder = $sortOrderArg, UserId = $userIdArg }"))
JavaScript
var pagedListResponse = core_v2_forum.List({ ApplicationIds: applicationIdsArg, GroupId: groupIdArg, IncludeSubGroups: includeSubGroupsArg, PageIndex: pageIndexArg, PageSize: pageSizeArg, PermissionId: permissionIdArg, SortBy: sortByArg, SortOrder: sortOrderArg, UserId: userIdArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
options | Options | Set of optional parameters including: | Required | ||
ApplicationIds | String | Used to limit to a specific set of forums as well as sort order if SortBy is set to ApplicationIdsOrder | Optional | ||
GroupId | Int32 | Group Id | Optional | ||
IncludeSubGroups | Boolean | Only used when GroupId is specified. | Optional | False | |
PageIndex | Int32 | Specify the page number of paged results to return. Zero-based index. | Optional | 0 | |
PageSize | Int32 | Specify the number of results to return per page. | Optional | 20 | |
PermissionId | String | Permission Id | Optional | ||
SortBy | String | Sort By | Optional | SortOrder | ApplicationIdsOrder, DateCreated, LastPost, Name, Post, SortOrder, Thread, TotalPosts |
SortOrder | String | Sort Order | Optional | Ascending | Ascending, Descending |
UserId | Int32 | Obsolete in 9.2: User Id should no longer be used. Rely on the authenticated or impersonated user instead | Optional |
Returns
ListForQuickPost
Lists forums available for a quick post context for the accessing user and current group
Velocity
#set($iListResponse = $core_v2_forum.ListForQuickPost())
JavaScript
var iListResponse = core_v2_forum.ListForQuickPost();
Returns
IList of Forum
ListTaggedContent
Lists tagged content. DEPRECATED: This method is supported for backwards compatibility, but $core_v2_taggedContent.List() should be used if possible.
Velocity
#set($pagedListResponse = $core_v2_forum.ListTaggedContent($tags, "%{ ForumId = $forumIdArg, GroupId = $groupIdArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg }"))
JavaScript
var pagedListResponse = core_v2_forum.ListTaggedContent(tags, { ForumId: forumIdArg, GroupId: groupIdArg, PageIndex: pageIndexArg, PageSize: pageSizeArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
tags | IList of String | Tags | Required | ||
options | Options | Set of optional parameters including: | Required | ||
ForumId | Int32 | Forum Id | Optional | ||
GroupId | Int32 | Group Id | Optional | ||
PageIndex | Int32 | Specify the page number of paged results to return. Zero-based index. | Optional | 0 | |
PageSize | Int32 | Specify the number of results to return per page. | Optional | 20 |
Returns
ListTags
Lists tags in a forum. DEPRECATED: This method is supported for backwards compatibility, but $core_v2_tags.List() should be used if possible.
Velocity
#set($pagedListResponse = $core_v2_forum.ListTags("%{ FilterTags = $filterTagsArg, ForumId = $forumIdArg, GroupId = $groupIdArg, MinimumItemsPerTag = $minimumItemsPerTagArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg }"))
JavaScript
var pagedListResponse = core_v2_forum.ListTags({ FilterTags: filterTagsArg, ForumId: forumIdArg, GroupId: groupIdArg, MinimumItemsPerTag: minimumItemsPerTagArg, PageIndex: pageIndexArg, PageSize: pageSizeArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
options | Options | Set of optional parameters including: | Required | ||
FilterTags | IList of String | Tags to filter by | Optional | ||
ForumId | Int32 | Forum Id | Optional | ||
GroupId | Int32 | Group Id | Optional | ||
MinimumItemsPerTag | Int32 | Minimum Items Per Tag | Optional | ||
PageIndex | Int32 | Page Index | Optional | 0 | |
PageSize | Int32 | Page Size | Optional | 100 |
Returns
MarkAllRead
Marks all threads in a forum as read for the accessing user
Velocity
$core_v2_forum.MarkAllRead($forumId, $read)
JavaScript
core_v2_forum.MarkAllRead(forumId, read);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
forumId | Int32 | Forum Id | Required | ||
read | Boolean | Read Status | Required |
Returns
NothingSearch
Searches forums
Velocity
#set($pagedListResponse = $core_v2_forum.Search($queryText, "%{ GroupId = $groupIdArg, IncludeSubGroups = $includeSubGroupsArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg }"))
JavaScript
var pagedListResponse = core_v2_forum.Search(queryText, { GroupId: groupIdArg, IncludeSubGroups: includeSubGroupsArg, PageIndex: pageIndexArg, PageSize: pageSizeArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
queryText | String | Search Query | Required | ||
options | Options | Set of optional parameters including: | Required | ||
GroupId | Int32 | Group Id | Optional | ||
IncludeSubGroups | Boolean | Include Sub Groups | Optional | False | |
PageIndex | Int32 | Specify the page number of paged results to return. Zero-based index. | Optional | 0 | |
PageSize | Int32 | Specify the number of results to return per page. | Optional | 20 |
Returns
SetFavorite
Sets favorite status for the accessing user. DEPRECATED: Use $core_v2_bookmark.Create() or $core_v2_bookmark.Delete() instead.
Velocity
$core_v2_forum.SetFavorite($forumId, $favorite)
JavaScript
core_v2_forum.SetFavorite(forumId, favorite);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
forumId | Int32 | Forum Id | Required | ||
favorite | Boolean | Favorite Status | Required |
Returns
NothingSetSubscribed
Sets subscribed status for the accessing user
Velocity
#set($additionalInfoResponse = $core_v2_forum.SetSubscribed($forumId, $subscribe))
JavaScript
var additionalInfoResponse = core_v2_forum.SetSubscribed(forumId, subscribe);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
forumId | Int32 | Forum Id | Required | ||
subscribe | Boolean | Subscribed Status | Required |
Returns
SubscriptionType
Gets the subscription type for the accessing user (None, Thread, Post, MailingList)
Velocity
#set($stringResponse = $core_v2_forum.SubscriptionType($forumId))
JavaScript
var stringResponse = core_v2_forum.SubscriptionType(forumId);
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
forumId | Int32 | Forum Id | Required |
Returns
String
Update
Updates a forum
Velocity
#set($forumResponse = $core_v2_forum.Update($id, "%{ AllowedThreadTypes = $allowedThreadTypesArg, AutoLockingDefaultInterval = $autoLockingDefaultIntervalArg, AutoLockingEnabled = $autoLockingEnabledArg, DefaultThreadType = $defaultThreadTypeArg, Description = $descriptionArg, EmailFooter = $emailFooterArg, Enabled = $enabledArg, EnableMailingList = $enableMailingListArg, EnablePassiveMode = $enablePassiveModeArg, EnablePostPoints = $enablePostPointsArg, EnablePostStatistics = $enablePostStatisticsArg, EnableQualityVoting = $enableQualityVotingArg, ExtendedAttributes = $extendedAttributesArg, GroupId = $groupIdArg, IndexPosts = $indexPostsArg, Key = $keyArg, MailingListAddress = $mailingListAddressArg, MailingListName = $mailingListNameArg, ModeratePosts = $moderatePostsArg, Name = $nameArg, PassiveModeAddress = $passiveModeAddressArg }"))
JavaScript
var forumResponse = core_v2_forum.Update(id, { AllowedThreadTypes: allowedThreadTypesArg, AutoLockingDefaultInterval: autoLockingDefaultIntervalArg, AutoLockingEnabled: autoLockingEnabledArg, DefaultThreadType: defaultThreadTypeArg, Description: descriptionArg, EmailFooter: emailFooterArg, Enabled: enabledArg, EnableMailingList: enableMailingListArg, EnablePassiveMode: enablePassiveModeArg, EnablePostPoints: enablePostPointsArg, EnablePostStatistics: enablePostStatisticsArg, EnableQualityVoting: enableQualityVotingArg, ExtendedAttributes: extendedAttributesArg, GroupId: groupIdArg, IndexPosts: indexPostsArg, Key: keyArg, MailingListAddress: mailingListAddressArg, MailingListName: mailingListNameArg, ModeratePosts: moderatePostsArg, Name: nameArg, PassiveModeAddress: passiveModeAddressArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
id | Int32 | Forum Id | Required | ||
options | Options | Set of optional parameters including: | Required | ||
AllowedThreadTypes | String | A comma separated list of thread types supported. | Optional | Discussion, QuestionAndAnswer | |
AutoLockingDefaultInterval | Int32 | The number of days before a thread is automatically locked when the Forum Auto-Locking plugin is enabled. If not specified and auto-locking is enabled, the plugin's configuration value is used. | Optional | ||
AutoLockingEnabled | Boolean | Turns on auto locking of threads according to the configuration of the Forum Auto Locking plugin if it is enabled. | Optional | False | |
DefaultThreadType | String | The default thread type for the forum if both QuestionAndAnswer and Discussion threads are allowed | Optional | Discussion, QuestionAndAnswer | |
Description | String | Description | Optional | ||
EmailFooter | String | Email Footer | Optional | ||
Enabled | Boolean | Enabled | Optional | ||
EnableMailingList | Boolean | Enable Mailing List | Optional | ||
EnablePassiveMode | Boolean | Enable Passive Mode | Optional | ||
EnablePostPoints | Boolean | Obsolete in 10.0. This option is no longer used. | Optional | True | |
EnablePostStatistics | Boolean | Enable Post Statistics | Optional | ||
EnableQualityVoting | Boolean | Enable Quality Voting | Optional | False | |
ExtendedAttributes | String | Extended attributes are key-value pairs set using the syntax _ExtendedAttributes_key=value. i.e. _ExtendedAttributes_MyKey=MyValue sets ExtendedAttributes["MyKey"] to "MyValue". | Optional | ||
GroupId | Int32 | Group Id | Optional | ||
IndexPosts | Boolean | Index Posts | Optional | ||
Key | String | String identifier uniquely identifying a forum within its containing group. Used in the url. If unspecified, will be auto-generated based on the Name | Optional | ||
MailingListAddress | String | Mailing List Address. Required if EnableMailingList is true | Optional | ||
MailingListName | String | Mailing List Name. Required if EnableMailingList is true | Optional | ||
ModeratePosts | Boolean | Moderate Posts | Optional | ||
Name | String | Name | Optional | ||
PassiveModeAddress | String | Passive Mode Address. Required if EnablePassiveMode is true. | Optional |