Enables scripted content fragments to use ForumThreads
Properties
Name | Type | Description | Default | Options |
---|---|---|---|---|
ContentTypeId | Guid | Forum Threads content type identifier | ||
Current | ForumThread | Returns the current contextual Forum Thread | ||
CurrentParent | ForumThread | Identifies the thread being replied to when replying to a thread |
Methods
AddPollItem
Adds a poll option to a thread. Deprecated: Use poll embedding instead.
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
AllowsReplies
Determines if the Forum Thread allows replies
Usage
#set($booleanResponse = $core_v2_forumThread.AllowsReplies($contentId))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
contentId | Guid | Content Id | Required |
Return Type
bool
AreRatingsEnabled
Returns whether ratings are enabled on a thread. DEPRECATED: Use $core_v2_rating.CanCreate() instead.
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))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
forumId | int | Forum Id | Required | ||
subject | string | Subject | Required | ||
body | string | Body | Required |
Return Type
Create
Creates a Forum Thread
Usage
#set($forumThreadResponse = $core_v2_forumThread.Create($forumId, $subject, $body, "%{ContentType = $contentTypeArg, ExtendedAttributes = $extendedAttributesArg, FeaturedImage = $featuredImageArg, FileData = $fileDataArg, FileName = $fileNameArg, FileUploadContext = $fileUploadContextArg, 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 | ||
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 | ||
FeaturedImage | string | URL of image to use when IsFeatured is true | Optional | ||
FileData | Byte[] | When adding a post attachment either FileData, FileUrl or FileUploadContext is required. | Optional | ||
FileName | string | Used when adding a post attachement | Optional | ||
FileUploadContext | string | When adding a post attachment either FileData, FileUrl or FileUploadContext is required. | Optional | ||
FileUrl | string | When adding a post attachment either FileData, FileUrl or FileUploadContext is required. | Optional | ||
HasPoll | bool | Deprecated: Use poll embedding instead. | 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 | Deprecated: Use poll embedding instead. | Optional | ||
PollExpirationDate | DateTime | Deprecated: Use poll embedding instead. | Optional | ||
PollTitle | string | Deprecated: Use poll embedding instead. | 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 + 7 days | Optional | ||
SubscribeToThread | bool | Subscribe To Thread | Optional | False | |
Tags | string | A comma separated list of tags | Optional |
Return Type
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
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
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
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
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
GetRating
Gets the rating. DEPRECATED: Use $core_v2_ratedItem.Get() instead.
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. DEPRECATED: Use $core_v2_bookmark.Get() instead.
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
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, Authored, Moderated, MyThreads, Unanswered, Unread |
Return Type
List
Usage
#set($pagedListResponse = $core_v2_forumThread.List("%{AreStickyPostsOnTop = $areStickyPostsOnTopArg, AuthorId = $authorIdArg, ContentIds = $contentIdsArg, CreatedAfterDate = $createdAfterDateArg, CreatedBeforeDate = $createdBeforeDateArg, 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 |
---|---|---|---|---|---|
AreStickyPostsOnTop | bool | Determines whether to place sticky posts at the top of the list. This setting only applies to the lastpost' sort. | Optional | True | |
AuthorId | int | Author Id | Optional | ||
ContentIds | string | Used to limit to a specific set of forum threads as well as sort order if SoryBy is set to ContentIdsOrder | Optional | ||
CreatedAfterDate | DateTime? | Include only threads created on or after. | Optional | ||
CreatedBeforeDate | DateTime? | Include only threads created before. | Optional | ||
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' is sorting by the latest Thread/Reply modification date; 'Date' is sorting by thread created date; 'Votes' sorts by total votes, both quality and interest. | Optional | ContentIdsOrder, Date, LastPost, QualityScore, Replies, Score:SCORE_ID, Topic, TotalQualityVotes, Views, Votes | |
SortOrder | string | Default is Descending for lastpost, date, replies, and views. Default is Ascending for topic | Optional | Ascending, Descending |
Return Type
List
Lists Forum Threads
Usage
#set($pagedListResponse = $core_v2_forumThread.List($forumThreadQueryType, "%{ContentIds = $contentIdsArg, 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, Authored, Moderated, MyThreads, Unanswered, Unread |
ContentIds | string | Comma separated list of ContentIds. Used to limit to a specific set of forum threads as well as sort order if SoryBy is set to ContentIdsOrder | Optional | ||
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' is sorting by the latest Thread/Reply modification date; 'Date' is sorting by thread created date; 'Votes' sorts by total votes, both quality and interest. | Optional | ContentIdsOrder, Date, LastPost, QualityScore, Replies, Score:SCORE_ID, Topic, TotalQualityVotes, Views, Votes | |
SortOrder | string | Default is Descending for lastpost, date, replies, and views. Default is Ascending for topic | Optional | Ascending, Descending |
Return Type
List
Lists Forum Threads
Usage
#set($pagedListResponse = $core_v2_forumThread.List())
Return Type
ListPollItems
Lists poll options in a thread. Deprecated: Use $core_v2_poll instead.
Usage
#set($apiListResponse = $core_v2_forumThread.ListPollItems($threadId))
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
threadId | int | Thread Id | Required |
Return Type
MarkAsRead
Mark the thread as read by the accessing user
Usage
$core_v2_forumThread.MarkAsRead($threadId)
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
threadId | int | Thread Id | Required |
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, FileUploadContext = $fileUploadContextArg, 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, FileUrl or FileUploadContext is required. | Optional | ||
FileName | string | Used when adding a post attachement | Optional | ||
FileUploadContext | string | When adding a post attachment either FileData, FileUrl or FileUploadContext is required. | Optional | ||
FileUrl | string | When adding a post attachment either FileData, FileUrl or FileUploadContext 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 + 7 days | Optional | ||
Subject | string | Subject | Optional | ||
SubscribeToThread | bool | Subscribe To Thread | Optional | False | |
Tags | string | A comma separated list of tags | Optional |
Return Type
RemovePollItem
Removes a poll option from a thread. Deprecated: Use poll embedding instead.
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
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
SetFavorite
Sets favorite status for the accessing user. DEPRECATED: Use $core_v2_bookmark.Create() or $core_v2_bookmark.Delete() instead.
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. DEPRECATED: Use $core_v2_rating.Create() instead.
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
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, "%{Body = $bodyArg, ContentType = $contentTypeArg, EditNotes = $editNotesArg, ExtendedAttributes = $extendedAttributesArg, FeaturedImage = $featuredImageArg, FileData = $fileDataArg, FileName = $fileNameArg, FileUploadContext = $fileUploadContextArg, 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 | ||
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 | ||
FeaturedImage | string | URL of image to use when IsFeatured is true | Optional | ||
FileData | Byte[] | When adding a post attachment either FileData, FileUrl or FileUploadContext is required. | Optional | ||
FileName | string | Used when adding a post attachement | Optional | ||
FileUploadContext | string | When adding a post attachment either FileData, FileUrl or FileUploadContext is required. | Optional | ||
FileUrl | string | When adding a post attachment either FileData, FileUrl or FileUploadContext is required. | Optional | ||
HasPoll | bool | Deprecated: Use poll embedding instead. | 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 | Deprecated: Use poll embedding instead. | Optional | ||
PollExpirationDate | DateTime | Deprecated: Use poll embedding instead. | Optional | ||
PollTitle | string | Deprecated: Use poll embedding instead. | 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 + 7 days | Optional | ||
Subject | string | Subject | Optional | ||
SubscribeToThread | bool | Subscribe To Thread | Optional | False | |
Tags | string | A comma separated list of tags | Optional |
Return Type
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
UpdatePollItem
Updates a poll option in a thread. Deprecated: Use poll embedding instead.
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 |