Prev |  | Next

## 3.8. Message handling

### 3.8.1. posting_init

This hook can be used for doing modifications to the environment of the posting scripts at an early stage. One of the intended purposes of this hook is to give mods a chance to change the configuration of the posting fields in `$PHORUM["post_fields"]`.

Call time:

Right after the `posting.php` script's configuration setup and before starting the posting script processing.

Hook input:

None

Hook output:

None

Example code:

    function phorum_mod_foo_posting_init ()
    {
        global $PHORUM;

        //add the default, descriptive text to the message body
        $PHORUM["post_fields"]["body"][pf_INIT] = $PHORUM["DATA"]["LANG"]["mod_foo"]["default_body_text"];

    }

Prev | Up | Next
| Home |