-
FAQ
- Forum Search
- Community
- Online Manual
- Support Helpers of the Month
- Function Database
splitTopic
Description
General function to split off a topic.
Syntax
int splitTopic (int $split1_ID_TOPIC, array $splitMessages, string $new_subject)
Parameter $split1_ID_TOPIC
Expected type: Integer
Description: The ID of the original topic
Parameter $splitMessages
Expected type: Array of Integers
Description: An array containing the IDs of the messages being split
Parameter $new_subject
Expected type: String
Description: The subject for the new split topic (as specified by the user)
Return value
Expected type: Integer
Description: The topic ID of the new split topic
Notes
- Creates a new topic and moves the messages with the IDs in array messagesToBeSplit to the new topic.
- The subject of the newly created topic is set to 'newSubject'.
- Marks the newly created message as read for the user splitting it.
- Updates the statistics to reflect a newly created topic.
- Logs the action in the moderation log.
- A notification is sent to all users monitoring this topic.
- Returns the topic ID of the new split topic.
Advertisement:- Help | Terms and Rules | Go Up ▲
- Copyright © 2022 Simple Machines. All Rights Reserved.
- Page created in 0.015 seconds with 13 queries.
- Forum Search