Pipelines

Les pipelines sont un mécanisme récent et extrèmement puissant qui permet aux plugins d’intervenir dans la fabrication des pages publiques et privées.

De façon très générale, une fonction pipeline récupère un “flux”, le modifie éventuellement puis le renvoie. Par exemple, pour un flux de type texte, elle peut analyser le texte qu’elle reçoit et y rajouter des morceaux comme elle le désire. Celà se fait le plus souvent par des expressions régulières. Attention, vu que le plugin n’est pas tout seul à agir sur ce flux, il est fondamental de renvoyer ce qu’on a reçu, modifié ou non.

Déclaration

Un plugin s’intercale dans un pipeline en déclarant sa fonction dans le tableau global $spip_pipeline. Attention, cette déclaration doit ajouter sa propre fonction précédée d’un pipe |, ceci afin de ne pas écraser les insertions des autres plugins. Pour les plugins, cela est fait automatiquement par l’administration plugins d’après le fichier de définition plugin.xml vu dans le chapitre suivant, donc pas de souci si on utilise ce moyen.

Les pipelines disponibles

Voir le script ecrire/inc_version.php pour une liste actualisée.

Nom Type Description Flux Défaut
affichage_final P Contenu final Texte f_surligne, f_tidy, f_admin
affiche_droite E Colonne droite T1
affiche_gauche E Colonne gauche T1
affiche_milieu E Colonne milieu T1
ajouter_boutons E Boutons navigation OB
ajouter_onglets E Onglets sous bouton T2
body_prive E Corps de page Texte
exec_init E Initialisation ? T1
header_prive E Header Texte f_jQuery
insert_head P Header Texte f_jQuery
insert_js P js fichier ou inline T3
verifie_js_necessaire P Booléen js nécessaire T4
mots_indexation F Mots à indexer T5
nettoyer_raccourcis_typo T Nettoyer raccourcis typos Texte
pre_propre T Avant propre() Texte extraire_multi
post_propre T Après propre() car insurance ex()
pre_typo T Avant typo() Texte extraire_multi
post_typo T Avant typo() Texte quote_amp
pre_edition E Avant éditer objet T6 premiere_revision
post_edition E Après éditer objet T6 nouvelle_revision
pre_syndication P Flux RSS Texte
post_syndication P Flux RSS T7
pre_indexation F Avant indexation Texte
requete_dico F Recherche dictionnaire T8
agenda_rendu_evenement P Rendu agenda T9
taches_generales_cron F Tâches CRON Cron
calculer_rubriques F Calcul des rubriques Null

Types de plugins :

  • P : espace public
  • E : espace privé (ecrire/
  • T : Texte ou Typographie
  • F : Tâche de fond

    Types de flux

Type Composition
Texte Du contenu sous forme de texte
T1 array(’args’=>array(’exec’=>’…’),’data’=>’’))
T2 array(’data’=>$onglets,’args’=>$rubrique)
T3 array(“type” => “fichier/inline”,”data” => array())
T4 array(“page” => $page, “data” => “”)
T5 array(’args’=>array(’min_long’=>…),’data’=>array(mots))
T6 array(’args’ => array( ’table’=>’spip_…’, ’id_objet’=> … ), ’data’=>champs )
T7 array(lien, id_syndic, données)
T8 array(’args’=>array(’val’=>…,’min_long’=>…),’data’=>requète)
T9 array(’args’=>array(’evenement’=>$evenement, ’type’=>’ics/avec_heure/sans_heure’), ’data’=>$sum)
OB Objet Bouton
Cron Tableau de délais (secondes) par tâche

Tout cela est assez compliqué et en pleine mutation, il faut malheureusement souvent étudier le code du core ou des exemples life insurance quotes d’autres plugins pour comprendre comment utiliser les pipelines complexes. Les types “texte” sont en général plus faciles à mettre en oeuvre.

A technological history of France

Science and technology have advanced greatly all over the globe; there is hardly any country that does not depend on some type of technology for its everyday use. When we speak of science and technology, we normally picture very modern countries with huge neon signs and tall skyscrapers. This, however, is a misconception. even countries that don’t have such things, agricultural economies or countries well known for their arts and historical significance, often have some contribution to make to the world of c=science and technology. When we speak of technologically advanced nations, we immediately think of the United States, Japan and China. However, we miss out a very significant contributor in this case; France. It is true that when we think of this country, we think of the Eiffel tower, we also think of fancy perfumes and of course, the ever so famous French fashion industry.  However, we fail to acknowledge the contributions that this country has made to technology and science. Today I will be discussing briefly the technological history of France.

There are a number of different fields of science and technology that France is actually quite prominent in. Since these types of technology do not include very popular products like smartphones and laptops, we are unaware of the country’s performance in this respect. Did you, for instance, know that France is the leader in nuclear technology exports? We all probably know about bulging disc issues a lot more than we know of this fact!

Everyone knows of the bullet trains in Japan and the high speed transport that is now popular worldwide. we are all aware of the numerous automobiles that are present in the world. However, did you know that such methods of transport originated in France?

The French are also known for their contribution to the photography industry, not only in terms of fashion shoots, but also in terms of the development of this technology. If you think you will be taking a payday loan or a pikalaina as the French would call it, to purchase a brand new camera, you owe it to the French!

France promotes the research in the fields of science and technology by the numerous science and technology universities that are present in the country. This research is what has truly enabled France to become the source of the invention of so many useful items without which we would not be able to survive. Refrigerators, for instance, exist thanks to the hard work of many French scientists. Internal combustion engines too exist because of the French.

It can be safe to conclude that we cannot assume that we know all of a country’s strengths and contributions without fully studying not only its obvious traits but also the various traits that the country may have that are simply not highlighted. In this case, I believe not many of us thought that the fashion capital of the world had anything to do with science and technology.  Yet, it’s evident that France has quite a rich history of technology that awaits further research by all those who are interested!

 

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply