Print this Page

FAVORITE Functions

Below is a listing of all the functions.

 

AddFavorite

AddFavorite

This function adds a favorite to a user's favorite list.

 

Return Type: n/a

 

Name

Type

Description

UserID

Integer

The ID of the user.

ThreadID

Integer

The ID of the topic the user wishes to add to their list.

FavoriteDesc

String

A short, personal description of the topic.

TablePref

String

If the topic is archived use the “arc” parameter. Otherwise leave this blank.

CategoryID

Integer

The ID of the category the topics belongs to.

 

Examples

Visual Basic.Net

'Method AddFavorite

ftObj.AddFavorite(UserID, ThreadID, "My Favorite Topic", "", CategoryID)

 

C#

//Method AddFavorite

ftObj.AddFavorite(UserID, ThreadID, "My Favorite Topic", "", CategoryID);

 

DeleteAllFavoritesByUser

DeleteAllFavoritesByUser

This function deletes all the favorites of a user.

 

Return Type: n/a

 

Name

Type

Description

UserID

Integer

The ID of the user.

 

DeleteFavorite

DeleteFavorite

This function deletes the specified favorites for a user.

 

Return Type: n/a

 

Name

Type

Description

FavoriteID

Integer

The ID of the favorite you wish to delete.

UserID

Integer

The ID of the user.

 

Examples

Visual Basic.Net

'Method GetAllFavoritesByUser

Dim Favorites() As Favorite = ftObj.GetFavorites(UserID, ForumID)

If Not Favorites Is Nothing Then

    Dim Fav As Favorite

    ForEach Fav In Favorites

        MsgBox(Fav.Description)

 

        'Method DeleteFavorite

        ftObj.DeleteFavorite(Fav.ID, UserID)

    Next

End If

 

C#

//Method GetAllFavoritesByUser

FuseTalk.API.Favorite[] Favorites = ftObj.GetFavorites(UserID, ForumID);

if (( Favorites != null))

{

foreach (FuseTalk.API.Favorite Fav in Favorites)

{

Interaction.MsgBox(Fav.Description, 0, null);

 

//Method DeleteFavorite

ftObj.DeleteFavorite(Fav.ID, UserID);

}

}

 

GetAllFavoritesByUser

GetAllFavoritesByUser

This function gets all the favorites for a user.

 

Return Type: Favorite()

 

Parameters 

Name

Type

Description

UserID

Integer

The ID of the user.

 

Examples

Visual Basic.Net

'Method GetAllFavoritesByUser

Dim Favorites() As Favorite = ftObj.GetFavorites(UserID, ForumID)

If Not Favorites Is Nothing Then

    Dim Fav As Favorite

    For Each Fav In Favorites

        MsgBox(Fav.Description)

 

        'Method DeleteFavorite

        ftObj.DeleteFavorite(Fav.ID, UserID)

    Next

End If

 

C#

//Method GetAllFavoritesByUser

FuseTalk.API.Favorite[] Favorites = ftObj.GetFavorites(UserID, ForumID);

if (( Favorites != null))

{

foreach (FuseTalk.API.Favorite Fav in Favorites)

{

Interaction.MsgBox(Fav.Description, 0, null);

 

//Method DeleteFavorite

ftObj.DeleteFavorite(Fav.ID, UserID);

}

}

 

Related Items

GetFavorites

 

GetFavorites

GetFavorites

This function gets all the favorites for a user and a specified forum.

 

Return Type:Favorite()

 

Name

Type

Description

UserID

Integer

The ID of the user.

ForumID

Integer

The ID of the forum the user is logged into.

 

Related Items

GetAllFavoritesByUser