Enables scripted content fragments to use Forums

Properties

NameTypeDescriptionDefaultOptions
ApplicationTypeIdGuidForums application type identifier
ContentTypeIdGuidForums content type identifier
CurrentForumCurrent contextual forum

Methods

Create

Creates a forum

Usage

#set($forumResponse = $core_v2_forum.Create($groupId, $name, "%{AllowedThreadTypes = $allowedThreadTypesArg, DefaultThreadType = $defaultThreadTypeArg, Description = $descriptionArg, EmailFooter = $emailFooterArg, Enabled = $enabledArg, EnableMailingList = $enableMailingListArg, EnableModerationNotifications = $enableModerationNotificationsArg, EnablePassiveMode = $enablePassiveModeArg, EnablePostPoints = $enablePostPointsArg, EnablePostStatistics = $enablePostStatisticsArg, IndexPosts = $indexPostsArg, MailingListAddress = $mailingListAddressArg, MailingListName = $mailingListNameArg, ModeratePosts = $moderatePostsArg, PassiveModeAddress = $passiveModeAddressArg}"))

Parameters

NameTypeDescriptionRequiredDefaultOptions
groupIdintGroup IdRequired
namestringNameRequired
AllowedThreadTypesstringA comma separated list of thread types supported.OptionalDiscussion
DefaultThreadTypestringThe default thread type for the forum if both QuestionAndAnswer and Discussion threads are allowedOptionalDiscussion
DescriptionstringDescriptionOptional
EmailFooterstringEmail FooterOptional
EnabledboolEnabledOptionalTrue
EnableMailingListboolEnable Mailing ListOptionalFalse
EnableModerationNotificationsboolEnable Moderation NotificationsOptionalFalse
EnablePassiveModeboolEnable Passive ModeOptionalFalse
EnablePostPointsboolEnable Post PointsOptionalTrue
EnablePostStatisticsboolEnable Post StatisticsOptionalTrue
IndexPostsboolIndex PostsOptionalTrue
MailingListAddressstringMailing List Address. Required if EnableMailingList is trueOptional
MailingListNamestringMailing List Name. Required if EnableMailingList is trueOptional
ModeratePostsboolModerate PostsOptionalFalse
PassiveModeAddressstringPassive Mode Address. Required if EnablePassiveMode is true.OptionalTrue

Return Type

Forum

Create

Creates a forum

Usage

#set($forumResponse = $core_v2_forum.Create($groupId, $name))

Parameters

NameTypeDescriptionRequiredDefaultOptions
groupIdintGroup IdRequired
namestringNameRequired

Return Type

Forum

Delete

Deletes a forum

Usage

#set($additionalInfoResponse = $core_v2_forum.Delete($id))

Parameters

NameTypeDescriptionRequiredDefaultOptions
idintForum IdRequired

Return Type

AdditionalInfo

Get

Gets a forum

Usage

#set($forumResponse = $core_v2_forum.Get($applicationId))

Parameters

NameTypeDescriptionRequiredDefaultOptions
applicationIdGuidForum Application IdRequired

Return Type

Forum

Get

Gets a forum

Usage

#set($forumResponse = $core_v2_forum.Get($id))

Parameters

NameTypeDescriptionRequiredDefaultOptions
idintForum IdRequired

Return Type

Forum

IsFavorite

Returns favorited status for the accessing user

Usage

#set($booleanResponse = $core_v2_forum.IsFavorite($forumId))

Parameters

NameTypeDescriptionRequiredDefaultOptions
forumIdintForum IdRequired

Return Type

bool

IsSubscribed

Returns subscribed status for the accessing user

Usage

#set($booleanResponse = $core_v2_forum.IsSubscribed($forumId))

Parameters

NameTypeDescriptionRequiredDefaultOptions
forumIdintForum IdRequired

Return Type

bool

List

Lists forums

Usage

#set($pagedListResponse = $core_v2_forum.List())

Return Type

PagedList<Forum>

List

Lists forums

Usage

#set($pagedListResponse = $core_v2_forum.List("%{GroupId = $groupIdArg, IncludeSubGroups = $includeSubGroupsArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg, PermissionId = $permissionIdArg, SortBy = $sortByArg, SortOrder = $sortOrderArg, UserId = $userIdArg}"))

Parameters

NameTypeDescriptionRequiredDefaultOptions
GroupIdintGroup IdOptional
IncludeSubGroupsboolOnly used when GroupId is specified.OptionalFalse
PageIndexintSpecify the page number of paged results to return. Zero-based index.Optional0
PageSizeintSpecify the number of results to return per page.Optional20
PermissionIdstringPermission IdOptional
SortBystringSort ByOptionalSortOrderDateCreated, LastPost, Name, Post, Score:SCORE_ID, SortOrder, Thread, TotalPosts
SortOrderstringSort OrderOptionalAscendingAscending, Descending
UserIdintUser IdOptional

Return Type

PagedList<Forum>

ListForQuickPost

Lists forums available for a quick post context for the accessing user and current group

Usage

#set($iListResponse = $core_v2_forum.ListForQuickPost())

Return Type

IList<Forum>

ListTaggedContent

Lists tagged content. This method is supported for backwards compatibility, but $core_v2_taggedContent.List() should be used if possible.

Usage

#set($pagedListResponse = $core_v2_forum.ListTaggedContent($tags, "%{ForumId = $forumIdArg, GroupId = $groupIdArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg}"))

Parameters

NameTypeDescriptionRequiredDefaultOptions
tagsIList<string>TagsRequired
ForumIdintForum IdOptional
GroupIdintGroup IdOptional
PageIndexintSpecify the page number of paged results to return. Zero-based index.Optional0
PageSizeintSpecify the number of results to return per page.Optional20

Return Type

PagedList<TaggedContent>

ListTags

Lists tags in a forum. This method is supported for backwards compatibility, but $core_v2_tags.List() should be used if possible.

Usage

#set($pagedListResponse = $core_v2_forum.ListTags("%{FilterTags = $filterTagsArg, ForumId = $forumIdArg, GroupId = $groupIdArg, MinimumItemsPerTag = $minimumItemsPerTagArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg}"))

Parameters

NameTypeDescriptionRequiredDefaultOptions
FilterTagsIList<string>Tags to filter byOptional
ForumIdintForum IdOptional
GroupIdintGroup IdOptional
MinimumItemsPerTagintMinimum Items Per TagOptional
PageIndexintPage IndexOptional0
PageSizeintPage SizeOptional100

Return Type

PagedList<Tag>

MarkAllRead

Marks all threads in a forum as read for the accessing user

Usage

$core_v2_forum.MarkAllRead($forumId, $read)

Parameters

NameTypeDescriptionRequiredDefaultOptions
forumIdintForum IdRequired
readboolRead StatusRequired

Search

Searches forums

Usage

#set($pagedListResponse = $core_v2_forum.Search($queryText, "%{GroupId = $groupIdArg, IncludeSubGroups = $includeSubGroupsArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg}"))

Parameters

NameTypeDescriptionRequiredDefaultOptions
queryTextstringSearch QueryRequired
GroupIdintGroup IdOptional
IncludeSubGroupsboolInclude Sub GroupsOptionalFalse
PageIndexintSpecify the page number of paged results to return. Zero-based index.Optional0
PageSizeintSpecify the number of results to return per page.Optional20

Return Type

PagedList<SearchResult>

SetFavorite

Sets favorite status for the accessing user

Usage

$core_v2_forum.SetFavorite($forumId, $favorite)

Parameters

NameTypeDescriptionRequiredDefaultOptions
forumIdintForum IdRequired
favoriteboolFavorite StatusRequired

SetSubscribed

Sets subscribed status for the accessing user

Usage

#set($additionalInfoResponse = $core_v2_forum.SetSubscribed($forumId, $subscribe))

Parameters

NameTypeDescriptionRequiredDefaultOptions
forumIdintForum IdRequired
subscribeboolSubscribed StatusRequired

Return Type

AdditionalInfo

SubscriptionType

Gets the subscription type for the accessing user (None, Thread, Post, MailingList)

Usage

#set($stringResponse = $core_v2_forum.SubscriptionType($forumId))

Parameters

NameTypeDescriptionRequiredDefaultOptions
forumIdintForum IdRequired

Return Type

string

Update

Updates a forum

Usage

#set($forumResponse = $core_v2_forum.Update($id, "%{AllowedThreadTypes = $allowedThreadTypesArg, DefaultThreadType = $defaultThreadTypeArg, Description = $descriptionArg, EmailFooter = $emailFooterArg, Enabled = $enabledArg, EnableMailingList = $enableMailingListArg, EnableModerationNotifications = $enableModerationNotificationsArg, EnablePassiveMode = $enablePassiveModeArg, EnablePostPoints = $enablePostPointsArg, EnablePostStatistics = $enablePostStatisticsArg, GroupId = $groupIdArg, IndexPosts = $indexPostsArg, MailingListAddress = $mailingListAddressArg, MailingListName = $mailingListNameArg, ModeratePosts = $moderatePostsArg, Name = $nameArg, PassiveModeAddress = $passiveModeAddressArg}"))

Parameters

NameTypeDescriptionRequiredDefaultOptions
idintForum IdRequired
AllowedThreadTypesstringA comma separated list of thread types supported.Optional
DefaultThreadTypestringThe default thread type for the forum if both QuestionAndAnswer and Discussion threads are allowedOptional
DescriptionstringDescriptionOptional
EmailFooterstringEmail FooterOptional
EnabledboolEnabledOptional
EnableMailingListboolEnable Mailing ListOptional
EnableModerationNotificationsboolEnable Moderation NotificationsOptional
EnablePassiveModeboolEnable Passive ModeOptional
EnablePostPointsboolEnable Post PointsOptional
EnablePostStatisticsboolEnable Post StatisticsOptional
GroupIdintGroup IdOptional
IndexPostsboolIndex PostsOptional
MailingListAddressstringMailing List Address. Required if EnableMailingList is trueOptional
MailingListNamestringMailing List Name. Required if EnableMailingList is trueOptional
ModeratePostsboolModerate PostsOptional
NamestringNameOptional
PassiveModeAddressstringPassive Mode Address. Required if EnablePassiveMode is true.Optional

Return Type

Forum