Print this Page

FORUM Functions

Below is a listing of all the functions.

 

AddForum

AddForum

This function adds a forum to the FuseTalk database.

 

Return Type: Integer

 

Name

Type

Description

ForumName

String

The name of the forum you are adding.

Groupings

String

A comma delimited list of the IDs of the groupings the forums will associate with.

Owner

Integer

The ID of the user who will be the administrator.

ForumType

String

The forum type that you are creating.

 

fs - will create a forum specific forum.

g - will create a global forum.

ExpiryDate

DateTime

The date the forum expires. If you do not want the forum to expire leave this field blank.

Notes

String

Any notes you want to associate with a forum.

MaxCats

Integer

The maximum amount of categories a forum can have. Enter the value of 0 if a forum can have an unlimited amount of categories.

MaxUsers

Integer

The maximum amount of users a forum can have. Enter the value of 0 if a forum can have an unlimited amount of users.

MaxThreads

Integer

The maximum amount of threads a forum can have. Enter the value of 0 if a forum can have an unlimited amount of threads.

SetID

Integer

The ID of the default set you want to create the forum with.

 

Examples

Visual Basic.Net

'Method AddForum

Result = ftObj.AddForum("My New Forum", "", 1, "g", New DateTime(2020, 1, 1), "My Notes", 0, 0, 0, 1)

If Result <> 0 Then MsgBox(Result)

 

C#

//Method AddForum

Result = ftObj.AddForum("My New Forum", "", 1, "g", new DateTime(2020, 1, 1), "My Notes", 0, 0, 0, 1);

if (Result != 0)

{

Interaction.MsgBox(Result, 0, null);

}

 

AddForumPermission

AddForumPermission

This function adds a user to the forum permission list.

 

Return Type: Integer

 

Name

Type

Description

ForumID

Integer

The ID of the forum you want to retrieve the listing of users for.

UserName

String

The username that you want to add to the forum permission list.

 

DeleteForum

DeleteForum

This function deletes a forum from the FuseTalk database.

 

Return Type: n/a

 

Name

Type

Description

ForumID

Integer

The ID of the forum you want to delete.

 

Examples

Visual Basic.Net

'Method DeleteForum

ftObj.DeleteForum(OtherForum.ID)

 

C#

 //Method DeleteForum

ftObj.DeleteForum(MyForum.ID);

 

DeleteForumPermission

DeleteForumPermission

This function removes a user from the forum permission list.

 

Return Type: n/a

 

Name

Type

Description

ForumID

Integer

The ID of the forum you want to retrieve the listing of users for.

UserID

Integer

The ID of the user you want to remove from the permissions list.

 

GetAllForums

GetAllForums

Retrieves all the forums from the database.

 

Return Type:Forum()

 

Examples

Visual Basic.Net

'Method GetAllForums

Dim AllForums() As Forum = ftObj.GetAllForums()

If Not AllForums IsNothing Then

    Dim f As Forum

    For Each f In AllForums

        MsgBox(f.Name)

    Next

End If

 

C#

//Method GetAllForums

FuseTalk.API.Forum[] AllForums = ftObj.GetAllForums();

if ( AllForums != null)

{

foreach (FuseTalk.API.Forum f in AllForums)

{

Interaction.MsgBox(f.Name, 0, null);

}

}

 

Related Items

GetForumByCategoryID, GetForumByName, GetForumByID, SearchForumsByCriteria, SearchForumsByAlphabet, GetForumGroupings, GetAllForumGroupings, GetForumsForUser

 

GetForumByCategoryID

GetForumByCategoryID

Retrieves a forum based on a category ID.

 

Return Type:Forum()

 

Name

Type

Description

CategoryID

Integer

The category ID you want to get the forum from.

 

Related Items

GetForumByName, GetForumByID, GetAllForums, SearchForumsByCriteria, SearchForumsByAlphabet, GetForumGroupings, GetAllForumGroupings, GetForumsForUser

 

GetForumByID

GetForumByID

This function retrieves the general information of a forum based on an ID.

 

Return Type:Forum()

 

Name

Type

Description

ForumID

Integer

The ID of the forum you want to retrieve.

 

Examples

Visual Basic.Net

'Method GetForumByID

Dim OtherForum As Forum = ftObj.GetForumByID(MyForum.ID)

MsgBox(OtherForum.Name)

 

C#

//Method GetForumByID

FuseTalk.API.Forum OtherForum = ftObj.GetForumByID(MyForum.ID);

Interaction.MsgBox(OtherForum.Name, 0, null);

 

Related Items

GetForumByCategoryID, GetForumByName, GetAllForums, SearchForumsByCriteria, SearchForumsByAlphabet, GetForumGroupings, GetAllForumGroupings, GetForumsForUser

 

GetForumByName

GetForumByName

This function retrieves the general information of a forum based on a forum name.

 

Return Type:Forum()

 

Name

Type

Description

ForumName

String

The name of the forum you want to retrieve.

 

Examples

Visual Basic.Net

'Method GetForumByName

Dim MyForum As Forum = ftObj.GetForumByName("My New Forum")

MsgBox(MyForum.Name)

 

C#

//Method GetForumByName

FuseTalk.API.Forum MyForum = ftObj.GetForumByName("My New Forum");

Interaction.MsgBox(MyForum.Name, 0, null);

 

Related Items

GetForumByCategoryID, GetForumByID, GetAllForums, SearchForumsByCriteria, SearchForumsByAlphabet, GetForumGroupings, GetAllForumGroupings, GetForumsForUser

 

GetForumCount

GetForumCount

Get the total count of forums in FuseTalk.

 

Return Type: Integer

 

Examples

Visual Basic.Net

Dim ForumCount AsInteger = ftObj.GetForumCount()

MsgBox(ForumCount)

 

C#

int ForumCount = ftObj.GetForumCount();

Interaction.MsgBox(ForumCount, 0, null);

 

GetForumPermissions

GetForumPermissions

This function retrieves all the users that have access to a locked forum.

 

Return Type: ftUser()

 

Name

Type

Description

ForumID

Integer

The ID of the forum you want to retrieve the listing of users for.

 

Related Items

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

 

GetForumSettings

GetForumSettings

Get the forum settings from the database.

 

Return Type: Settings()

 

Name

Type

Description

ForumID

Integer

The forum ID you want to get the settings for.

 

Examples

Visual Basic.Net

'Method GetForumSettings

Dim ForumSettings() As Settings = ftObj.GetForumSettings(OtherForum.ID)

Dim Setting As Settings

For Each Setting In ForumSettings

    MsgBox(Setting.Name & ": " & Setting.Value)

Next

 

C#

//Method GetForumSettings

FuseTalk.API.Settings[] ForumSettings = ftObj.GetForumSettings(OtherForum.ID);

foreach (FuseTalk.API.Settings Setting in ForumSettings)

{

Interaction.MsgBox(Setting.Name + ": " + Setting.Value, 0, null);

}

 

Related Items

GetDefaultCommunitySettings

 

InsertForumOwner

InsertForumOwner

This function inserts a user into the 'Forum Owners' group of a forum.

 

Return Type: n/a

 

Name

Type

Description

UserID

Integer

The ID of the user that you want to insert into the 'Forum Owners' group.

ForumID

Integer

The ID of the forum.

OwnerGroupID

Integer

The ID of the 'Forum Owners' group.

 

isForum

isForum

This function determines if the forum ID passed is a valid forum.

 

Return Type: Boolean

 

Name

Type

Description

ForumID

Integer

The ID of the forum you want to check.

 

Examples

Visual Basic.Net

Dim ForumCheck As Boolean = ftObj.isForum(OtherForum.ID)

MsgBox(ForumCheck)

 

C#

bool ForumCheck = ftObj.isForum(MyForum.ID);

Interaction.MsgBox(ForumCheck, 0, null);

 

SearchForumsByAlphabet

SearchForumsByAlphabet

This function searches for a forum based on a letter of the alphabet.

 

Return Type:Forum()

 

Name

Type

Description

Alpha

String

The letter you want to search on. This value is only case sensitive if your database is sensitive.

 

Examples

Visual Basic.Net

'Method SearchForumsByAlphabet

Dim ForumSearch1() As Forum = ftObj.SearchForumsByAlphabet("m")

If Not ForumSearch1 Is Nothing Then

    Dim f As Forum

    For Each f In ForumSearch1

        MsgBox(f.Name)

    Next

End If

 

C#

//Method SearchForumsByAlphabet

FuseTalk.API.Forum[] ForumSearch1 = ftObj.SearchForumsByAlphabet("m");

if (ForumSearch1 != null)

{

foreach (FuseTalk.API.Forum f in ForumSearch1)

{

Interaction.MsgBox(f.Name, 0, null);

}

}

 

Related Items

GetForumByCategoryID, GetForumByName, GetForumByID, GetAllForums, SearchForumsByCriteria, GetForumGroupings, GetAllForumGroupings, GetForumsForUser

 

SearchForumsByCriteria

SearchForumsByCriteria

This function searches a forum by keywords and other criteria's.

 

Return Type:  Forum()

 

Name

Type

Description

SearchBy

String

The field in which you wish to search.

vchforumsname - will search of the forum name field.
txnotes - will search the forum notes field.

SortBy

String

The value in which the query will be sorted on.

vchforumsname - sort the query on the name of the forum.
dtinsertdate - sort the query on the insert date of the forum.

SortByCriteria

String

The order in which the query will be sorted.

ASC - will sort the query ascending.
DESC - will sort the query descending.

Keyword

String

The keyword that the query will be based on.

StartDate

String

Enter the start date if you want to search for a forum between certain dates.

EndDate

String

Enter the end date if you want to search for a forum between certain dates.

 

Examples

Visual Basic.Net

'Method SearchForumsByCriteria

Dim ForumSearch2() As Forum = ftObj.SearchForumsByCriteria("vchforumname", "vchforumname", "ASC", "My", "", "")

If Not ForumSearch2 Is Nothing Then   

Dim f As Forum    

For Each f In ForumSearch2        

MsgBox(f.Name)   

Next

End If

 

C#

//Method SearchForumsByCriteria

FuseTalk.API.Forum[] ForumSearch2 = ftObj.SearchForumsByCriteria("vchforumname", "vchforumname", "ASC", "My", "", "");

if ( ForumSearch2 != null)

{

foreach (FuseTalk.API.Forum f in ForumSearch2)

{

Interaction.MsgBox(f.Name, 0, null);

}

}

 

Related Items

GetForumByCategoryID, GetForumByName, GetForumByID, GetAllForums, SearchForumsByAlphabet, GetForumGroupings, GetAllForumGroupings, GetForumsForUser

 

SetForumSettings

SetForumSettings

Updates a forum setting in the database.

 

Return Type: n/a

 

Name

Type

Description

SettingName

String

The name of the setting.

SettingValue

String

The value of the setting.

ForumID

Integer

The forum ID you want the setting you are updating belongs to.

 

Examples

Visual Basic.Net

'Method SetForumSettings

ftObj.SetForumSettings("FTSET_ATTACHMENTPATH", "c:\program files\fusetalk inc\fusetalk.net\web\forum\attachments", OtherForum.ID)

 

C#

//Method SetForumSettings

ftObj.SetForumSettings("FTSET_ATTACHMENTPATH", "c:\\program files\\fusetalk inc\\fusetalk.net\\web\\forum\\attachments", MyForum.ID);

 

UpdateForum

UpdateForum

This function updates a forum in the FuseTalk database.

 

Return Type: Integer

 

Name

Type

Description

Forum

Forum

The forum object you wish to update.

OwnerList

String

A comma delimited list of the IDs of the users you wish to have as owners of the forum.

GroupingList

String

A comma delimited list of the IDs of the groupings the forums will associate with.

 

Examples

Visual Basic.Net

'Method UpdateForum

OtherForum.MaxUsers = 20

Result = ftObj.UpdateForum(OtherForum, "1", "")

If Result  0 Then MsgBox(Result)

 

C#

//Method UpdateForum

OtherForum.MaxUsers = 20;

Result = ftObj.UpdateForum(OtherForum, "1", "");

if (Result != 0)

{

Interaction.MsgBox(Result, 0, null);

}