[ Index ]
 

Code source de Phorum 5.1.25

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/docs/example_mods/example_check_post/ -> example_check_post.php (source)

   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  ?>


Généré le : Thu Nov 29 12:22:27 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics