Coding with SPIP 3.0
SPIP3.0 Technical Documentation

> > > > The contents of an action file

The contents of an action file

An action file provides at least one function matching its own filename. A file called action/laugh.php should therefore declare a function called action_laugh_dist().

  1. <?php
  2. if (!defined("_ECRIRE_INC_VERSION")) return;
  3.  
  4. function action_laugh_dist(){
  5.  
  6. }
  7. ?>

Download

Operation of the function

In general, the main function is divided into 2 sections: verification of authorisations, then execution of the requested process.