Subversion Repositories Applications.papyrus

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
831 florian 1
<?php
2
 
3
// This module demonstrates how a hook function for the check_post
4
// hook could be written.
5
 
6
if(!defined("PHORUM")) return;
7
 
8
function phorum_mod_example_check_post_check_post ($args) {
9
   list ($message, $error) = $args;
10
   if (!empty($error)) return $args;
11
 
12
   if (stristr($message["body"], "bar") !== false) {
13
       return array($message, "The body may not contain 'bar'");
14
   }
15
 
16
   return $args;
17
}
18
 
19
?>