Print this Page

CATEGORY Functions

Below is a listing of all the functions.

 

AddChildrenCategory

AddChildrenCategory

This function adds sub-categories to a category (or a header).

 

Return Type: n/a

 

Name

Type

Description

ParentID

Integer

The ID of the parent category.

CategoryID

Integer

The ID of the category you are adding to the parent category.

ForumID

Integer

The ID of the forum both categories belong to.

 

Examples

Visual Basic.Net

'Method GetAvailableSubCategories

Dim AvailableSubCategories As Category() = ftObj.GetAvailableSubCategories(ForumID)

If Not AvailableSubCategories Is Nothing Then

    Dim tmpCat As Category

 

    'Method AddChildrenCategory

    For Each tmpCat In AvailableSubCategories

 

        ftObj.AddChildrenCategory(Header.CategoryID, tmpCat.CategoryID, ForumID)

    Next

 

    'Method ResetChildrenCategory

    For Each tmpCat In AvailableSubCategories

        ftObj.ResetChildrenCategory(Header.CategoryID, tmpCat.CategoryID, ForumID)

    Next

End If

 

C#

//Method GetAvailableSubCategories

FuseTalk.API.Category[] AvailableSubCategories = ftObj.GetAvailableSubCategories(ForumID);

if (AvailableSubCategories != null)

{

//Method AddChildrenCategory

foreach (FuseTalk.API.Category tmpCat in AvailableSubCategories)

{

ftObj.AddChildrenCategory(Header.CategoryID, tmpCat.CategoryID, ForumID);

}

 

//Method ResetChildrenCategory

foreach (FuseTalk.API.Category tmpCat in AvailableSubCategories)

{

ftObj.ResetChildrenCategory(Header.CategoryID, tmpCat.CategoryID, ForumID);

}

}

 

CategoryPermissions

CategoryPermissions

This function returns a comma delimited list of the categories a user has access to in a forum.

 

Return Type: String

 

Name

Type

Description

CatBlock

String

A comma delimited list of the categories the user has blocked (vchcatblock field in the users table).

UserID

Integer

The ID of the user that you want, retrieves the listing of categories they have access to.

ForumID

Integer

The ID of the forum that the category belongs to.

 

Examples

Visual Basic.Net

'Method CategoryPermissions

Dim CatPerms As String = ftObj.CategoryPermissions("", UserID, ForumID)

 

C#

//Method CategoryPermissions

string CatPerms = ftObj.CategoryPermissions("", UserID, ForumID);

 

ChangeCategoryStatus

ChangeCategoryStatus

Change the status of a category.

 

Return Type: n/a

 

Name

Type

Description

CategoryStatus

String

The new status of the category.

 

active - to create an post and reply category.

read - to create a read only category.

hide - to create a hidden category.

header - to create a category header.

locked - to create a locked category.

lockedhead - to create a locked header.

lockedread - to create a locked read only category.

protected - to create a password protected category.

CategoryID

Integer

The ID of the category you wish to update.

 

Examples

Visual Basic.Net

'Method ChangeCategoryStatus

ftObj.ChangeCategoryStatus("active", NewCategory.CategoryID)

 

C#

//Method ChangeCategoryStatus

ftObj.ChangeCategoryStatus("active", NewCategory.CategoryID);

 

ChangeCatGroupNum

ChangeCatGroupNum

Change the order of a category.

 

Return Type: n/a

 

Name

Type

Description

CategoryID

Integer

The ID of the category you with to change the order for.

ForumID

Integer

The ID of the forum the category belongs to.

NewOrder

Integer

The new order of the category.

 

Examples

Visual Basic.Net

'Method ChangeCatGroupNum

ftObj.ChangeCatGroupNum(NewCategory.CategoryID, ForumID, 3)

 

C#

//Method ChangeCatGroupNum

ftObj.ChangeCatGroupNum(NewCategory.CategoryID, ForumID, 3);

 

CreateCategory

CreateCategory

Check if an IP Address has been banned from the forumid that you have passed or from the global banned list.

 

Return Type:Category

 

Name

Type

Description

CategoryName

String

The name you want to call your category.

ForumID

Integer

The ID of the forum that the category will belong in.

CategoryStatus

String

The status of the category. The values can be:

 

active - to create an post and reply category.

read - to create a read only category.

hide - to create a hidden category.

header - to create a category header.

locked - to create a locked category.

lockedhead - to create a locked header.

lockedread - to create a locked read only category.

protected - to create a password protected category.

CategoryDesc

String

A longer description of the category you are creating.

Order

Integer

The start order of the category.

 

Examples

Visual Basic.Net

'Method CreateCategory

NewCategory = ftObj.CreateCategory("My Category", ForumID, "read", "This is my description", 4)

If NewCategory.ErrorCode <> 0 Then

    MsgBox(NewCategory.ErrorCode)

    Exit Sub

End If

Header = ftObj.CreateCategory("My Header", ForumID, "header", "", 5)

If Header.ErrorCode <> 0 Then

    MsgBox(NewCategory.ErrorCode)

    Exit Sub

End If

 

C#

//Method CreateCategory

NewCategory = ftObj.CreateCategory("My Category", ForumID, "read", "This is my description", 4);

if (NewCategory.ErrorCode != 0)

{

interaction.MsgBox(NewCategory.ErrorCode, 0, null);

return;

}

Header = ftObj.CreateCategory("My Header", ForumID, "header", "", 5);

if (Header.ErrorCode != 0)

{

interaction.MsgBox(Header.ErrorCode, 0, null);

return;

}

 

Related Items

IsCategory, GetAllCategories, GetAllForumCategories, GetAvailableSubCategories, GetCategories, GetPrivateMessageCategories

 

DeleteCategory

DeleteCategory

This function will delete a category from FuseTalk. Everything associated with the category will also be deleted.

 

Return Type: n/a

 

Name

Type

Description

CategoryID

Integer

The ID of the category that you want to delete.

 

Examples

Visual Basic.Net

'Method DeleteCategory

ftObj.DeleteCategory(NewCategory.CategoryID)

ftObj.DeleteCategory(Header.CategoryID)

 

C#

//Method DeleteCategory

ftObj.DeleteCategory(NewCategory.CategoryID);

ftObj.DeleteCategory(Header.CategoryID);

 

GetAllCategories

GetAllCategories

Gets all categories for a forum.

 

Return Type:Category()

 

Parameters 

Name

Type

Description

ForumID

Integer

The forum ID you wish to retrieve the categories for.

 

Related Items

CreateCategory, IsCategory, GetAllForumCategories, GetAvailableSubCategories, GetCategories, GetPrivateMessageCategories

 

GetAllForumCategories

GetAllForumCategories

Gets all categories for a forum.

 

Return Type:Category

 

Examples

Visual Basic.Net

'Method GetAllForumCategories

Dim Categories() As Category = ftObj.GetAllForumCategories()

If Not ForumCategories Is Nothing Then

    Dim tmpCat As Category

    For Each tmpCat In ForumCategories

        MsgBox(tmpcat.CategoryName)

    Next

End If

 

C#

//Method GetAllForumCategories

FuseTalk.API.Category[] Categories = ftObj.GetAllForumCategories();

if (ForumCategories != null)

{

foreach (FuseTalk.API.Category tmpCat in ForumCategories)

{

interaction.MsgBox(tmpCat.CategoryName, 0, null);

}

}

 

Related Items

CreateCategory, IsCategory, GetAllCategories, GetAvailableSubCategories, GetCategories, GetPrivateMessageCategories

 

GetAvailableSubCategories

GetAvailableSubCategories

Gets the available sub-categories for a header.

 

Return Type:Category()

 

Name

Type

Description

ForumID

Integer

The ID of the forum which you wish the categories belong to.

 

Examples

Visual Basic.Net

'Method GetAvailableSubCategories

Dim AvailableSubCategories As Category() = ftObj.GetAvailableSubCategories(ForumID)

If Not AvailableSubCategories Is Nothing Then

    Dim tmpCat As Category

 

    'Method AddChildrenCategory

    For Each tmpCat In AvailableSubCategories

 

        ftObj.AddChildrenCategory(Header.CategoryID, tmpCat.CategoryID, ForumID)

    Next

 

    'Method ResetChildrenCategory

    For Each tmpCat In AvailableSubCategories

        ftObj.ResetChildrenCategory(Header.CategoryID, tmpCat.CategoryID, ForumID)

    Next

End If

 

C#

//Method CreateCategory

NewCategory = ftObj.CreateCategory("My Category", ForumID, "read", "This is my description", 4);

if (NewCategory.ErrorCode != 0)

{

interaction.MsgBox(NewCategory.ErrorCode, 0, null);

return;

}

Header = ftObj.CreateCategory("My Header", ForumID, "header", "", 5);

if (Header.ErrorCode != 0)

{

interaction.MsgBox(Header.ErrorCode, 0, null);

return;

}

 

Related Items

IsCategory, GetAllCategories, GetAllForumCategories, GetAvailableSubCategories, GetCategories, GetPrivateMessageCategories

 

GetCatByName

GetCatByName

Get a category by its name.

 

Return Type: Integer

 

Name

Type

Description

CategoryName

String

The name of the category.

ForumID

Integer

The ID of the forum the category belongs to.

 

Examples

Visual Basic.Net

'Method GetCatByName

Dim CatID AsInteger = ftObj.GetCatByName("New Category Name", ForumID)

 

C#

//Method GetCatByName

int CatID = ftObj.GetCatByName("New Category Name", ForumID);

 

GetCategories

GetCategories

Get all categories for a forum, including all the posting statistics.

 

Return Type:  Category()

 

Name

Type

Description

ForumID

Integer

The ID of the forum the categories belongs to.

 

Examples

Visual Basic.Net

'Method GetCategories

Dim ForumCategories() As Category = ftObj.GetCategories(ForumID)

If Not ForumCategories Is Nothing Then   

Dim tmpCat As Category    

For Each tmpCat In ForumCategories        

MsgBox(tmpcat.CategoryName)    

Next

End If

 

C#

//Method GetCategories FuseTalk.API.Category[] ForumCategories = ftObj.GetCategories(ForumID); if (ForumCategories != null)

{

foreach (FuseTalk.API.Category tmpCat in ForumCategories)

{

interaction.MsgBox(tmpCat.CategoryName, 0, null);

}

}

 

Related Items

CreateCategory, IsCategory, GetAllCategories, GetAllForumCategories, GetAvailableSubCategories, GetPrivateMessageCategories

 

GetCategoryCount

GetCategoryCount

This function will return the number of categories in a forum.

 

Return Type: Integer

 

Name

Type

Description

ForumID

Integer

The ID of the forum you wish to get the count for.

 

Examples

Visual Basic.Net

'Method GetCategoryCount

Dim Count AsInteger = ftObj.GetCategoryCount(ForumID)

MsgBox("Category Count: " & Count)

 

C#

//Method GetCategoryCount

int Count = ftObj.GetCategoryCount(ForumID);

interaction.MsgBox("Category Count: " + Count, 0, null);

 

GetCategoryModPermssions

GetCategoryModPermssions

Gets a list of permissions a user has for a category.

 

Return Type: String

 

Name

Type

Description

UserID

Integer

The ID of the user which you wish to retrieve the permissions for.

CategoryID

Integer

The ID of the category you wish to retrieve the permissions for.

ForumID

Integer

The ID of the forum the category and the user belongs to.

 

IndividualCategoryPerm

IndividualCategoryPerm

Checks if a user has permissions to access a category.

 

Return Type: Integer

 

Name

Type

Description

CategoryID

Integer

The ID of the category you wish to check access for.

CategoryPerms

String

The list of categories a user has access to.

 

Examples

Visual Basic.Net

'Method IndividualCategoryPerm

Result = ftObj.IndividualCategoryPerm(NewCategory.CategoryID, CatPerms)

If Result  0 Then MsgBox(Result)

 

C#

//Method IndividualCategoryPerm

Result = ftObj.IndividualCategoryPerm(NewCategory.CategoryID, CatPerms);

if (Result != 0)

{

interaction.MsgBox(Result, 0, null);

}

 

IsCategory

IsCategory

Check if the category ID that you have passed is a valid category in a forum.

 

Return Type:  Category

 

Name

Type

Description

CategoryID

Integer

The ID of the category that will be checked.

ForumID

Integer

The ID of the forum you wish to check the category with.

 

Examples

Visual Basic.Net

'Method IsCategory

Dim Cat As Category = ftObj.IsCategory(NewCategory.CategoryID, ForumID)

If Cat.ErrorCode  0 Then MsgBox(Cat.ErrorCode)

 

C#

//Method IsCategory

FuseTalk.API.Category Cat = ftObj.IsCategory(NewCategory.CategoryID, ForumID);

if (Cat.ErrorCode != 0)

{

interaction.MsgBox(Cat.ErrorCode, 0, null);

}

 

Related Items

CreateCategory, GetAllCategories, GetAllForumCategories, GetAvailableSubCategories, GetCategories, GetPrivateMessageCategories

 

ProtectedLogin

ProtectedLogin

This function checks to see if the password that you have passed matches the password of the category ID.

 

Return Type: String

 

Name

Type

Description

CategoryID

Integer

The ID of the category that you want to validate.

Password

String

The password that you wish to validate with the category.

ForumID

Integer

The ID of the forum that the category belongs to.

response

HttpResponse

The current HttpResponse object (protect login needs to set a cookie).

 

ResetChildrenCategory

ResetChildrenCategory

This function removes a category from a parent.

 

Return Type: n/a

 

Name

Type

Description

ParentID

Integer

The ID of the parent category.

CategoryID

Integer

The ID of the category you are adding to the parent category.

ForumID

Integer

The ID of the forum both categories belong to.

 

Examples

Visual Basic.Net

'Method GetAvailableSubCategories

Dim AvailableSubCategories As Category() = ftObj.GetAvailableSubCategories(ForumID)

If Not AvailableSubCategories Is Nothing Then   

Dim tmpCat As Category    

 

'Method AddChildrenCategory   

For Each tmpCat In AvailableSubCategories

 

ftObj.AddChildrenCategory(Header.CategoryID, tmpCat.CategoryID, ForumID)    

Next   

 

'Method ResetChildrenCategory   

For Each tmpCat In AvailableSubCategories

ftObj.ResetChildrenCategory(Header.CategoryID, tmpCat.CategoryID, ForumID)

Next

End If

 

C#

//Method GetAvailableSubCategories

FuseTalk.API.Category[] AvailableSubCategories = ftObj.GetAvailableSubCategories(ForumID);

if (AvailableSubCategories != null)

{

//Method AddChildrenCategory

foreach (FuseTalk.API.Category tmpCat in AvailableSubCategories)

{

ftObj.AddChildrenCategory(Header.CategoryID, tmpCat.CategoryID, ForumID);

}

 

//Method ResetChildrenCategory

foreach (FuseTalk.API.Category tmpCat in AvailableSubCategories)

{

ftObj.ResetChildrenCategory(Header.CategoryID, tmpCat.CategoryID, ForumID);

}

}

 

UpdateCategory

UpdateCategory

This function lets you update all of the settings of a category.

 

Return Type: Integer

 

Name

Type

Description

Category

Category

A category object with the values of the category you wish to update.

ForumID

Integer

The ID of the forum that the category belongs to.

 

Examples

Visual Basic.Net

'Method UpdateCategory

NewCategory.CategoryName = "New Category Name"

Result = ftObj.UpdateCategory(NewCategory, ForumID)

If Result  0 Then MsgBox(Result)

 

C#

//Method UpdateCategory

NewCategory.CategoryName = "New Category Name";

Result = ftObj.UpdateCategory(NewCategory, ForumID);

if (Result != 0)

{

interaction.MsgBox(Result, 0, null);

}

 

UpdateCategoryNotice

UpdateCategoryNotice

This function updates the category notice of a category.

 

Return Type: Integer

 

Name

Type

Description

CategoryNotice

String

The text of the category notice.

CategoryID

Integer

The ID of the category that will be checked.

ForumID

Integer

The ID of the forum you wish to check the category with.

 

Examples

Visual Basic.Net

'Method UpdateCategoryNotice

ftObj.UpdateCategoryNotice("This is the notice", NewCategory.CategoryID, ForumID)

 

C#

//Method UpdateCategoryNotice

ftObj.UpdateCategoryNotice("This is the notice", NewCategory.CategoryID, ForumID);