Bitrix Site Manager

Add

int
Add(
 array arFields
);

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

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 topic fields. The required fields must be filled.

Return Values

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

See Also

  • Topic fields
  • Before a topic is created, you should check whether it can be added using CForumTopic::CanUserAddTopic. It is recommended to add and modify messages and message subjects using the method ForumAddMessage.