Print this Page

MESSAGE Functions

Below is a listing of all the functions.

 

DeleteMessageByID

DeleteMessageByID

This method deletes a message by message ID.

 

Return Type: Integer

 

Name

Type

Description

UserID

Integer

The ID of user deleting the message.

MessageID

Integer

The ID of the message to delete.

ForumID

Integer

The forum ID that the message belongs to.

Override

Integer

If set to True any user will be able to delete the specified message; if set to False the FTARG_USERID must match the ID of the user who created the message.

 

Examples

Visual Basic.Net

'Method DeleteMessageByID

ftObj.DeleteMessageByID(User.ID, 1, ForumID, 0)

 

C#

//Method DeleteMessageByID

ftObj.DeleteMessageByID(User.ID, 1, ForumID, 0);

 

DoublePostCheck

DoublePostCheck

This method handles the forum flooding option, it checks if a user has posted more often than the flood parameter is set to allow.

 

Return Type: Integer

 

Name

Type

Description

LastPoster

String

The username of the user posting the content.

 

GetArcMessagesByThreadID

GetArcMessagesByThreadID

This method retrieves the archived messages for an archived thread.

 

Return Type:  Message()

 

Name

Type

Description

ThreadID

Integer

The thread ID the messages belong to.

Maxrows

Integer

The amount of rows to return.

MsgOrder

String

The order in which to return the messages. Asc or Desc

ForumID

Integer

The forum ID the thread belongs to.

 

Related Items

GetNewMessagesForDigest, GetNonApprovedMessages, PostMessage, GetMessagesByThreadID, GetMessageByID, ReadPrivateMessage, GetPrivateMessageHistory, GetPrivateHistoryByUser, GetPrivateMessages

 

GetHotMsg

GetHotMsg

This method returns a list of messages that match the hot threads option that the forum administration controls.

 

Return Type:  Topic()

 

Name

Type

Description

NumMessages

Integer

The amount of messages in a thread that make the thread a hot thread.

 

Examples

Visual Basic.Net

'Method GetHotMsg

Dim Topics() As Topic = ftObj.GetHotMsg(20)

If Not Topics Is Nothing Then   

Dim Top As Topic    

For Each Top In Topics        

MsgBox(Top.ThreadName)   

Next

End If

 

C#

//Method GetHotMsg

FuseTalk.API.Topic[] Topics = ftObj.GetHotMsg(20);

if (Topics != null)

{

foreach (FuseTalk.API.Topic Top in Topics)

{

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

}

}

 

Related Items

GetLastestMessages, SearchMessages, GetNonApprovedThreads, GetThreadByID, GetThreads, IsThread, GetThreadsByForumID

 

GetLastestMessages

GetLastestMessages

This method returns a list of the latest threads/messages by user or category ID.

 

Return Type:  Topic()

 

Name

Type

Description

UserID

Integer

The user ID to pull the latest messages for. Pass 0 if you want to pull by category ID.

CategoryID

Integer

 

Top

Integer

The amount of messages to pull.

 

Related Items

GetHotMsg, SearchMessages, GetNonApprovedThreads, GetThreadByID, GetThreads, IsThread, GetThreadsByForumID

 

GetMessageAuthor

GetMessageByID

GetMessageByID

This method gets a message by ID.

 

Return Type:  Message

 

Name

Type

Description

MessageID

Integer

The ID of the message to retrieve.

 

Examples

Visual Basic.Net

'Method GetMessageByID

Dim Mess As Message = ftObj.GetMessageByID(1)

If Mess.ErrorCode = 0 And Mess.ID  0 Then MsgBox(Mess.MessageTitle)

 

Visual Basic.Net

//Method GetMessageByID

FuseTalk.API.Message Mess = ftObj.GetMessageByID(1);

if (Mess.ErrorCode == 0 & Mess.ID != 0)

{

Interaction.MsgBox(Mess.MessageTitle, 0, null);

}

 

Related Items

GetNewMessagesForDigest, GetNonApprovedMessages, PostMessage, GetArcMessagesByThreadID, GetMessagesByThreadID, ReadPrivateMessage, GetPrivateMessageHistory, GetPrivateHistoryByUser, GetPrivateMessages

 

GetMessagesByThreadID

GetMessagesByThreadID

This method gets the messages for a thread.

 

Return Type:  Message()

 

Name

Type

Description

ThreadID

Integer

The thread ID the messages belong to.

Maxrows

Integer

The amount of rows to return.

MsgOrder

String

The order in which to return the messages. Asc or Desc

ForumID

Integer

The forum ID the thread belongs to.

 

Examples

Visual Basic.Net

'Method GetMessagesByThreadID

Dim TopicID As Integer = 1

Dim Msgs() As Message = ftObj.GetMessagesByThreadID(TopicID, 20, "asc", ForumID)

If Not Msgs Is Nothing Then   

Dim Msg As Message    

For Each Msg In Msgs        

MsgBox(Msg.MessageTitle)   

Next

End If

 

C#

//Method GetMessagesByThreadID

int TopicID = 1;

FuseTalk.API.Message[] Msgs = ftObj.GetMessagesByThreadID(TopicID, 20, "asc", ForumID);

if (Msgs != null)

{

foreach (FuseTalk.API.Message Msg in Msgs)

{

Interaction.MsgBox(Msg.MessageTitle, 0, null);

}

}

 

Related Items

GetNewMessagesForDigest, GetNonApprovedMessages, PostMessage, GetArcMessagesByThreadID, GetMessageByID, ReadPrivateMessage, GetPrivateMessageHistory, GetPrivateHistoryByUser, GetPrivateMessages

 

GetNonApprovedMessages

GetNonApprovedMessages

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

 

Return Type:  Message()

 

Name

Type

Description

CategoryID

Integer

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

ThreadCount

Integer

If ThreadCount is 1 then the messages will only be returned if the thread has replies, otherwise any thread will appear.

 

Related Items

GetNewMessagesForDigest, PostMessage, GetArcMessagesByThreadID, GetMessagesByThreadID, GetMessageByID, ReadPrivateMessage, GetPrivateMessageHistory, GetPrivateHistoryByUser, GetPrivateMessages

 

MoveMessage

MoveMessage

This function moves a message from one topic to another.

 

Return Type: Integer

 

Name

Type

Description

MessageID

Integer

The ID of the message you wish to move.

ThreadID

Integer

The ID of the new topic you wish to move the message into.

UserID

Integer

The ID of the user who is moving the message.

ForumID

Integer

The ID of the forum the message and new topic belong to.

CategoryID

Integer

The category ID of the new thread.

 

PostMessage

PostMessage

This method posts a thread and/or message to a forum.

 

Return Type:  Message

 

Name

Type

Description

SetCookie

Boolean

Whether or not to set the login cookie when the user posts.

Username

String

The user's username.

Password

String

The user's password.

ForumID

Integer

The forum ID the post will belong to.

CategoryID

Integer

The category ID the post will belong to.

Message

Message

The message you wish to post.

isSubscribe

Boolean

If the user wants to be subscribed to this thread after the thread/message is posted.

AlertDays

Integer

If this is an alert thread, how many days it will be an alert thread for.

AlertThread

String

If the thread is an alert thread or not. 'SYes' or 'SNo'.

PollFlag

String

A string indicating if there is a poll attached to the message or not. 'SYes' if there is or 'Spostthread' if not.

PostAction

String

What kind of posting operation this is, 'Spost' is posting a new thread, 'Sedit' is editing an existing message/thread, and 'Sreply' is replying to an existing message.

AttachFiles

String

A list of file names to attach to the message; these files must exist and be owned by the user posting the message.

ParseEmoticons

Boolean

 

PrivateUserList

String

Whether or not to convert text to the emoticons, true if parsing required, false to not parse.

TopicSummary

String

A short summary of the topic.

UserID

Integer

The ID of the user who is posting the message.

 

Examples

Visual Basic.Net

Dim MyMessage As Message

MyMessage.MessageTitle = "What kind of car do you drive?"

MyMessage.MessageText = "I drive a ford, what do you drive?"

MyMessage.Code = ""

MyMessage.IPAddress = "127.0.0.1"

 

'Method PostMessage

MyMessage = ftObj.PostMessage(False, User.Username, User.Password, ForumID, CategoryID, MyMessage, False, 0, "No", "postthread", "post", "", True, "", "My Topic Summary", User.ID)

If MyMessage.ErrorCode <> 0 Then MsgBox("Error: " & MyMessage.ErrorCode)

 

C#

FuseTalk.API.Message NewMessage;

NewMessage = new FuseTalk.API.Message(); 

 

NewMessage.MessageTitle = "What kind of car do you drive?";

NewMessage.MessageText = "I drive a ford, what do you drive?";

NewMessage.Code = "";

NewMessage.IPAddress = "127.0.0.1";

 

//Method PostMessage

FuseTalk.API.Message MyMessage = ftObj.PostMessage(false, User.Username, User.Password, ForumID, CategoryID, NewMessage, false, 0, "No", "postthread", "post", "", true, "", "My Topic Summary", User.ID);

if (MyMessage.ErrorCode != 0)

{

Interaction.MsgBox("Error: " + MyMessage.ErrorCode, 0, null);

}

 

Related Items

GetNewMessagesForDigest, GetNonApprovedMessages, GetArcMessagesByThreadID, GetMessagesByThreadID, GetMessageByID, ReadPrivateMessage, GetPrivateMessageHistory, GetPrivateHistoryByUser, GetPrivateMessages

 

PreviewMessage

PreviewMessage

This method converts strings a message for previewing.

 

Return Type: String

 

Name

Type

Description

MessageBody

String

The text to convert.

ForumID

Integer

The forum ID the message belongs to.

CategoryID

Integer

The category ID the message belongs to.