Print this Page

TOPIC Functions

Below is a listing of all the functions.

 

ApproveMessage

ApproveMessage

This method approves a message.

 

Return Type: Integer

 

Name

Type

Description

MessageID

Integer

The message ID for the message to approve.

ThreadID

Integer

The thread ID that the message belongs to.

CategoryID

Integer

The category ID that the thread belongs to.

ForumID

Integer

The forum ID the category that the thread resides in belongs to.

UserID

Integer

The user ID approving the thread.

Archived

Boolean

Wether or not the message is archived.

 

ApproveThread

ApproveThread

This method approves a thread.

 

Return Type: Integer

 

Name

Type

Description

ThreadID

Integer

The thread ID for the thread to approve.

CategoryID

Integer

The category ID that the non approved thread belongs to.

ForumID

Integer

The forum ID the category that the thread resides in belongs to.

UserID

Integer

The user ID approving the thread.

 

CheckPrivateTopicPerm

CheckPrivateTopicPerm

This function checks if a user has the rights to view a private topic.

 

Return Type: Boolean

 

Name

Type

Description

UserID

Integer

The user ID who wishes to view the private topic.

ThreadID

Integer

The ID of the private topic.

 

DeleteThread

DeleteThread

This method deletes a thread and all its messages and attachments from the forum.

 

Return Type: Integer

 

Name

Type

Description

ThreadID

Integer

The ID of the thread to delete.

Section

String

Where the thread is being deleted from. Trash means its being permanently removed. Category means that the thread is being moved to the trash bin.

ForumID

Integer

The ID of the forum that the thread belongs to.

UserID

Integer

 

 

Examples

Visual Basic.Net

'Method DeleteThread

ftObj.DeleteThread(tmpID, "forum", ForumID, UserID)

 

C#

//Method DeleteThread

ftObj.DeleteThread(tmpID, "forum", ForumID, UserID);

 

EmptyTrash

EmptyTrash

This method empties the trash for a forum; this permanently removes any threads in the trash bin.

 

Return Type: Integer

 

Name

Type

Description

ForumID

Integer

The ID of the forum.

UserID

Integer

The ID of the user that's emptying the trash.

 

Examples

Visual Basic.Net

'Method EmptyTrash

ftObj.EmptyTrash(ForumID, UserID)

 

C#

//Method EmptyTrash

ftObj.EmptyTrash(ForumID, UserID);

 

GetNonApprovedThreads

GetNonApprovedThreads

This method returns a list of threads that have not been approved for a category.

 

Return Type:  Topic()

 

Name

Type

Description

CategoryID

Integer

The category ID you want to check non approved threads for.

 

Related Items

GetLastestMessages, GetHotMsg, SearchMessages, GetThreadByID, GetThreads, IsThread, GetThreadsByForumID

 

GetThreadAuthor

GetThreadAuthor

Get the author of a thread.

 

Return Type:  ftUser

 

Name

Type

Description

ThreadID

Integer

The ID of the thread you want to retrieve.

 

Examples

Visual Basic.Net

'Method GetThreadAuthor

Dim Author As ftUser = ftObj.GetThreadAuthor(tmpID)

MsgBox(Author.Username)

 

C#

//Method GetThreadAuthor

FuseTalk.API.ftUser Author = ftObj.GetThreadAuthor(tmpID);

Interaction.MsgBox(Author.Username, 0, null);

 

Related Items

GetForumBuddies, GetDigestSubs, GetForumPermissions, GetMessageAuthor, GetUserByKeyword, GetUserByEmail, GetNonApprovedUsers, LoginUser, LoginUser, GetTodayBirthDate, GetUserByName,GetUserByID, GetUserSettings, LoginGlobal, AddUser, AddUser, SearchUsersByAlphabet, SearchUsersByCriteria, SearchUsersByIPAddress

 

GetThreadByID

GetThreadByID

This method gets thread information for a thread.

 

Return Type:  Topic

 

Name

Type

Description

ThreadID

Integer

The ID of the thread to get information for.

 

Examples

Visual Basic.Net

'Method GetThreadByID

MyTopic = ftObj.GetThreadByID(tmpID)

If MyTopic.ID <> 0 Then MsgBox(MyTopic.ThreadName)

 

C#

//Method GetThreadByID

MyTopic = ftObj.GetThreadByID(tmpID);

if (MyTopic.ID != 0)

{

Interaction.MsgBox(MyTopic.ThreadName, 0, null);

}

 

Related Items

GetLastestMessages, GetHotMsg, SearchMessages, GetThreadByID, GetThreads, IsThread, GetThreadsByForumID

 

GetThreads

GetThreads

This method gets the threads for a category.

 

Return Type:  Topic()

 

Name

Type

Description

CategoryID

Integer

The category ID to pull threads for.

DateAgo

DateTime

A date object representing how far back to grab threads for.

MaxRows

Integer

The amount of rows to retrieve.

UserID

Integer

The ID of the user who is retrieving the topics.

ForumID

Integer

The forum ID which the threads belong to.

PrivateTopic

Boolean

Is the thread that you are retrieving privately.

 

Examples

Visual Basic.Net

'Method GetThreads

Dim tmpID As Integer

Dim Topics() As Topic = ftObj.GetThreads(CategoryID, Now.AddDays(-20), 20, UserID, ForumID, False)

If Not Topics Is Nothing Then

    Dim t As Topic

    For Each t In Topics

        MsgBox(t.ThreadName)

    Next

End If

 

C#

//Method GetThreads

int tmpID = 0;

FuseTalk.API.Topic[] Topics = ftObj.GetThreads(CategoryID, DateTime.Now.AddDays(-20), 20, UserID, ForumID, false);

if (Topics !=  null)

{

foreach (FuseTalk.API.Topic t in Topics)

{

Interaction.MsgBox(t.ThreadName, 0, null);

}

}

 

Related Items

GetLastestMessages, GetHotMsg, SearchMessages, GetNonApprovedThreads, GetThreadByID, IsThread, GetThreadsByForumID

 

GetThreadsByForumID

GetThreadsByForumID

This method gets topics based on a forum ID.

 

Return Type:  Topic()

 

Name

Type

Description

TopicQty

Integer

The number of topics you wish to get.

ForumID

Integer

The forum ID which you want to topics for.

UserID

Integer

The use id of the user getting the topics.

CacheMinutes

Integer

The number of minutes you want the data cached.

 

Related Items

GetLastestMessages, GetHotMsg, SearchMessages, GetNonApprovedThreads, GetThreadByID, GetThreads, IsThread

 

IsThread

IsThread

This method checks if the thread ID passed is valid.

 

Return Type:  Topic

 

Name

Type

Description

UserID

Integer

The user is of the user checking if the thread exists.

ThreadID

Integer

The thread ID you want checked.

CategoryID

Integer

The category ID the thread belongs to.

Archived

String

This is a flag field that if passed tells the function to checked the archive table instead of the main threads table.

 

Examples

Visual Basic.Net

'Method IsThread

Dim MyTopic As Topic = ftObj.IsThread(UserID, tmpID, CategoryID, "")

If MyTopic.ID <> 0 Then MsgBox(MyTopic.ThreadName)

 

C#

//Method IsThread

FuseTalk.API.Topic MyTopic = ftObj.IsThread(UserID, tmpID, CategoryID, "");

if (MyTopic.ID != 0)

{

Interaction.MsgBox(MyTopic.ThreadName, 0, null);

}

 

Related Items

GetLastestMessages, GetHotMsg, SearchMessages, GetNonApprovedThreads, GetThreadByID, GetThreads, GetThreadsByForumID

 

LockThread

LockThread

This method locks or unlocks a thread. If the thread is locked it will be unlocked if the thread is locked it will be unlocked.

 

Return Type: Integer

 

Name

Type

Description

ThreadID

Integer

The ID of the thread to lock or unlock

UserID

Integer

The ID of the user that's locking the thread.

ForumID

Integer

The ID of the forum that the thread belongs to.

 

MoveThread

MoveThread

This method moves a thread from one category to another.

 

Return Type: n/a

 

Name

Type

Description

NewCatID

Integer

The category ID to move the thread to.

OldCatID

Integer

The category ID the thread belonged to.

ThreadID

Integer

The thread ID to move.

NotPart

Boolean

A switch to enable notifying the people that replied to the thread that it was moved. (True or False).

NotCreate

Boolean

A switch to enable the thread creator that the thread was moved. (True or False).

ForumID

Integer

The forum ID the thread belongs to.

ForumName

String

The name of the forum.

UserID

Integer

The user is of the user moving the thread.

 

SearchMessages

SearchMessages

This method searches threads/messages in a forum. This function requires that the request. FTVAR_CATEGORYPERMS variable exists, look at forum/include/common/authentication.cfm to view how to set this request variable.

 

Return Type:  Topic()

 

Name

Type

Description

SearchWhat

String

What part of the message to search? 'St' means search titles of messages, 'Sb' means search the message body and title.

OnlyMe

Integer

The keyword to perform the search with.

Keyword

String

Determines if the search will only bring back messages that the user ID has posted.

Categories

String

The list of category ID's to search.

Author

String

The name of the author of the messages to filter by.

SearchTable

String

Which tables to search, main messages tables or archives? Pass 'Sarc' to search archived content and blank to search current content.

DateSel

String

If the user selected an amount of days to search on, this is a numeric value representing how far back to search on.

StartDate

Date

If the user chose to filter by a date range pass a start date here ('mm/dd/yyyy').

EndDate

Date

If the user chose to filter by a date range pass a end date here ('mm/dd/yyyy').

UserObj

ftUser

The ID for the user searching.

ForumID

Integer

The forum ID to search in.

MaxRows

Integer

The amount of rows to retrieve.

ResultType

String

The type of search results to bring back, topics or messages.

 

Related Items

GetLastestMessages, GetHotMsg, GetNonApprovedThreads, GetThreadByID, GetThreads, IsThread, GetThreadsByForumID

 

SetArchiveFlag

SetArchiveFlag

This method sets the archive attribute for a thread. This attribute determines if the thread will be archived or not when the global task runs. If the thread is already set to be archived it will be un-set, if the thread is not set to be archived it will be set.

 

Return Type: Integer

 

Name

Type

Description

ThreadID

Integer

The ID of the thread to set the archive bit for.

UserID

Integer

The ID of the user that's setting the flag.

ForumID

Integer

The ID of the forum that the thread belongs to.

 

UpdateThreadViewCount

UpdateThreadViewCount

This method updates the view count for a thread.

 

Return Type: n/a

 

Name

Type

Description

ThreadID

Integer

The ID of the thread to update.

 

Examples

Visual Basic.Net

'Method UpdateThreadViewCount

ftObj.UpdateThreadViewCount(tmpID)

 

C#

//Method UpdateThreadViewCount

ftObj.UpdateThreadViewCount(tmpID);