Enables scripted content fragments to use ForumThreads

Properties

NameTypeDescriptionDefaultOptions
ContentTypeIdGuidForum Threads content type identifier
CurrentForumThreadReturns the current contextual Forum Thread
CurrentParentForumThreadIdentifies the thread being replied to when replying to a thread

Methods

AddPollItem

Adds a poll option to a thread

Usage

#set($pollItemResponse = $core_v2_forumThread.AddPollItem($threadId, $answer, $orderNumber))

Parameters

NameTypeDescriptionRequiredDefaultOptions
threadIdintThread IdRequired
answerstringAnswerRequired
orderNumberintOrder NumberRequired

Return Type

PollItem

AreRatingsEnabled

Returns whether ratings are enabled on a thread

Usage

#set($booleanResponse = $core_v2_forumThread.AreRatingsEnabled($forumThreadId))

Parameters

NameTypeDescriptionRequiredDefaultOptions
forumThreadIdintForum Thread IdRequired

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

NameTypeDescriptionRequiredDefaultOptions
forumIdintForum IdRequired
subjectstringSubjectRequired
bodystringBodyRequired
ContentTypestringUsed when adding a post attachementOptional
FeaturedImagestringURL of image to use when IsFeatured is trueOptional
FileDataByte[]When adding a post attachment either FileData or FileUrl is required.Optional
FileNamestringUsed when adding a post attachementOptional
FileUrlstringWhen adding a post attachment either FileData or FileUrl is required.Optional
HasPollboolHas PollOptionalFalse
IsAnonymousboolIs AnonymousOptionalFalse
IsFeaturedboolIs FeaturedOptionalFalse
IsLockedboolIs LockedOptionalFalse
IsQuestionboolOnly used when the forum being posted to has both discussions and questionsOptionalFalse
IsStickyboolIs StickyOptionalFalse
PollDescriptionstringPoll DescriptionOptional
PollExpirationDateDateTimePoll Expiration DateOptional
PollTitlestringPoll TitleOptional
PostDateDateTimePost DateOptionalCurrent Date
StickyDateDateTimeIf a thread is sticky, used to specify how long it should be sticky. If no sticky date provided default is current date + 25 yearsOptional
SubscribeToThreadboolSubscribe To ThreadOptionalFalse
TagsstringA comma separated list of tagsOptional

Return Type

ForumThread

Create

Creates a Forum Thread

Usage

#set($forumThreadResponse = $core_v2_forumThread.Create($forumId, $subject, $body))

Parameters

NameTypeDescriptionRequiredDefaultOptions
forumIdintForum IdRequired
subjectstringSubjectRequired
bodystringBodyRequired

Return Type

ForumThread

Delete

Deletes a Forum Thread

Usage

#set($additionalInfoResponse = $core_v2_forumThread.Delete($threadId, "%{DeleteChildren = $deleteChildrenArg, DeleteReason = $deleteReasonArg, SendAuthorDeleteNotification = $sendAuthorDeleteNotificationArg}"))

Parameters

NameTypeDescriptionRequiredDefaultOptions
threadIdintThread IdRequired
DeleteChildrenboolDelete ChildrenOptionalFalse
DeleteReasonstringDelete ReasonOptionalFalse
SendAuthorDeleteNotificationboolSend Author Delete NotificationOptionalFalse

Return Type

AdditionalInfo

DeleteWikiPageAssociation

Deletes an association with a wiki page if one exits

Usage

#set($additionalInfoResponse = $core_v2_forumThread.DeleteWikiPageAssociation($threadId))

Parameters

NameTypeDescriptionRequiredDefaultOptions
threadIdintThread IdRequired

Return Type

AdditionalInfo

Get

Gets a Forum Thread

Usage

#set($forumThreadResponse = $core_v2_forumThread.Get($threadId, "%{ForumId = $forumIdArg}"))

Parameters

NameTypeDescriptionRequiredDefaultOptions
threadIdintThread IdRequired
ForumIdintForum IdOptional

Return Type

ForumThread

Get

Gets a Forum Thread

Usage

#set($forumThreadResponse = $core_v2_forumThread.Get($contentId))

Parameters

NameTypeDescriptionRequiredDefaultOptions
contentIdGuidThread Content IdRequired

Return Type

ForumThread

Get

Gets a Forum Thread

Usage

#set($forumThreadResponse = $core_v2_forumThread.Get($threadId))

Parameters

NameTypeDescriptionRequiredDefaultOptions
threadIdintThread IdRequired

Return Type

ForumThread

GetRating

Gets the rating

Usage

#set($ratingResponse = $core_v2_forumThread.GetRating($forumThreadId))

Parameters

NameTypeDescriptionRequiredDefaultOptions
forumThreadIdintForum Thread IdRequired

Return Type

Rating

IncrementViewCount

Increments the view count for a thread

Usage

$core_v2_forumThread.IncrementViewCount($forumThreadId)

Parameters

NameTypeDescriptionRequiredDefaultOptions
forumThreadIdintForum Thread IdRequired

IsFavorite

Returns favorite status for the accessing user

Usage

#set($booleanResponse = $core_v2_forumThread.IsFavorite($forumThreadId))

Parameters

NameTypeDescriptionRequiredDefaultOptions
forumThreadIdintForum Thread IdRequired

Return Type

bool

IsMuted

Returns the muted status for the accessing user

Usage

#set($booleanResponse = $core_v2_forumThread.IsMuted($forumThreadId))

Parameters

NameTypeDescriptionRequiredDefaultOptions
forumThreadIdintForum Thread IdRequired

Return Type

bool

IsSubscribed

Returns subscribed status for the accessing user

Usage

#set($booleanResponse = $core_v2_forumThread.IsSubscribed($forumThreadId))

Parameters

NameTypeDescriptionRequiredDefaultOptions
forumThreadIdintForum Thread IdRequired

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

NameTypeDescriptionRequiredDefaultOptions
ForumIdintForum IdOptional
ForumThreadQueryTypestringForum Thread Query TypeOptionalAllActive, All, Answered, AnsweredNotVerified, AnsweredWithNotVerified, Moderated, MyThreads, Unanswered, Unread
GroupIdintGroup IdOptional
IncludeDiscussionsboolInclude discussion threadsOptionalTrue
IncludeQuestionsboolInclude question and answer threadsOptionalTrue
IncludeSubGroupsboolWhether to include 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
PopularOnlyboolWhether to include popular threads onlyOptionalFalse
SortBystringlastpostOptionaldate, lastpost, replies, Score:SCORE_ID, topic, views
SortOrderstringDefault is desc for lastpost, date, replies, and views. Default is asc for topicOptionalasc, 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

NameTypeDescriptionRequiredDefaultOptions
forumThreadQueryTypestringForum Thread Query TypeRequiredAllActive, All, Answered, AnsweredNotVerified, AnsweredWithNotVerified, Moderated, MyThreads, Unanswered, Unread
ForumIdintForum IdOptional
GroupIdintGroup IdOptional
IncludeDiscussionsboolInclude discussion threadsOptionalTrue
IncludeQuestionsboolInclude question and answer threadsOptionalTrue
IncludeSubGroupsboolWhether to include 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
PopularOnlyboolWhether to include popular threads onlyOptionalFalse
SortBystringlastpostOptionaldate, lastpost, replies, topic, views
SortOrderstringDefault is desc for lastpost, date, replies, and views. Default is asc for topicOptionalasc, desc

Return Type

PagedList<ForumThread>

List

Lists Forum Threads

Usage

#set($pagedListResponse = $core_v2_forumThread.List($forumThreadQueryType))

Parameters

NameTypeDescriptionRequiredDefaultOptions
forumThreadQueryTypestringForum Thread Query TypeRequiredAllActive, 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

NameTypeDescriptionRequiredDefaultOptions
threadIdintThread IdRequired

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

NameTypeDescriptionRequiredDefaultOptions
forumIdintForum IdRequired
BodystringBodyOptional
ContentTypestringUsed when adding a post attachementOptional
FeaturedImagestringFeatured ImageOptional
FileDataByte[]When adding a post attachment either FileData or FileUrl is required.Optional
FileNamestringUsed when adding a post attachementOptional
FileUrlstringWhen adding a post attachment either FileData or FileUrl is required.Optional
IsAnonymousboolIs AnonymousOptionalFalse
IsFeaturedboolIs FeaturedOptionalFalse
IsLockedboolIs LockedOptionalFalse
IsQuestionboolOnly used when the forum being posted to has both discussions and questionsOptionalFalse
IsStickyboolIs StickyOptionalFalse
PostDateDateTimePost DateOptionalCurrent Date
StickyDateDateTimeIf a thread is sticky, used to specify how long it should be sticky. If no sticky date provided default is current date + 25 yearsOptional
SubjectstringSubjectOptional
SubscribeToThreadboolSubscribe To ThreadOptionalFalse
TagsstringA comma separated list of tagsOptional

Return Type

ForumThread

RemovePollItem

Removes a poll option from a thread

Usage

#set($additionalInfoResponse = $core_v2_forumThread.RemovePollItem($threadId, $answerId))

Parameters

NameTypeDescriptionRequiredDefaultOptions
threadIdintThread IdRequired
answerIdstringAnswer IdRequired

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

NameTypeDescriptionRequiredDefaultOptions
subjectstringSubjectRequired
bodystringBodyRequired
TagsstringComma-separated list of tagsOptional

Return Type

ForumThread

SetFavorite

Sets favorite status for the accessing user

Usage

$core_v2_forumThread.SetFavorite($forumThreadId, $favorite)

Parameters

NameTypeDescriptionRequiredDefaultOptions
forumThreadIdintForum Thread IdRequired
favoriteboolFavorite StatusRequired

SetMuted

Sets the muted status for the accessing user

Usage

$core_v2_forumThread.SetMuted($forumThreadId, $mute)

Parameters

NameTypeDescriptionRequiredDefaultOptions
forumThreadIdintForum Thread IdRequired
muteboolMuted StatusRequired

SetRating

Sets the rating for the accessing user

Usage

$core_v2_forumThread.SetRating($forumThreadId, $rating)

Parameters

NameTypeDescriptionRequiredDefaultOptions
forumThreadIdintForum Thread IdRequired
ratingintRating value (0-5)Required

SetSubscribed

Sets subscribed status for the accessing user

Usage

#set($additionalInfoResponse = $core_v2_forumThread.SetSubscribed($forumThreadId, $subscribe))

Parameters

NameTypeDescriptionRequiredDefaultOptions
forumThreadIdintForum Thread IdRequired
subscribeboolSubscribed StatusRequired

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

NameTypeDescriptionRequiredDefaultOptions
forumThreadIdintForum Thread IdRequired

Return Type

string

Update

Updates a Forum Thread

Usage

#set($forumThreadResponse = $core_v2_forumThread.Update($forumId, $threadId))

Parameters

NameTypeDescriptionRequiredDefaultOptions
forumIdintForum IdRequired
threadIdintThread IdRequired

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

NameTypeDescriptionRequiredDefaultOptions
forumIdintForum IdRequired
threadIdintThread IdRequired
BodystringBodyOptional
ContentTypestringUsed when adding a post attachementOptional
EditNotesstringEdit NotesOptional
FeaturedImagestringURL of image to use when IsFeatured is trueOptional
FileDataByte[]When adding a post attachment either FileData or FileUrl is required.Optional
FileNamestringUsed when adding a post attachementOptional
FileUrlstringWhen adding a post attachment either FileData or FileUrl is required.Optional
HasPollboolHas PollOptionalFalse
IsAnonymousboolIs AnonymousOptionalFalse
IsFeaturedboolIs FeaturedOptionalFalse
IsLockedboolIs LockedOptionalFalse
IsQuestionboolOnly used when the forum being posted to has both discussions and questionsOptionalFalse
IsStickyboolIs StickyOptionalFalse
PollDescriptionstringPoll DescriptionOptional
PollExpirationDateDateTimePoll Expiration DateOptional
PollTitlestringPoll TitleOptional
PostDateDateTimePost DateOptionalCurrent Date
StickyDateDateTimeIf a thread is sticky, used to specify how long it should be sticky. If no sticky date provided default is current date + 25 yearsOptional
SubjectstringSubjectOptional
SubscribeToThreadboolSubscribe To ThreadOptionalFalse
TagsstringA comma separated list of tagsOptional

Return Type

ForumThread

UpdatePollItem

Updates a poll option in a thread

Usage

#set($pollItemResponse = $core_v2_forumThread.UpdatePollItem($threadId, $answerId, $answer, $orderNumber))

Parameters

NameTypeDescriptionRequiredDefaultOptions
threadIdintThread IdRequired
answerIdstringAnswer IdRequired
answerstringAnswerRequired
orderNumberintOrder NumberRequired

Return Type

PollItem