3.14.4. before_delete

This hook allows modules to implement extra or different delete functionality.

The primary use of this hook would be for moving the messages to some archive-area instead of really deleting them.

Call time:

In moderation.php, just before deleting the message(s)

Hook input:

An array containing the following 5 parameters:

Hook output:

Same as input.
$delete_handled and $msg_ids are used as return data for the hook.

Example code:

function phorum_mod_foo_before_delete($data)
{
    global $PHORUM;

    // Store the message data in the module's settings for
    // future use.
    $PHORUM["mod_foo"]["deleted_messages"][$msgthd_id] = $message;
    phorum_db_update_settings(array("mod_foo" => $PHORUM["mod_foo"]));

    return $data;
}