Methods
AddPollItem
Adds a poll option to a thread
Usage
#set($pollItemResponse = $core_v2_forumThread.AddPollItem($threadId, $answer, $orderNumber))
Parameters
| Name | Type | Description | Required | Default | Options |
|---|
| threadId | int | Thread Id | Required | | |
| answer | string | Answer | Required | | |
| orderNumber | int | Order Number | Required | | |
Return Type
PollItem
AreRatingsEnabled
Returns whether ratings are enabled on a thread
Usage
#set($booleanResponse = $core_v2_forumThread.AreRatingsEnabled($forumThreadId))
Parameters
| Name | Type | Description | Required | Default | Options |
|---|
| forumThreadId | int | Forum Thread Id | Required | | |
Return Type
bool
Create
Creates a Forum Thread
Usage
#set($forumThreadResponse = $core_v2_forumThread.Create($forumId, $subject, $body, "%{ContentType = $contentTypeArg, FeaturedImage = $featuredImageArg, FileData = $fileDataArg, FileName = $fileNameArg, FileUrl = $fileUrlArg, HasPoll = $hasPollArg, IsAnonymous = $isAnonymousArg, IsFeatured = $isFeaturedArg, IsLocked = $isLockedArg, IsQuestion = $isQuestionArg, IsSticky = $isStickyArg, PollDescription = $pollDescriptionArg, PollExpirationDate = $pollExpirationDateArg, PollTitle = $pollTitleArg, PostDate = $postDateArg, StickyDate = $stickyDateArg, SubscribeToThread = $subscribeToThreadArg, Tags = $tagsArg}"))Parameters
| Name | Type | Description | Required | Default | Options |
|---|
| forumId | int | Forum Id | Required | | |
| subject | string | Subject | Required | | |
| body | string | Body | Required | | |
| ContentType | string | Used when adding a post attachement | Optional | | |
| FeaturedImage | string | URL of image to use when IsFeatured is true | Optional | | |
| FileData | Byte[] | When adding a post attachment either FileData or FileUrl is required. | Optional | | |
| FileName | string | Used when adding a post attachement | Optional | | |
| FileUrl | string | When adding a post attachment either FileData or FileUrl is required. | Optional | | |
| HasPoll | bool | Has Poll | Optional | False | |
| IsAnonymous | bool | Is Anonymous | Optional | False | |
| IsFeatured | bool | Is Featured | Optional | False | |
| IsLocked | bool | Is Locked | Optional | False | |
| IsQuestion | bool | Only used when the forum being posted to has both discussions and questions | Optional | False | |
| IsSticky | bool | Is Sticky | Optional | False | |
| PollDescription | string | Poll Description | Optional | | |
| PollExpirationDate | DateTime | Poll Expiration Date | Optional | | |
| PollTitle | string | Poll Title | Optional | | |
| PostDate | DateTime | Post Date | Optional | Current Date | |
| StickyDate | DateTime | If a thread is sticky, used to specify how long it should be sticky. If no sticky date provided default is current date + 25 years | Optional | | |
| SubscribeToThread | bool | Subscribe To Thread | Optional | False | |
| Tags | string | A comma separated list of tags | Optional | | |
Return Type
ForumThread
Create
Creates a Forum Thread
Usage
#set($forumThreadResponse = $core_v2_forumThread.Create($forumId, $subject, $body))
Parameters
| Name | Type | Description | Required | Default | Options |
|---|
| forumId | int | Forum Id | Required | | |
| subject | string | Subject | Required | | |
| body | string | Body | Required | | |
Return Type
ForumThread
Delete
Deletes a Forum Thread
Usage
#set($additionalInfoResponse = $core_v2_forumThread.Delete($threadId, "%{DeleteChildren = $deleteChildrenArg, DeleteReason = $deleteReasonArg, SendAuthorDeleteNotification = $sendAuthorDeleteNotificationArg}"))Parameters
| Name | Type | Description | Required | Default | Options |
|---|
| threadId | int | Thread Id | Required | | |
| DeleteChildren | bool | Delete Children | Optional | False | |
| DeleteReason | string | Delete Reason | Optional | False | |
| SendAuthorDeleteNotification | bool | Send Author Delete Notification | Optional | False | |
Return Type
AdditionalInfo
DeleteWikiPageAssociation
Deletes an association with a wiki page if one exits
Usage
#set($additionalInfoResponse = $core_v2_forumThread.DeleteWikiPageAssociation($threadId))
Parameters
| Name | Type | Description | Required | Default | Options |
|---|
| threadId | int | Thread Id | Required | | |
Return Type
AdditionalInfo
Get
Gets a Forum Thread
Usage
#set($forumThreadResponse = $core_v2_forumThread.Get($threadId, "%{ForumId = $forumIdArg}"))Parameters
| Name | Type | Description | Required | Default | Options |
|---|
| threadId | int | Thread Id | Required | | |
| ForumId | int | Forum Id | Optional | | |
Return Type
ForumThread
Get
Gets a Forum Thread
Usage
#set($forumThreadResponse = $core_v2_forumThread.Get($contentId))
Parameters
| Name | Type | Description | Required | Default | Options |
|---|
| contentId | Guid | Thread Content Id | Required | | |
Return Type
ForumThread
Get
Gets a Forum Thread
Usage
#set($forumThreadResponse = $core_v2_forumThread.Get($threadId))
Parameters
| Name | Type | Description | Required | Default | Options |
|---|
| threadId | int | Thread Id | Required | | |
Return Type
ForumThread
GetRating
Gets the rating
Usage
#set($ratingResponse = $core_v2_forumThread.GetRating($forumThreadId))
Parameters
| Name | Type | Description | Required | Default | Options |
|---|
| forumThreadId | int | Forum Thread Id | Required | | |
Return Type
Rating
IncrementViewCount
Increments the view count for a thread
Usage
$core_v2_forumThread.IncrementViewCount($forumThreadId)
Parameters
| Name | Type | Description | Required | Default | Options |
|---|
| forumThreadId | int | Forum Thread Id | Required | | |
IsFavorite
Returns favorite status for the accessing user
Usage
#set($booleanResponse = $core_v2_forumThread.IsFavorite($forumThreadId))
Parameters
| Name | Type | Description | Required | Default | Options |
|---|
| forumThreadId | int | Forum Thread Id | Required | | |
Return Type
bool
IsMuted
Returns the muted status for the accessing user
Usage
#set($booleanResponse = $core_v2_forumThread.IsMuted($forumThreadId))
Parameters
| Name | Type | Description | Required | Default | Options |
|---|
| forumThreadId | int | Forum Thread Id | Required | | |
Return Type
bool
IsSubscribed
Returns subscribed status for the accessing user
Usage
#set($booleanResponse = $core_v2_forumThread.IsSubscribed($forumThreadId))
Parameters
| Name | Type | Description | Required | Default | Options |
|---|
| forumThreadId | int | Forum Thread Id | Required | | |
Return Type
bool
List
Usage
#set($pagedListResponse = $core_v2_forumThread.List("%{ForumId = $forumIdArg, ForumThreadQueryType = $forumThreadQueryTypeArg, GroupId = $groupIdArg, IncludeDiscussions = $includeDiscussionsArg, IncludeQuestions = $includeQuestionsArg, IncludeSubGroups = $includeSubGroupsArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg, PopularOnly = $popularOnlyArg, SortBy = $sortByArg, SortOrder = $sortOrderArg}"))Parameters
| Name | Type | Description | Required | Default | Options |
|---|
| ForumId | int | Forum Id | Optional | | |
| ForumThreadQueryType | string | Forum Thread Query Type | Optional | All | Active, All, Answered, AnsweredNotVerified, AnsweredWithNotVerified, Moderated, MyThreads, Unanswered, Unread |
| GroupId | int | Group Id | Optional | | |
| IncludeDiscussions | bool | Include discussion threads | Optional | True | |
| IncludeQuestions | bool | Include question and answer threads | Optional | True | |
| IncludeSubGroups | bool | Whether to include sub groups | Optional | False | |
| PageIndex | int | Specify the page number of paged results to return. Zero-based index. | Optional | 0 | |
| PageSize | int | Specify the number of results to return per page. | Optional | 20 | |
| PopularOnly | bool | Whether to include popular threads only | Optional | False | |
| SortBy | string | lastpost | Optional | | date, lastpost, replies, Score:SCORE_ID, topic, views |
| SortOrder | string | Default is desc for lastpost, date, replies, and views. Default is asc for topic | Optional | | asc, desc |
Return Type
PagedList<ForumThread>
List
Lists Forum Threads
Usage
#set($pagedListResponse = $core_v2_forumThread.List($forumThreadQueryType, "%{ForumId = $forumIdArg, GroupId = $groupIdArg, IncludeDiscussions = $includeDiscussionsArg, IncludeQuestions = $includeQuestionsArg, IncludeSubGroups = $includeSubGroupsArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg, PopularOnly = $popularOnlyArg, SortBy = $sortByArg, SortOrder = $sortOrderArg}"))Parameters
| Name | Type | Description | Required | Default | Options |
|---|
| forumThreadQueryType | string | Forum Thread Query Type | Required | All | Active, All, Answered, AnsweredNotVerified, AnsweredWithNotVerified, Moderated, MyThreads, Unanswered, Unread |
| ForumId | int | Forum Id | Optional | | |
| GroupId | int | Group Id | Optional | | |
| IncludeDiscussions | bool | Include discussion threads | Optional | True | |
| IncludeQuestions | bool | Include question and answer threads | Optional | True | |
| IncludeSubGroups | bool | Whether to include sub groups | Optional | False | |
| PageIndex | int | Specify the page number of paged results to return. Zero-based index. | Optional | 0 | |
| PageSize | int | Specify the number of results to return per page. | Optional | 20 | |
| PopularOnly | bool | Whether to include popular threads only | Optional | False | |
| SortBy | string | lastpost | Optional | | date, lastpost, replies, topic, views |
| SortOrder | string | Default is desc for lastpost, date, replies, and views. Default is asc for topic | Optional | | asc, desc |
Return Type
PagedList<ForumThread>
List
Lists Forum Threads
Usage
#set($pagedListResponse = $core_v2_forumThread.List($forumThreadQueryType))
Parameters
| Name | Type | Description | Required | Default | Options |
|---|
| forumThreadQueryType | string | Forum Thread Query Type | Required | All | Active, All, Answered, AnsweredNotVerified, AnsweredWithNotVerified, Moderated, MyThreads, Unanswered, Unread |
Return Type
PagedList<ForumThread>
List
Lists Forum Threads
Usage
#set($pagedListResponse = $core_v2_forumThread.List())
Return Type
PagedList<ForumThread>
ListPollItems
Lists poll options in a thread
Usage
#set($apiListResponse = $core_v2_forumThread.ListPollItems($threadId))
Parameters
| Name | Type | Description | Required | Default | Options |
|---|
| threadId | int | Thread Id | Required | | |
Return Type
ApiList<PollItem>
Preview
Previews a thread before it is saved
Usage
#set($forumThreadResponse = $core_v2_forumThread.Preview($forumId, "%{Body = $bodyArg, ContentType = $contentTypeArg, FeaturedImage = $featuredImageArg, FileData = $fileDataArg, FileName = $fileNameArg, FileUrl = $fileUrlArg, IsAnonymous = $isAnonymousArg, IsFeatured = $isFeaturedArg, IsLocked = $isLockedArg, IsQuestion = $isQuestionArg, IsSticky = $isStickyArg, PostDate = $postDateArg, StickyDate = $stickyDateArg, Subject = $subjectArg, SubscribeToThread = $subscribeToThreadArg, Tags = $tagsArg}"))Parameters
| Name | Type | Description | Required | Default | Options |
|---|
| forumId | int | Forum Id | Required | | |
| Body | string | Body | Optional | | |
| ContentType | string | Used when adding a post attachement | Optional | | |
| FeaturedImage | string | Featured Image | Optional | | |
| FileData | Byte[] | When adding a post attachment either FileData or FileUrl is required. | Optional | | |
| FileName | string | Used when adding a post attachement | Optional | | |
| FileUrl | string | When adding a post attachment either FileData or FileUrl is required. | Optional | | |
| IsAnonymous | bool | Is Anonymous | Optional | False | |
| IsFeatured | bool | Is Featured | Optional | False | |
| IsLocked | bool | Is Locked | Optional | False | |
| IsQuestion | bool | Only used when the forum being posted to has both discussions and questions | Optional | False | |
| IsSticky | bool | Is Sticky | Optional | False | |
| PostDate | DateTime | Post Date | Optional | Current Date | |
| StickyDate | DateTime | If a thread is sticky, used to specify how long it should be sticky. If no sticky date provided default is current date + 25 years | Optional | | |
| Subject | string | Subject | Optional | | |
| SubscribeToThread | bool | Subscribe To Thread | Optional | False | |
| Tags | string | A comma separated list of tags | Optional | | |
Return Type
ForumThread
RemovePollItem
Removes a poll option from a thread
Usage
#set($additionalInfoResponse = $core_v2_forumThread.RemovePollItem($threadId, $answerId))
Parameters
| Name | Type | Description | Required | Default | Options |
|---|
| threadId | int | Thread Id | Required | | |
| answerId | string | Answer Id | Required | | |
Return Type
AdditionalInfo
Report
Obsolete: No longer supported. Use $core_v2_abuseReport.Create() instead.
Usage
#set($forumThreadResponse = $core_v2_forumThread.Report($subject, $body, "%{Tags = $tagsArg}"))Parameters
| Name | Type | Description | Required | Default | Options |
|---|
| subject | string | Subject | Required | | |
| body | string | Body | Required | | |
| Tags | string | Comma-separated list of tags | Optional | | |
Return Type
ForumThread
SetFavorite
Sets favorite status for the accessing user
Usage
$core_v2_forumThread.SetFavorite($forumThreadId, $favorite)
Parameters
| Name | Type | Description | Required | Default | Options |
|---|
| forumThreadId | int | Forum Thread Id | Required | | |
| favorite | bool | Favorite Status | Required | | |
SetMuted
Sets the muted status for the accessing user
Usage
$core_v2_forumThread.SetMuted($forumThreadId, $mute)
Parameters
| Name | Type | Description | Required | Default | Options |
|---|
| forumThreadId | int | Forum Thread Id | Required | | |
| mute | bool | Muted Status | Required | | |
SetRating
Sets the rating for the accessing user
Usage
$core_v2_forumThread.SetRating($forumThreadId, $rating)
Parameters
| Name | Type | Description | Required | Default | Options |
|---|
| forumThreadId | int | Forum Thread Id | Required | | |
| rating | int | Rating value (0-5) | Required | | |
SetSubscribed
Sets subscribed status for the accessing user
Usage
#set($additionalInfoResponse = $core_v2_forumThread.SetSubscribed($forumThreadId, $subscribe))
Parameters
| Name | Type | Description | Required | Default | Options |
|---|
| forumThreadId | int | Forum Thread Id | Required | | |
| subscribe | bool | Subscribed Status | Required | | |
Return Type
AdditionalInfo
SubscriptionType
Returns the subscription type for the accessing user (None, Thread, Post, MailingList)
Usage
#set($stringResponse = $core_v2_forumThread.SubscriptionType($forumThreadId))
Parameters
| Name | Type | Description | Required | Default | Options |
|---|
| forumThreadId | int | Forum Thread Id | Required | | |
Return Type
string
Update
Updates a Forum Thread
Usage
#set($forumThreadResponse = $core_v2_forumThread.Update($forumId, $threadId))
Parameters
| Name | Type | Description | Required | Default | Options |
|---|
| forumId | int | Forum Id | Required | | |
| threadId | int | Thread Id | Required | | |
Return Type
ForumThread
Update
Updates a Forum Thread
Usage
#set($forumThreadResponse = $core_v2_forumThread.Update($forumId, $threadId, "%{Body = $bodyArg, ContentType = $contentTypeArg, EditNotes = $editNotesArg, FeaturedImage = $featuredImageArg, FileData = $fileDataArg, FileName = $fileNameArg, FileUrl = $fileUrlArg, HasPoll = $hasPollArg, IsAnonymous = $isAnonymousArg, IsFeatured = $isFeaturedArg, IsLocked = $isLockedArg, IsQuestion = $isQuestionArg, IsSticky = $isStickyArg, PollDescription = $pollDescriptionArg, PollExpirationDate = $pollExpirationDateArg, PollTitle = $pollTitleArg, PostDate = $postDateArg, StickyDate = $stickyDateArg, Subject = $subjectArg, SubscribeToThread = $subscribeToThreadArg, Tags = $tagsArg}"))Parameters
| Name | Type | Description | Required | Default | Options |
|---|
| forumId | int | Forum Id | Required | | |
| threadId | int | Thread Id | Required | | |
| Body | string | Body | Optional | | |
| ContentType | string | Used when adding a post attachement | Optional | | |
| EditNotes | string | Edit Notes | Optional | | |
| FeaturedImage | string | URL of image to use when IsFeatured is true | Optional | | |
| FileData | Byte[] | When adding a post attachment either FileData or FileUrl is required. | Optional | | |
| FileName | string | Used when adding a post attachement | Optional | | |
| FileUrl | string | When adding a post attachment either FileData or FileUrl is required. | Optional | | |
| HasPoll | bool | Has Poll | Optional | False | |
| IsAnonymous | bool | Is Anonymous | Optional | False | |
| IsFeatured | bool | Is Featured | Optional | False | |
| IsLocked | bool | Is Locked | Optional | False | |
| IsQuestion | bool | Only used when the forum being posted to has both discussions and questions | Optional | False | |
| IsSticky | bool | Is Sticky | Optional | False | |
| PollDescription | string | Poll Description | Optional | | |
| PollExpirationDate | DateTime | Poll Expiration Date | Optional | | |
| PollTitle | string | Poll Title | Optional | | |
| PostDate | DateTime | Post Date | Optional | Current Date | |
| StickyDate | DateTime | If a thread is sticky, used to specify how long it should be sticky. If no sticky date provided default is current date + 25 years | Optional | | |
| Subject | string | Subject | Optional | | |
| SubscribeToThread | bool | Subscribe To Thread | Optional | False | |
| Tags | string | A comma separated list of tags | Optional | | |
Return Type
ForumThread
UpdatePollItem
Updates a poll option in a thread
Usage
#set($pollItemResponse = $core_v2_forumThread.UpdatePollItem($threadId, $answerId, $answer, $orderNumber))
Parameters
| Name | Type | Description | Required | Default | Options |
|---|
| threadId | int | Thread Id | Required | | |
| answerId | string | Answer Id | Required | | |
| answer | string | Answer | Required | | |
| orderNumber | int | Order Number | Required | | |
Return Type
PollItem