This hook can be used to change the edited message before it is stored in the database.
Call time:
In include/posting/action_edit.php
, right before
storing an edited message in the database.
Hook input:
An array containing message data.
Hook output:
Same as input.
Example code:
function phorum_mod_foo_before_edit($dbmessage) { global $PHORUM; // If the message body does not contain the disclaimer, add it if (strpos($dbmessage["body"], $PHORUM["DATA"]["LANG"]["mod_foo"]["Disclaimer"]) === false) { $dbmessage["body"] .= "\n".$PHORUM["DATA"]["LANG"]["mod_foo"]["Disclaimer"]; } return $dbmessage; }