⇒ http://my.opera.com/tech-nova/blog/
Un site qui recense les astuces et évolutions des possibilités de SPIP.
What is a SPIP pipeline ? It's a hook
Avril 2008, Par tech-novaDuring the normal execution of several commands, call-outs are made to optional scripts that allow a developer to add functionality or checking. Typically, the hooks allow for a command to change the values of function arguments before any other call, and allow for a post-processing treatment that will always change the function result.
Exemple :
function prefix_treatment($flow) {
/* add something to the flow */
$flow .= 'This is some html code';
return $flow;
}
plugin.xml defines the implemented hooks with a list of tags :
point_entree fonction fichier.php
- : name of the hook (from a list defined in ecrire/inc_version.php)
- : function name without it’s prefix
- : file name that defines the previous function. It’s name must be prefix_action
(src : http://doc.spip.org/@Tuto-Se-servir-des-points-d-entree)
→ Lire la suite sur le site d’origine…
