Prev |  | Next

### 3.8.3. posting_custom_action

This hook can be used by modules to handle (custom) data coming from the posting form. The module is allowed to change the data that is in the input message. When a module needs to change the meta data for a message, then this is the designated hook for that task.

Call time:

In `posting.php` right after all the initialization tasks are done and just before the posting script starts its own action processing.

Hook input:

Array containing message data.

Hook output:

Same as input.

Example code:

    function phorum_mod_foo_posting_custom_actions ($message)
    {
        global $PHORUM;

        // for some reason, create an MD5 signature for the original body
        if (!empty($message["body"])
            $message["meta"]["mod_foo"]["body_md5"] = md5($message["body"]);

        return $message;
    }

Prev | Up | Next
| Home |