Bitrix Site Manager

CForumNew::Add

int
Add(
 array arFields
);

The method Add creates a new forum with parameters specified in the array arFields. Returns the ID of the created forum.

Before a forum is added, you should check whether it can be added using CForumNew::CanUserAddForum.

Parameters

ParameterDescription
arFields An array of the format Array(field1=>value1[, field2=>value2 [, ..]]), where
  • field - field name;
  • value - field value.
The fields are listed in the List of forum fields. Required fields must be filled.

Return Values

Returns the ID of the created forum on success, or false otherwise.

See Also

  • Forum fields