<?xml
version="1.0" encoding="utf-8"?>
<rss version="2.0" 
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:atom="http://www.w3.org/2005/Atom"
>

<channel xml:lang="fr">
	<title>marcimat. {{Ma Graine}} .Net</title>
	<link>http://marcimat.magraine.net/</link>
	<description>marcimat. Ma Graine . Net est un espace regroupant le site personnel de Marcimat (pr&#233;sentant quelques &#233;crits et un bloc note de techniques pour SPIP).</description>
	<language>fr</language>
	<generator>SPIP - www.spip.net</generator>
	<atom:link href="http://marcimat.magraine.net/spip.php?page=backend&amp;id_rubrique=23" rel="self" type="application/rss+xml" />




<item xml:lang="fr">
		<title>Livre libre &#171;Programmer avec SPIP&#187;</title>
		<link>http://marcimat.magraine.net/Livre-libre-Programmer-avec-SPIP</link>
		<guid isPermaLink="true">http://marcimat.magraine.net/Livre-libre-Programmer-avec-SPIP</guid>
		<dc:date>2010-05-18T17:12:53Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>Matthieu Marcillaud</dc:creator>



		<description>
&lt;p&gt;T&#244;t ce matin a &#233;t&#233; propos&#233;e officiellement la premi&#232;re version du livre &#171; Programmer avec SPIP &#187; pouvant &#234;tre achet&#233;e en ligne chez un imprimeur &#171; &#224; la demande &#187;. Cette &#171; &#201;dition Troglo2 &#187;, sous licence libre (cc-by-sa), est un export complet du site http://programmer.spip.org en date du 16 mai 2010. Il est diffus&#233; chez Lulu dans un format A5 &#224; spirale. Retours sur cette exp&#233;rience. L'id&#233;e a germ&#233; un jour de fin 2008 o&#249; l'on m'a r&#233;mun&#233;r&#233; quelques jours pour &#233;crire des pages d'une documentation technique, peu (...)&lt;/p&gt;


-
&lt;a href="http://marcimat.magraine.net/-Semences-SPIP-" rel="directory"&gt;Semences SPIP&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_chapo'&gt;&lt;p&gt;T&#244;t ce matin a &#233;t&#233; propos&#233;e officiellement la premi&#232;re version du livre &#171; Programmer avec SPIP &#187; &lt;a href='http://www.lulu.com/product/item/programmer-avec-spip/11019986' class='spip_out' rel='external'&gt;pouvant &#234;tre achet&#233;e en ligne&lt;/a&gt; chez un imprimeur &#171; &#224; la demande &#187;. Cette &#171; &#201;dition Troglo2 &#187;, sous licence libre (cc-by-sa), est un export complet du site &lt;a href='http://programmer.spip.org/' class='spip_out' rel='nofollow external'&gt;http://programmer.spip.org&lt;/a&gt; en date du 16 mai 2010. Il est diffus&#233; chez Lulu dans un format A5 &#224; spirale. Retours sur cette exp&#233;rience.&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;p&gt;L'id&#233;e a germ&#233; un jour de fin 2008 o&#249; l'on m'a r&#233;mun&#233;r&#233; quelques jours pour &#233;crire des pages d'une documentation technique, peu de temps apr&#232;s la sortie de SPIP 2.0. Il y avait des trous b&#233;ants sur des absences de documentation de certaines fonctionnalit&#233;s qu'il &#233;tait int&#233;ressant de combler.&lt;/p&gt; &lt;p&gt;Puisque mon &#233;diteur de texte favori est l'interface priv&#233;e de SPIP, j'ai commenc&#233; une s&#233;rie d'articles en local, sous SPIP. Je les voulais coh&#233;rents, se suivant logiquement, courts pour mettre peu d'id&#233;es sur une m&#234;me page et ne pas effrayer le lecteur de la quantit&#233; de texte &#224; lire, et actualis&#233;s pour la derni&#232;re version de SPIP.&lt;/p&gt; &lt;p&gt;Un squelette SPIP pour lire plus agr&#233;ablement cette suite d'articles et de rubriques a &#233;t&#233; &#233;labor&#233; dans le m&#234;me temps, rendant la navigation plus agr&#233;able. Puis le tout a &#233;t&#233; mis en ligne d&#233;but 2009 (je ne me rappelle plus pr&#233;cis&#233;ment).&lt;/p&gt; &lt;p&gt;Au fil des jours, sur mon temps libre, je compl&#233;tais ces premi&#232;res pages par d'autres, puis par d'autres encore. Un nom de domaine fut alors attribu&#233; au projet : programmer.spip.org ... L'id&#233;e germait de non seulement avoir en ligne &#171; comme &#187; un livre, mais d'un jour aussi r&#233;ussir &#224; en proposer une v&#233;ritable version papier.&lt;/p&gt; &lt;h3 class='h3 spip'&gt;Technique autant que r&#233;dactionnel&lt;/h3&gt;
&lt;p&gt;Ce qu'il est difficile d'imaginer en parcourant les 338 pages de l'exemplaire sp&#233;cial &#171; Troglo SPIP &#187; que j'ai sous les yeux, c'est que sa cr&#233;ation a n&#233;cessit&#233; presque autant de temps pour la technique sur le site et pour g&#233;n&#233;rer le livre que pour l'&#233;criture en elle-m&#234;me. Au fil de la progression du site, de nouvelles contraintes &#224; r&#233;soudre apparaissent.&lt;/p&gt; &lt;p&gt;C'est d'abord un niveau de sous-rubriques &#224; prendre en compte en plus, c'est une meilleure lisibilit&#233; par l&#224;, c'est de l'AJAX &#224; mettre ici pour &#233;viter des pages trop volumineuses, c'est d'installer un syst&#232;me pour que les visiteurs puissent proposer des am&#233;liorations, c'est g&#233;rer les balises &lt;code class='spip_code' dir='ltr'&gt;&lt;multi&gt;&lt;/code&gt; sur 2 langues et quelques dizaines de rubriques lorsque des traducteurs anglais investissent l'espace &#233;ditorial... puis il y a trop de rubriques et cela devient invivable alors c'est encore mettre un niveau de sous-rubriques en plus pour g&#233;rer les langues, puis c'est permettre de d&#233;clarer des traductions entre rubriques via un plugin (tradrub), puis c'est fournir des outils aux traducteurs pour suivre les modifications un rien plus simplement (tradsync), en m&#234;me temps, c'est ajouter des mots cl&#233;s pour que le livre puisse g&#233;n&#233;rer un glossaire, c'est cr&#233;er les outils pour exporter le contenu entier du site, et exporter le r&#233;sultat dans un format PDF convenable (via PrinceXML), et adapter la CSS d'impression pour rendre les textes encore plus contrast&#233;s que sur l'&#233;cran, et patati... et patata... et j'en passe et des meilleures.&lt;/p&gt; &lt;p&gt;Tout cela aurait certainement &#233;t&#233; plus facile en &#233;crivant directement dans OpenOffice ou dans un logiciel sp&#233;cialis&#233;. Mais.&lt;/p&gt; &lt;h3 class='h3 spip'&gt; De la relecture aux traductions &lt;/h3&gt;
&lt;p&gt;Mais l'immense avantage d'une interface de r&#233;daction collaborative en ligne, telle que celle de SPIP, c'est de permettre &#224; tous les visiteurs de participer, tant sur la r&#233;daction d'articles que sur les relectures.&lt;/p&gt; &lt;p&gt;Et heureusement ! Combien de fautes ou de tournures de phrases lourdes, ou d'id&#233;es mal exprim&#233;es ont pu &#234;tre corrig&#233;es gr&#226;ce &#224; la vigilance et &#224; la participation des diff&#233;rents lecteurs. Elles furent nombreuses ; nul n'est &#224; l'abri d'un coup de fatigue :). Il y a un regard multiple sur le contenu et c'est en cela que c'est tr&#232;s int&#233;ressant : apporter ce que l'on peut, ou m&#234;me dire &#171; je ne comprends pas &#187; permet d'am&#233;liorer au final l'ensemble du livre.&lt;/p&gt; &lt;p&gt;Ma plus grande surprise, peut-&#234;tre, dans cette histoire, est l'arriv&#233;e spontan&#233;e de traducteurs. Une envie de faire d&#233;couvrir la technique de SPIP par del&#224; les fronti&#232;res. Nous avons volontairement brid&#233; les tentations dans un premier temps, puis autoris&#233; les traductions en une premi&#232;re langue, l'anglais, pour tester le fonctionnement des squelettes (&#231;a a n&#233;cessit&#233; diverses exp&#233;rimentations), puis le multilinguisme semblant fonctionner, nous avons ouvert r&#233;cemment la porte &#224; une seconde langue, l'espagnol.&lt;/p&gt; &lt;p&gt;Passer d'un site monolingue &#224; un site multilingue implique des choix techniques qui ne sont pas &#233;vidents &#224; trancher. Je suis encore &#224; l'heure actuelle tr&#232;s sceptique sur certaines difficult&#233;s tel que &#171; comment traduire un mot cl&#233; ? &#187;. Pour l'instant &#231;a fait des titres avec des balises &lt;code class='spip_code' dir='ltr'&gt;&lt;multi&gt;&lt;/code&gt; contenant 3 langues... mais cela va vite &#234;tre difficile s'il y a 8 langues &#224; g&#233;rer... On a &#233;vacu&#233; tr&#232;s fi&#232;rement ce probl&#232;me avec les rubriques en cr&#233;ant [&lt;a href='#nb1' class='spip_note' rel='footnote' title='enfin en le mettant &#224; jour &#171; from scratch &#187;' id='nh1'&gt;1&lt;/a&gt;] un plugin (tradrub) permettant de cr&#233;er et g&#233;rer des traductions entre rubriques. Mais il reste ces maux, ou mots... Affaire &#224; suivre de ce c&#244;t&#233;. Mais revenons aux traducteurs...&lt;/p&gt; &lt;p&gt;En anglais, au d&#233;but est arriv&#233; Gilles, puis Thomas qui ont tranquillement r&#233;alis&#233; plus de 40 traductions. Et un jour Mark Baber a d&#233;barqu&#233; ! Et... quelques semaines plus tard tout &#233;tait traduit en anglais. C'est quelque chose de fabuleux. Quelques relecteurs attentifs comme Paolo &#233;liminent les derniers coquilles anglaises et on se retrouve &#224; tr&#232;s prochainement proposer la premi&#232;re, toute premi&#232;re &#233;dition d'un livre SPIP dans une autre langue que le fran&#231;ais.&lt;/p&gt; &lt;p&gt;C'est l&#224;, &#224; ce moment l&#224;, qu'on s'aper&#231;oit de la force d'une communaut&#233; multilingue et d'un logiciel SPIP parfaitement adapt&#233; &#224; presque toutes les probl&#233;matiques de traduction.&lt;/p&gt; &lt;h3 class='h3 spip'&gt;D'un fichier pdf &#224; un livre&lt;/h3&gt;
&lt;p&gt;R&#233;aliser un livre lorsque l'on a qu'une page HTML &#224; la base semble un rien difficile. Les imprimeurs &#224; la demande, qui sont vraiment tr&#232;s adapt&#233;s pour de petites s&#233;ries de livres, r&#233;alisent des impressions num&#233;riques &#224; partir de fichiers au format PDF. L'enjeu consiste donc &#224; transformer un contenu au format HTML en un contenu au format PDF mis en page. Cela semble tr&#232;s simple au premier abord.&lt;/p&gt; &lt;p&gt;On peut avoir comme id&#233;e de g&#233;n&#233;rer une page HTML et de l'importer dans OpenOffice (ou de le g&#233;n&#233;rer directement en .odt avec le plugin SPIP adapt&#233;), d'ins&#233;rer table des mati&#232;res et pieds de page, puis d'enregistrer le tout en PDF. Oui... mais... Voici quelques probl&#232;mes rencontr&#233;s : comment g&#233;rer les renvois et afficher sur les liens internes au document les num&#233;ros de pages auxquels ils correspondent ? comment faire prendre en compte la coloration syntaxique des codes HTML sans que cela fasse une liste extr&#234;mement vilaine de morceaux de mots ? comment g&#233;n&#233;rer automatiquement des sections (au sens OpenOffice) &#224; partir du HTML pour que le titre des chapitres apparaisse bien dans l'ent&#234;te de toutes les pages du chapitre concern&#233; ? Au bout du compte on remarque qu'on ne maitrise pas assez OOo pour cela.&lt;/p&gt; &lt;p&gt;Une autre id&#233;e, est d'utiliser les comp&#233;tences de CSS3. Car CSS3 est en outre pr&#233;vu pour g&#233;rer des impressions papiers. On donne le format, on cr&#233;e des types de pages, indique quel texte placer dans l'ent&#234;te, on peut aussi ajouter des renvois vers les num&#233;ros de page correspondant sur les liens internes... C'est extr&#234;mement puissant.&lt;/p&gt; &lt;p&gt;Mais voil&#224;... Qui g&#232;re ces propri&#233;t&#233;s de CSS3 suffisamment correctement ? aucun navigateur ! Ils en connaissent quelques-unes, comme la prise en compte des sauts de page souvent, mais pas toutes. Peu se d&#233;brouillent avec les marges, les formats du papier, les ent&#234;tes et pieds de page comme il faut.&lt;/p&gt; &lt;p&gt;Je n'ai crois&#233; &#224; ce jour qu'un seul logiciel capable de prendre en entr&#233;e un fichier HTML, de r&#233;cup&#233;rer sa CSS3, et de g&#233;n&#233;rer le PDF attendu. C'est PrinceXML, logiciel qui n'est malheureusement pas libre, mais dont l'usage sur une machine locale est autoris&#233;e, du moins pour la version 7.0 que j'utilise, mais je vois aujourd'hui qu'ils ont sorti ce mois-ci une version 7.1 et que la licence me semble diff&#233;rente de ce qu'elle &#233;tait en restreignant bien plus l'usage de la version gratuite... C'est tr&#232;s ennuyant ! Bref, &#231;a serait bien de trouver ou cr&#233;er une alternative libre ! Ou utiliser d'autres m&#233;caniques, quitte &#224; se passer de la coloration syntaxique...&lt;/p&gt; &lt;h3 class='h3 spip'&gt;Des d&#233;ceptions... &lt;/h3&gt;
&lt;p&gt;Outre la difficult&#233; de mise en &#339;uvre technique &#8211; mais j'aime ces d&#233;fis &#8211; c'est l'organisation et la coh&#233;rence des chapitres que je trouve complexe &#224; trouver. J'avais lanc&#233; sur la liste de discussion spip-devel un sujet, en demandant &#171; s'il existait un livre sur la programmation avec SPIP, quelle serait sa table des mati&#232;res id&#233;ale &#187;. J'ai &#233;t&#233; finalement d&#233;&#231;u par le peu de r&#233;ponses apport&#233;es ou qui disaient que l'organisation du site &#233;tait d&#233;j&#224; tr&#232;s bien comme &#231;a. J'imaginais qu'&#224; plusieurs on arriverait &#224; trouver un chapitrage qui me/nous conviendrait et ce ne fut pas vraiment le cas. Du coup, je ne suis pas sp&#233;cialement satisfait de l'ordre des chapitres de cette version 1, de leur enchev&#234;trement. Cela manque, je trouve, de fil conducteur, de lien.&lt;/p&gt; &lt;p&gt;L'autre &#233;l&#233;ment d'insatisfaction c'est que cette version sort alors que j'ai le sentiment de n'avoir pas tout dit, qu'il reste plein de zones d'ombres, que certaines parties ne sont pas claires ou &#224; r&#233;&#233;crire, qu'il y a des absences, des chapitres commenc&#233;s mais pas finis comme &#171; d&#233;velopper des plugins &#187; o&#249; l'on a de quoi rester sur sa faim.&lt;/p&gt; &lt;p&gt;Je suis triste de cela, et en m&#234;me temps, je pense que je n'arriverai jamais &#224; &#234;tre 100% satisfait. Ce livre est une photo du site &#224; un instant &lt;i&gt;t&lt;/i&gt; et &#224; cet instant l&#224;, des parties sont excellentes et d'autres &#224; terminer, mais c'est toujours mieux que s'il n'y avait rien. Il faut savoir &#224; un moment dire (merci BennyB) : &#171; bon, on y va ? &#187;&lt;/p&gt; &lt;h3 class='h3 spip'&gt;... aux perspectives&lt;/h3&gt;
&lt;p&gt;L'avenir est soumis &#224; bien des incertitudes. D&#233;j&#224; : ce livre va-t-il plaire ? &#233;tait-il attendu ? sera-t-il utilis&#233; ? Nous verrons les retours dans quelques temps... Mais d&#233;j&#224; nous avons r&#233;ussi un beau d&#233;fi : oui, on peut r&#233;aliser un livre libre, r&#233;dig&#233; partiellement de mani&#232;re collaborative, proposer &#224; tous le pdf, le faire imprimer et le commercialiser. Cela marche. M&#234;me pour les traductions. On peut donc imaginer de nouveaux d&#233;fis, d'autres perspectives :&lt;/p&gt; &lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; sortir une version anglaise (99,9% est d&#233;j&#224; traduit)&lt;/li&gt;&lt;li&gt; sortir une version espagnole (13% traduit) : souhaitons courage aux hispanophones et &#224; Sylvano qui a d&#233;marr&#233; sur les chapeaux de roues !&lt;/li&gt;&lt;li&gt; ajouter pour la prochaine version des divertissements, par des illustrations ou strips horizontaux, pour all&#233;ger le c&#244;t&#233; tr&#232;s formel du texte&lt;/li&gt;&lt;li&gt; cr&#233;er une trilogie &#171; Publier | Personnaliser | Programmer &#187; ou encore &#171; Utiliser | Cr&#233;er son site | Programmer &#187;, bref, quelque chose par type d'utilisateurs : du r&#233;dacteur/administrateur/traducteur, puis le bidouilleur/installateur/webmestre , et enfin pour les webmestres qui triturent les codes et autres d&#233;veloppeurs...&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&#192; vous aussi, lecteurs, de proposer des am&#233;liorations. Ne pas oublier qu'il y a des tas de mani&#232;res de participer &#224; son &#233;chelle sur la galaxie SPIP, entre l'organisation d'&#233;v&#232;nements locaux, les traductions, les retours d'exp&#233;rience, les rapports de bugs, les contributions sur les forums, les encouragements verbaux, de l'&#233;criture de documentation, de contributions. Partage et ouverture. Ah, et si possible avec un peu de tendresse :)&lt;/p&gt; &lt;dl class='spip_document_250 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;a href=&quot;http://www.lulu.com/product/item/programmer-avec-spip/11019986&quot; class=&quot;spip_out&quot; title='JPEG - 14.6 ko'&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L224xH320/320_7975571-04e4b.jpg' width='224' height='320' alt='JPEG - 14.6 ko' style='height:320px;width:224px;' /&gt;&lt;/a&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-250 spip_doc_titre' style='width:224px;'&gt;&lt;strong&gt;Couverture du livre &#171;Programmer avec SPIP&#187;&lt;/strong&gt;&lt;/dt&gt;
&lt;dd class='crayon document-descriptif-250 spip_doc_descriptif' style='width:224px;'&gt;Premi&#232;re version officiellement en vente, l' &#171; &#201;dition Troglo2 &#187; de mai 2010.
&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
		&lt;hr /&gt;
		&lt;div class='rss_notes'&gt;&lt;p&gt;[&lt;a href='#nh1' id='nb1' class='spip_note' title='Notes 1' rev='footnote'&gt;1&lt;/a&gt;] enfin en le mettant &#224; jour &#171; from scratch &#187;&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_ps'&gt;&lt;p&gt;J'en profite pour dire un GRAND MERCI &#224; tous ceux qui de pr&#232;s ou de loin ont apport&#233; leur pierre, leur regard, leur savoir, leur temps pour le site Programmer.spip.org ou pour le livre. Il y a de beaux et braves gens derri&#232;re tous ces textes et codes informatiques. Les &lt;a href='http://spip-party.net/Troglo-2010' class='spip_out' rel='external'&gt;Troglos2&lt;/a&gt; pour ceux qui ont pu s'y d&#233;placer, est un excellent &#233;v&#232;nement qui soude, motive, donne du soleil, et je suis heureux d'avoir crois&#233; certains d'entre vous &#224; cette occasion.&lt;/p&gt;&lt;/div&gt;
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>Cr&#233;er un nouvel objet &#233;ditorial</title>
		<link>http://marcimat.magraine.net/Creer-un-nouvel-objet-editorial</link>
		<guid isPermaLink="true">http://marcimat.magraine.net/Creer-un-nouvel-objet-editorial</guid>
		<dc:date>2009-10-20T19:47:38Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>Matthieu Marcillaud</dc:creator>



		<description>
&lt;p&gt;Nous allons &#233;tudier comment cr&#233;er un nouvel objet &#233;ditorial tr&#232;s simple et sans relation, pour SPIP 2.0. De ces explications vont na&#238;tre un petit plugin d'exemple. Mais le tout fait appel &#224; un grand nombre de fonctions de SPIP et n'est pas &#233;vident &#224; mettre en &#339;uvre. Nous en profitons pour relever un d&#233;fi : aucun affichage g&#233;r&#233; en PHP, mais tout en squelette SPIP. Nous allons d&#233;finir un nouvel objet SPIP. Cet objet sera un &#171; chat &#187; ! Pourquoi pas ? Nous allons voir dans un premier temps comment cr&#233;er la (...)&lt;/p&gt;


-
&lt;a href="http://marcimat.magraine.net/-Semences-SPIP-" rel="directory"&gt;Semences SPIP&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_chapo'&gt;&lt;p&gt;Nous allons &#233;tudier comment cr&#233;er un nouvel objet &#233;ditorial tr&#232;s simple et sans relation, pour SPIP 2.0. De ces explications vont na&#238;tre un petit plugin d'exemple. Mais le tout fait appel &#224; un grand nombre de fonctions de SPIP et n'est pas &#233;vident &#224; mettre en &#339;uvre. Nous en profitons pour relever un d&#233;fi : aucun affichage g&#233;r&#233; en PHP, mais tout en squelette SPIP.&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;p&gt;Nous allons d&#233;finir un nouvel objet SPIP. Cet objet sera un &#171; chat &#187; ! Pourquoi pas ? Nous allons voir dans un premier temps comment cr&#233;er la table SQL correspondante et donner un exemple de mise &#224; jour. Nous d&#233;crirons ensuite la cr&#233;ation d'une page de visualisation des chats, celle pour &#233;diter un chat existant, et le formulaire CVT qui correspond. Enfin, nous ajouterons une action pour pouvoir supprimer un chat ! Et que la SPA ne m'en veuille pas trop, ce n'est qu'un exemple ! Et pour terminer, nous verrons comment interfacer le plugin &#171; Champs Extras 2 &#187; sur le nouvel objet !&lt;/p&gt; &lt;h3 class='h3 spip'&gt;Cr&#233;ation du plugin&lt;/h3&gt;
&lt;p&gt;On commence par un fichier &lt;code class='spip_code' dir='ltr'&gt;plugin.xml&lt;/code&gt; rudimentaire. On d&#233;clare dedans cependant une information qui peut &#234;tre utile : 1 d&#233;pendance, &#224; SPIP 2.&lt;/p&gt; &lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.xml .imp {font-weight: bold; color: red;}
.xml .es0 {color: #000099; font-weight: bold;}
.xml .br0 {color: #66cc66;}
.xml .sy0 {color: #66cc66;}
.xml .st0 {color: #ff0000;}
.xml .sc-1 {color: #808080; font-style: italic;}
.xml .sc0 {color: #00bbdd;}
.xml .sc1 {color: #ddbb00;}
.xml .sc2 {color: #339933;}
.xml .sc3 {color: #009900;}
.xml .re0 {color: #000066;}
.xml .re1 {color: #000000; font-weight: bold;}
.xml .re2 {color: #000000; font-weight: bold;}
.xml span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_xml cadre&quot;&gt;&lt;div class=&quot;xml&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;plugin&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;nom&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Chats (plugin d'exemple)&lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;/nom&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;auteur&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Matthieu Marcillaud&lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;/auteur&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;version&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;1.0&lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;/version&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;etat&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;stable&lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;/etat&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;description&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; Ce plugin est un exemple de cr&lt;span class=&quot;sc1&quot;&gt;&amp;eacute;&lt;/span&gt;ation&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; d'un nouvel objet &lt;span class=&quot;sc1&quot;&gt;&amp;eacute;&lt;/span&gt;ditorial dans SPIP&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;/description&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;lien&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;http://marcimat.magraine.net/?article344&lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;/lien&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;icon&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;images/chat-128.png&lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;/icon&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;prefix&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;chats&lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;/prefix&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;necessite&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;id&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&quot;SPIP&quot;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;version&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;&quot;[2.0.9;]&quot;&lt;/span&gt; &lt;span class=&quot;re2&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;/plugin&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/cfb74d9b9f7ed0e66b01fd96f250ef5a.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Nous cr&#233;ons un premier dossier &lt;code class='spip_code' dir='ltr'&gt;images&lt;/code&gt; pour stocker les images relatives au plugin, et un dossier &lt;code class='spip_code' dir='ltr'&gt;lang&lt;/code&gt; pour stocker les traductions, avec un premier fichier dedans &lt;code class='spip_code' dir='ltr'&gt;chats_fr.php&lt;/code&gt; contenant quelques premiers mots :&lt;/p&gt;
&lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.php .imp {font-weight: bold; color: red;}
.php .kw1 {color: #b1b100;}
.php .kw2 {color: #000000; font-weight: bold;}
.php .kw3 {color: #990000;}
.php .kw4 {color: #009900; font-weight: bold;}
.php .co1 {color: #666666; font-style: italic;}
.php .co2 {color: #666666; font-style: italic;}
.php .co3 {color: #0000cc; font-style: italic;}
.php .co4 {color: #009933; font-style: italic;}
.php .coMULTI {color: #666666; font-style: italic;}
.php .es0 {color: #000099; font-weight: bold;}
.php .es1 {color: #000099; font-weight: bold;}
.php .es2 {color: #660099; font-weight: bold;}
.php .es3 {color: #660099; font-weight: bold;}
.php .es4 {color: #006699; font-weight: bold;}
.php .es5 {color: #006699; font-weight: bold; font-style: italic;}
.php .es6 {color: #009933; font-weight: bold;}
.php .es_h {color: #000099; font-weight: bold;}
.php .br0 {color: #009900;}
.php .sy0 {color: #339933;}
.php .sy1 {color: #000000; font-weight: bold;}
.php .st0 {color: #0000ff;}
.php .st_h {color: #0000ff;}
.php .nu0 {color: #cc66cc;}
.php .nu8 {color: #208080;}
.php .nu12 {color: #208080;}
.php .nu19 {color:#800080;}
.php .me1 {color: #004000;}
.php .me2 {color: #004000;}
.php .re0 {color: #000088;}
.php span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;div class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;&lt;?php&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;co1&quot;&gt;// This is a SPIP language file -- Ceci est un fichier langue de SPIP&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/defined&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;defined&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&quot;_ECRIRE_INC_VERSION&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$GLOBALS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$GLOBALS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'idx_lang'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;co1&quot;&gt;// C&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;st_h&quot;&gt;'chats'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'Chats'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;sy1&quot;&gt;?&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/5a7dbd82afc6691281a0c780daa306fb.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;h3 class='h3 spip'&gt;D&#233;claration de la table spip_chats&lt;/h3&gt;
&lt;p&gt;Nous allons d&#233;clarer une table tr&#232;s simple &#171; spip_chats &#187; contenant les champs :&lt;/p&gt; &lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; id_chat&lt;/li&gt;&lt;li&gt; race&lt;/li&gt;&lt;li&gt; nom&lt;/li&gt;&lt;li&gt; age&lt;/li&gt;&lt;li&gt; maj (mise &#224; jour)&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Pour cela nous devons utiliser des pipelines adapt&#233;s : &lt;code class='spip_code' dir='ltr'&gt;declarer_tables_principales&lt;/code&gt; et &lt;code class='spip_code' dir='ltr'&gt;declarer_tables_interfaces&lt;/code&gt;. Nous ajoutons donc leur appel dans le fichier &lt;code class='spip_code' dir='ltr'&gt;plugin.xml&lt;/code&gt; :&lt;/p&gt;
&lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.xml .imp {font-weight: bold; color: red;}
.xml .es0 {color: #000099; font-weight: bold;}
.xml .br0 {color: #66cc66;}
.xml .sy0 {color: #66cc66;}
.xml .st0 {color: #ff0000;}
.xml .sc-1 {color: #808080; font-style: italic;}
.xml .sc0 {color: #00bbdd;}
.xml .sc1 {color: #ddbb00;}
.xml .sc2 {color: #339933;}
.xml .sc3 {color: #009900;}
.xml .re0 {color: #000066;}
.xml .re1 {color: #000000; font-weight: bold;}
.xml .re2 {color: #000000; font-weight: bold;}
.xml span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_xml cadre&quot;&gt;&lt;div class=&quot;xml&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;pipeline&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;nom&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;declarer_tables_interfaces&lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;/nom&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;inclure&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;base/chats.php&lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;/inclure&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;/pipeline&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;pipeline&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;nom&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;declarer_tables_principales&lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;/nom&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;inclure&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;base/chats.php&lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;/inclure&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;/pipeline&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/2eafcb2ea65230bf5367da37c1a3ba02.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Nous cr&#233;ons alors le fichier &lt;code class='spip_code' dir='ltr'&gt;base/chats.php&lt;/code&gt; contenant les fonctions qui seront appel&#233;s par les pipelines en question. Voici son contenu. La premi&#232;re fonction &lt;code class='spip_code' dir='ltr'&gt;chats_declarer_tables_interfaces&lt;/code&gt; indique que l'on peut utiliser le raccourcis &#171; CHATS &#187; comme table de boucle SPIP et que la balise &lt;code class='spip_code' dir='ltr'&gt;#RACE&lt;/code&gt; re&#231;oit par d&#233;faut des traitements typographiques. La seconde fonction &lt;code class='spip_code' dir='ltr'&gt;chats_declarer_tables_principales&lt;/code&gt; d&#233;clare la table &#171; spip_chats &#187; et ses champs SQL associ&#233;s.&lt;/p&gt; &lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.php .imp {font-weight: bold; color: red;}
.php .kw1 {color: #b1b100;}
.php .kw2 {color: #000000; font-weight: bold;}
.php .kw3 {color: #990000;}
.php .kw4 {color: #009900; font-weight: bold;}
.php .co1 {color: #666666; font-style: italic;}
.php .co2 {color: #666666; font-style: italic;}
.php .co3 {color: #0000cc; font-style: italic;}
.php .co4 {color: #009933; font-style: italic;}
.php .coMULTI {color: #666666; font-style: italic;}
.php .es0 {color: #000099; font-weight: bold;}
.php .es1 {color: #000099; font-weight: bold;}
.php .es2 {color: #660099; font-weight: bold;}
.php .es3 {color: #660099; font-weight: bold;}
.php .es4 {color: #006699; font-weight: bold;}
.php .es5 {color: #006699; font-weight: bold; font-style: italic;}
.php .es6 {color: #009933; font-weight: bold;}
.php .es_h {color: #000099; font-weight: bold;}
.php .br0 {color: #009900;}
.php .sy0 {color: #339933;}
.php .sy1 {color: #000000; font-weight: bold;}
.php .st0 {color: #0000ff;}
.php .st_h {color: #0000ff;}
.php .nu0 {color: #cc66cc;}
.php .nu8 {color: #208080;}
.php .nu12 {color: #208080;}
.php .nu19 {color:#800080;}
.php .me1 {color: #004000;}
.php .me2 {color: #004000;}
.php .re0 {color: #000088;}
.php span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;div class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;&lt;?php&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; chats_declarer_tables_interfaces&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$interface&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$interface&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'table_des_tables'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'chats'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'chats'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$interface&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'table_des_traitements'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'RACE'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'chats'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; _TRAITEMENT_TYPO&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$interface&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; chats_declarer_tables_principales&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$tables_principales&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;co1&quot;&gt;//-- Table CHATS ------------------------------------------&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$chats&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;st0&quot;&gt;&quot;id_chat&quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&quot;bigint(21) NOT NULL&quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;st0&quot;&gt;&quot;race&quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&quot;tinytext DEFAULT '' NOT NULL&quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;st0&quot;&gt;&quot;nom&quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&quot;tinytext DEFAULT '' NOT NULL&quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;st0&quot;&gt;&quot;annee_naissance&quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&quot;int(4) DEFAULT '0' NOT NULL&quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;st0&quot;&gt;&quot;maj&quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&quot;TIMESTAMP&quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$chats_key&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;st0&quot;&gt;&quot;PRIMARY KEY&quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&quot;id_chat&quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$tables_principales&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'spip_chats'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'field'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$chats&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'key'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;&amp;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$chats_key&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$tables_principales&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;sy1&quot;&gt;?&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/a37ee8836d088abc6cc5b2a04f48a9a7.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;h3 class='h3 spip'&gt;Installation/d&#233;sinstallation de la table spip_chats&lt;/h3&gt;
&lt;p&gt;Pour g&#233;rer l'installation et la d&#233;sinstallation, il faut indiquer un num&#233;ro de version des informations SQL du plugin ainsi qu'un fichier d'installation dans &lt;code class='spip_code' dir='ltr'&gt;plugin.xml&lt;/code&gt; :&lt;/p&gt; &lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.xml .imp {font-weight: bold; color: red;}
.xml .es0 {color: #000099; font-weight: bold;}
.xml .br0 {color: #66cc66;}
.xml .sy0 {color: #66cc66;}
.xml .st0 {color: #ff0000;}
.xml .sc-1 {color: #808080; font-style: italic;}
.xml .sc0 {color: #00bbdd;}
.xml .sc1 {color: #ddbb00;}
.xml .sc2 {color: #339933;}
.xml .sc3 {color: #009900;}
.xml .re0 {color: #000066;}
.xml .re1 {color: #000000; font-weight: bold;}
.xml .re2 {color: #000000; font-weight: bold;}
.xml span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_xml cadre&quot;&gt;&lt;div class=&quot;xml&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;version_base&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;1.0&lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;/version_base&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;install&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;base/chats_upgrade.php&lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;/install&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/9723d2be4811d6f7b645f17e58c3a512.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Ce fichier &lt;code class='spip_code' dir='ltr'&gt;base/chats_upgrade.php&lt;/code&gt; contient deux fonctions :&lt;/p&gt; &lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; &lt;code class='spip_code' dir='ltr'&gt;chats_upgrade&lt;/code&gt; sert &#224; l'installation et aux mises &#224; jour. Ici, &#224; la premi&#232;re activation du plugin, &lt;code class='spip_code' dir='ltr'&gt;$current_version&lt;/code&gt; vaut encore &quot;0.0&quot; et la fonction creer_base() est execut&#233;e. Cette fonction cr&#233;e les tables SQL d&#233;clar&#233;es &#224; SPIP mais absentes de la base de donn&#233;e. Par cons&#233;quent, la table &lt;code class='spip_code' dir='ltr'&gt;spip_chats&lt;/code&gt; sera cr&#233;&#233;e ;&lt;/li&gt;&lt;li&gt; &lt;code class='spip_code' dir='ltr'&gt;chats_vider_tables&lt;/code&gt; sert pour la d&#233;sinstallation. Elle supprime simplement la table SQL &lt;code class='spip_code' dir='ltr'&gt;spip_chats&lt;/code&gt; ainsi que la variable meta contenant le num&#233;ro de version SQL install&#233; du plugin.&lt;/li&gt;&lt;/ul&gt;
&lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.php .imp {font-weight: bold; color: red;}
.php .kw1 {color: #b1b100;}
.php .kw2 {color: #000000; font-weight: bold;}
.php .kw3 {color: #990000;}
.php .kw4 {color: #009900; font-weight: bold;}
.php .co1 {color: #666666; font-style: italic;}
.php .co2 {color: #666666; font-style: italic;}
.php .co3 {color: #0000cc; font-style: italic;}
.php .co4 {color: #009933; font-style: italic;}
.php .coMULTI {color: #666666; font-style: italic;}
.php .es0 {color: #000099; font-weight: bold;}
.php .es1 {color: #000099; font-weight: bold;}
.php .es2 {color: #660099; font-weight: bold;}
.php .es3 {color: #660099; font-weight: bold;}
.php .es4 {color: #006699; font-weight: bold;}
.php .es5 {color: #006699; font-weight: bold; font-style: italic;}
.php .es6 {color: #009933; font-weight: bold;}
.php .es_h {color: #000099; font-weight: bold;}
.php .br0 {color: #009900;}
.php .sy0 {color: #339933;}
.php .sy1 {color: #000000; font-weight: bold;}
.php .st0 {color: #0000ff;}
.php .st_h {color: #0000ff;}
.php .nu0 {color: #cc66cc;}
.php .nu8 {color: #208080;}
.php .nu12 {color: #208080;}
.php .nu19 {color:#800080;}
.php .me1 {color: #004000;}
.php .me2 {color: #004000;}
.php .re0 {color: #000088;}
.php span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;div class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;&lt;?php&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;include_spip&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'inc/meta'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;include_spip&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'base/create'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; chats_upgrade&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$nom_meta_base_version&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$version_cible&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$current_version&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&quot;0.0&quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/isset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$GLOBALS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'meta'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$nom_meta_base_version&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$current_version&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$GLOBALS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'meta'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$nom_meta_base_version&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$current_version&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&quot;0.0&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; creer_base&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; ecrire_meta&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$nom_meta_base_version&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$current_version&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$version_cible&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; chats_vider_tables&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$nom_meta_base_version&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; sql_drop_table&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&quot;spip_chats&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; effacer_meta&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$nom_meta_base_version&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;sy1&quot;&gt;?&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/a0126e35a1b7a2ac3ba592f4cbec2208.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;h3 class='h3 spip'&gt;Mise &#224; jour de la table&lt;/h3&gt;
&lt;p&gt;Mince ! Nous avons oubli&#233; les champs &#171; robe &#187; et &#171; infos &#187; ! Mettons &#224; jour le plugin :&lt;/p&gt; &lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; on ajoute la d&#233;claration des champs dans &lt;code class='spip_code' dir='ltr'&gt;base/chats.php&lt;/code&gt; (&lt;code class='spip_code' dir='ltr'&gt;&quot;robe&quot; =&gt; &quot;tinytext DEFAULT '' NOT NULL&quot;,&lt;/code&gt; et &lt;code class='spip_code' dir='ltr'&gt;&quot;infos&quot; =&gt; &quot;text DEFAULT '' NOT NULL&quot;,&lt;/code&gt; au dessus de &#171; maj &#187;) ;&lt;/li&gt;&lt;li&gt; on modifie la version SQL du plugin dans &lt;code class='spip_code' dir='ltr'&gt;plugin.xml&lt;/code&gt; (&lt;code class='spip_code' dir='ltr'&gt;&lt;version_base&gt;1.1&lt;/version_base&gt;&lt;/code&gt;) ;&lt;/li&gt;&lt;li&gt; on cr&#233;e une mise &#224; jour dans la fonction &lt;code class='spip_code' dir='ltr'&gt;chats_upgrade()&lt;/code&gt; de &lt;code class='spip_code' dir='ltr'&gt;base/chats_upgrade.php&lt;/code&gt; qui devient :&lt;/li&gt;&lt;/ul&gt;
&lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.php .imp {font-weight: bold; color: red;}
.php .kw1 {color: #b1b100;}
.php .kw2 {color: #000000; font-weight: bold;}
.php .kw3 {color: #990000;}
.php .kw4 {color: #009900; font-weight: bold;}
.php .co1 {color: #666666; font-style: italic;}
.php .co2 {color: #666666; font-style: italic;}
.php .co3 {color: #0000cc; font-style: italic;}
.php .co4 {color: #009933; font-style: italic;}
.php .coMULTI {color: #666666; font-style: italic;}
.php .es0 {color: #000099; font-weight: bold;}
.php .es1 {color: #000099; font-weight: bold;}
.php .es2 {color: #660099; font-weight: bold;}
.php .es3 {color: #660099; font-weight: bold;}
.php .es4 {color: #006699; font-weight: bold;}
.php .es5 {color: #006699; font-weight: bold; font-style: italic;}
.php .es6 {color: #009933; font-weight: bold;}
.php .es_h {color: #000099; font-weight: bold;}
.php .br0 {color: #009900;}
.php .sy0 {color: #339933;}
.php .sy1 {color: #000000; font-weight: bold;}
.php .st0 {color: #0000ff;}
.php .st_h {color: #0000ff;}
.php .nu0 {color: #cc66cc;}
.php .nu8 {color: #208080;}
.php .nu12 {color: #208080;}
.php .nu19 {color:#800080;}
.php .me1 {color: #004000;}
.php .me2 {color: #004000;}
.php .re0 {color: #000088;}
.php span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;div class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; chats_upgrade&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$nom_meta_base_version&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$version_cible&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$current_version&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&quot;0.0&quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$current_version&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&quot;0.0&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; creer_base&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; ecrire_meta&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$nom_meta_base_version&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$current_version&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$version_cible&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/version_compare&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;version_compare&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$current_version&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&quot;1.1&quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&quot;&lt;&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;co1&quot;&gt;// ajout du champ &quot;robe&quot; et &quot;infos&quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; maj_tables&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'spip_chats'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; ecrire_meta&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$nom_meta_base_version&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$current_version&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&quot;1.1&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/0bae3b53940537d0cba51d483466e6f6.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;On remarque que l'on teste si la version des tables SQL du plugin est inf&#233;rieur &#224; la nouvelle version renseign&#233;e dans &lt;code class='spip_code' dir='ltr'&gt;plugin.xml&lt;/code&gt;. Si c'est le cas, on lance la fonction &lt;code class='spip_code' dir='ltr'&gt;maj_tables('spip_chats')&lt;/code&gt; qui va cr&#233;er tous les champs manquant de la table d&#233;sign&#233;e. Cette fonction ne fait qu'ajouter des champs, en aucun cas elle ne supprime ou modifie des champs existants. Pour des op&#233;rations plus complexes, il faut utiliser les fonctions &lt;code class='spip_code' dir='ltr'&gt;sql_*&lt;/code&gt; adapt&#233;es, tel que &lt;code class='spip_code' dir='ltr'&gt;sql_alter()&lt;/code&gt;.&lt;/p&gt; &lt;h3 class='h3 spip'&gt;Cr&#233;ation du bouton pour acc&#233;der &#224; la liste des chats&lt;/h3&gt;
&lt;p&gt;Commen&#231;ons par cr&#233;er un bouton dans le menu d'&#233;dition pour amener &#224; la page qui listera les chats. On ajoute au &lt;code class='spip_code' dir='ltr'&gt;plugin.xml&lt;/code&gt; la d&#233;claration suivante d'un bouton, ainsi que l'usage du pipelines d'autorisations :&lt;/p&gt;
&lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.xml .imp {font-weight: bold; color: red;}
.xml .es0 {color: #000099; font-weight: bold;}
.xml .br0 {color: #66cc66;}
.xml .sy0 {color: #66cc66;}
.xml .st0 {color: #ff0000;}
.xml .sc-1 {color: #808080; font-style: italic;}
.xml .sc0 {color: #00bbdd;}
.xml .sc1 {color: #ddbb00;}
.xml .sc2 {color: #339933;}
.xml .sc3 {color: #009900;}
.xml .re0 {color: #000066;}
.xml .re1 {color: #000000; font-weight: bold;}
.xml .re2 {color: #000000; font-weight: bold;}
.xml span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_xml cadre&quot;&gt;&lt;div class=&quot;xml&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;bouton&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;id&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;'chats'&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;parent&lt;/span&gt;=&lt;span class=&quot;st0&quot;&gt;'naviguer'&lt;/span&gt;&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;icone&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;images/chat-24.png&lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;/icone&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;titre&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;chats:chats&lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;/titre&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;/bouton&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;pipeline&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;nom&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;autoriser&lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;/nom&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;inclure&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;chats_autorisations.php&lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;/inclure&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;/pipeline&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/097c85a32d4afb5e3bd212309a2e78c6.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Le bouton indique que l'on cr&#233;e un lien vers la page &lt;code class='spip_code' dir='ltr'&gt;?exec=chats&lt;/code&gt; (indiqu&#233;e par l'attribut &lt;code class='spip_code' dir='ltr'&gt;id&lt;/code&gt;) dans le menu &#171; &#201;dition &#187; de SPIP. A chaque bouton est associ&#233; une autorisation de le voir. Nous cr&#233;ons donc le fichier &lt;code class='spip_code' dir='ltr'&gt;chats_autorisations.php&lt;/code&gt; pour d&#233;clarer cette fonction (&lt;code class='spip_code' dir='ltr'&gt;autoriser_chats_bouton_dist&lt;/code&gt;) :&lt;/p&gt;
&lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.php .imp {font-weight: bold; color: red;}
.php .kw1 {color: #b1b100;}
.php .kw2 {color: #000000; font-weight: bold;}
.php .kw3 {color: #990000;}
.php .kw4 {color: #009900; font-weight: bold;}
.php .co1 {color: #666666; font-style: italic;}
.php .co2 {color: #666666; font-style: italic;}
.php .co3 {color: #0000cc; font-style: italic;}
.php .co4 {color: #009933; font-style: italic;}
.php .coMULTI {color: #666666; font-style: italic;}
.php .es0 {color: #000099; font-weight: bold;}
.php .es1 {color: #000099; font-weight: bold;}
.php .es2 {color: #660099; font-weight: bold;}
.php .es3 {color: #660099; font-weight: bold;}
.php .es4 {color: #006699; font-weight: bold;}
.php .es5 {color: #006699; font-weight: bold; font-style: italic;}
.php .es6 {color: #009933; font-weight: bold;}
.php .es_h {color: #000099; font-weight: bold;}
.php .br0 {color: #009900;}
.php .sy0 {color: #339933;}
.php .sy1 {color: #000000; font-weight: bold;}
.php .st0 {color: #0000ff;}
.php .st_h {color: #0000ff;}
.php .nu0 {color: #cc66cc;}
.php .nu8 {color: #208080;}
.php .nu12 {color: #208080;}
.php .nu19 {color:#800080;}
.php .me1 {color: #004000;}
.php .me2 {color: #004000;}
.php .re0 {color: #000088;}
.php span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;div class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;&lt;?php&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/defined&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;defined&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&quot;_ECRIRE_INC_VERSION&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;co1&quot;&gt;// fonction pour le pipeline, n'a rien a effectuer&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; chats_autoriser&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;co1&quot;&gt;// declarations d'autorisations&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; autoriser_chats_bouton_dist&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$faire&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$type&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$id&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$qui&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$opt&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; autoriser&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'voir'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'chats'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$id&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$qui&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$opt&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; autoriser_chats_voir_dist&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$faire&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$type&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$id&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$qui&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$opt&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;sy1&quot;&gt;?&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/e93d1ff8051a752a146ab76c337da3ee.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;dl class='spip_document_246 spip_documents'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH156/bouton_chats-537b1.png' width='500' height='156' alt='PNG - 24.1 ko' style='height:156px;width:500px;' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-246 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Bouton d'acc&#232;s aux Chats&lt;/strong&gt;&lt;/dt&gt;
&lt;/dl&gt;
&lt;h3 class='h3 spip'&gt;Cr&#233;ation d'une page priv&#233;e pour lister les chats&lt;/h3&gt;
&lt;p&gt;Nous cr&#233;ons alors le fichier &lt;code class='spip_code' dir='ltr'&gt;prive/exec/chats.html&lt;/code&gt;. Il liste les chats pr&#233;sents et propose des actions pour &#171; voir &#187;, &#171; modifier &#187; ou &#171; supprimer &#187; chaque chat. Dans la colonne de navigation, une description du plugin ainsi qu'un lien pour cr&#233;er un nouveau chat est pr&#233;sent. Le filtre &lt;code class='spip_code' dir='ltr'&gt;icone&lt;/code&gt; utilis&#233; qui facilite la cr&#233;ation d'icone en squelette provient du plugin &#171; spip_bonux &#187;. Nous devons donc ajouter cette d&#233;pendance dans le fichier &lt;code class='spip_code' dir='ltr'&gt;plugin.xml&lt;/code&gt;. De nouvelles autorisations permettent de g&#233;rer l'affichage des actions possibles, il faut aussi les renseigner.&lt;/p&gt; &lt;p&gt;Le fichier ne doit retourner aucun contenu si le visiteur n'a pas le droit de voir cette page. On place donc la m&#234;me autorisation que pour le bouton du menu qui conditionne l'affichage du contenu. Dedans, une inclusion appelle une boucle sur la table chats.&lt;/p&gt; &lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.spip2 .imp {font-weight: bold; color: red;}
.spip2 .coMULTI {color: #808080; font-style: italic;}
.spip2 .es0 {color: #000099; font-weight: bold;}
.spip2 .re0 {color: #E1861A;}
.spip2 .re1 {color: #CA5200;}
.spip2 .re2 {color: #e72;}
.spip2 .re10 {color: #527EE0;}
.spip2 .re11 {color: #222;}
.spip2 .re12 {color: #745E4B;}
.spip2 .re13 {color: #222;}
.spip2 .re20 {color: #527EE0;}
.spip2 .re21 {color: #222}
.spip2 .re22 {color: #745E4B;}
.spip2 .re23 {color: #222;}
.spip2 .re30 {color: #C90}
.spip2 .re31 {color: #C90}
.spip2 .re40 {color: #74B900;}
.spip2 .re50 {color: #E1861A;}
.spip2 span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#AUTORISER&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;voir, chats&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;h1&gt;&lt;span class=&quot;re30&quot;&gt;&lt;:chats:liste_des_chats:&gt;&lt;/span&gt;&lt;/h1&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;div class='ajax'&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re21&quot;&gt;&lt;INCLURE&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;fond=inclure/liste_chats,env,ajax&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt; /&lt;/span&gt;&lt;span class=&quot;re23&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;coMULTI&quot;&gt;&lt;!--#navigation--&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;div class='cadre cadre-info'&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;p&gt;&lt;span class=&quot;re30&quot;&gt;&lt;:chats:description_chats:&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#AUTORISER&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;modifier, chat&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#URL_ECRIRE&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;chat_edit&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re50&quot;&gt;|parametre_url&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;new,oui&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re50&quot;&gt;|icone&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;span class=&quot;re30&quot;&gt;&lt;:chats:action_ajouter:&gt;&lt;/span&gt;, &lt;span class=&quot;re1&quot;&gt;#CHEMIN&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;images/chat-24.png&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;, center, creer.gif&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;coMULTI&quot;&gt;&lt;!--/#navigation--&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/273e321575b3c5cb8b23c19176ec9b3f.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Contenu de &lt;code class='spip_code' dir='ltr'&gt;inclure/liste_chats.html&lt;/code&gt; :&lt;/p&gt;
&lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.spip2 .imp {font-weight: bold; color: red;}
.spip2 .coMULTI {color: #808080; font-style: italic;}
.spip2 .es0 {color: #000099; font-weight: bold;}
.spip2 .re0 {color: #E1861A;}
.spip2 .re1 {color: #CA5200;}
.spip2 .re2 {color: #e72;}
.spip2 .re10 {color: #527EE0;}
.spip2 .re11 {color: #222;}
.spip2 .re12 {color: #745E4B;}
.spip2 .re13 {color: #222;}
.spip2 .re20 {color: #527EE0;}
.spip2 .re21 {color: #222}
.spip2 .re22 {color: #745E4B;}
.spip2 .re23 {color: #222;}
.spip2 .re30 {color: #C90}
.spip2 .re31 {color: #C90}
.spip2 .re40 {color: #74B900;}
.spip2 .re50 {color: #E1861A;}
.spip2 span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re11&quot;&gt;&lt;B_chats&lt;/span&gt;&lt;span class=&quot;re13&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;table class='chats spip'&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;thead&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;tr&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;th&gt;&lt;span class=&quot;re30&quot;&gt;&lt;:chats:label_id:&gt;&lt;/span&gt;&lt;/th&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;th&gt;&lt;span class=&quot;re30&quot;&gt;&lt;:chats:label_nom:&gt;&lt;/span&gt;&lt;/th&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;th&gt;&lt;span class=&quot;re30&quot;&gt;&lt;:chats:label_race:&gt;&lt;/span&gt;&lt;/th&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;th&gt;&lt;span class=&quot;re30&quot;&gt;&lt;:chats:label_robe:&gt;&lt;/span&gt;&lt;/th&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;th&gt;&lt;span class=&quot;re30&quot;&gt;&lt;:chats:label_annee_naissance:&gt;&lt;/span&gt;&lt;/td&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;th&gt;&lt;span class=&quot;re30&quot;&gt;&lt;:chats:label_actions:&gt;&lt;/span&gt;&lt;/td&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/tr&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/thead&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;tbody&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re11&quot;&gt;&lt;BOUCLE_chats&lt;span class=&quot;re10&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;CHATS&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;par nom&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;pagination 10&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re13&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;tr class=&quot;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#COMPTEUR_BOUCLE&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|alterner&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;row_odd,row_even&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&quot;&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;td&gt;&lt;span class=&quot;re1&quot;&gt;#ID_CHAT&lt;/span&gt;&lt;/td&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;td&gt;&lt;span class=&quot;re1&quot;&gt;#NOM&lt;/span&gt;&lt;/td&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;td&gt;&lt;span class=&quot;re1&quot;&gt;#RACE&lt;/span&gt;&lt;/td&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;td&gt;&lt;span class=&quot;re1&quot;&gt;#ROBE&lt;/span&gt;&lt;/td&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#SET&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;nb,&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#DATE&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;Y&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|moins&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#ANNEE_NAISSANCE&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;td&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#ANNEE_NAISSANCE&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|oui&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;re30&quot;&gt;&lt;:chats:nb_ans&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;nb=&lt;span class=&quot;re1&quot;&gt;#GET&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;nb&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;:&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/td&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;td&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#AUTORISER&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;voir,chat,&lt;span class=&quot;re1&quot;&gt;#ID_CHAT&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;a href='&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#URL_ECRIRE&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;chat_voir&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|parametre_url&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;id_chat,&lt;span class=&quot;re1&quot;&gt;#ID_CHAT&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;'&gt;&lt;span class=&quot;re30&quot;&gt;&lt;:chats:action_voir:&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#AUTORISER&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;modifier,chat,&lt;span class=&quot;re1&quot;&gt;#ID_CHAT&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; |&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;a href='&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#URL_ECRIRE&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;chat_edit&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|parametre_url&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;id_chat,&lt;span class=&quot;re1&quot;&gt;#ID_CHAT&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;'&gt;&lt;span class=&quot;re30&quot;&gt;&lt;:chats:action_modifier:&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; |&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;a href='&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#URL_ACTION_AUTEUR&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;supprimer_chat,&lt;span class=&quot;re1&quot;&gt;#ID_CHAT&lt;/span&gt;,&lt;span class=&quot;re1&quot;&gt;#SELF&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;'&gt;&lt;span class=&quot;re30&quot;&gt;&lt;:chats:action_supprimer:&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/td&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/tr&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re11&quot;&gt;&lt;/BOUCLE_chats&lt;/span&gt;&lt;span class=&quot;re13&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/tbody&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;/table&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;p class='pagination'&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#PAGINATION&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/p&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re11&quot;&gt;&lt;/B_chats&lt;/span&gt;&lt;span class=&quot;re13&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/750321ab9566a5fccc5a03c2a0681a37.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Les autorisations correspondantes sont ajout&#233;es au fichier &lt;code class='spip_code' dir='ltr'&gt;chats_autorisations.php&lt;/code&gt; :&lt;/p&gt;
&lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.php .imp {font-weight: bold; color: red;}
.php .kw1 {color: #b1b100;}
.php .kw2 {color: #000000; font-weight: bold;}
.php .kw3 {color: #990000;}
.php .kw4 {color: #009900; font-weight: bold;}
.php .co1 {color: #666666; font-style: italic;}
.php .co2 {color: #666666; font-style: italic;}
.php .co3 {color: #0000cc; font-style: italic;}
.php .co4 {color: #009933; font-style: italic;}
.php .coMULTI {color: #666666; font-style: italic;}
.php .es0 {color: #000099; font-weight: bold;}
.php .es1 {color: #000099; font-weight: bold;}
.php .es2 {color: #660099; font-weight: bold;}
.php .es3 {color: #660099; font-weight: bold;}
.php .es4 {color: #006699; font-weight: bold;}
.php .es5 {color: #006699; font-weight: bold; font-style: italic;}
.php .es6 {color: #009933; font-weight: bold;}
.php .es_h {color: #000099; font-weight: bold;}
.php .br0 {color: #009900;}
.php .sy0 {color: #339933;}
.php .sy1 {color: #000000; font-weight: bold;}
.php .st0 {color: #0000ff;}
.php .st_h {color: #0000ff;}
.php .nu0 {color: #cc66cc;}
.php .nu8 {color: #208080;}
.php .nu12 {color: #208080;}
.php .nu19 {color:#800080;}
.php .me1 {color: #004000;}
.php .me2 {color: #004000;}
.php .re0 {color: #000088;}
.php span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;div class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; autoriser_chat_voir_dist&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$faire&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$type&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$id&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$qui&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$opt&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; autoriser&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'modifier'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'chat'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$id&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$qui&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$opt&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; autoriser_chat_modifier_dist&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$faire&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$type&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$id&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$qui&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$opt&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;a href=&quot;http://www.php.net/in_array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;in_array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$qui&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'statut'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'0minirezo'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'1comite'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/b9c472093d9f9f060f9f098b8577009c.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;dl class='spip_document_243 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH209/liste-12e07.png' width='500' height='209' alt='PNG - 30.3 ko' style='height:209px;width:500px;' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-243 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Liste des chats&lt;/strong&gt;&lt;/dt&gt;
&lt;/dl&gt;
&lt;h3 class='h3 spip'&gt;Cr&#233;ation d'une page priv&#233;e pour voir un chat&lt;/h3&gt;
&lt;p&gt;Nous cherchons maintenant &#224; afficher une page, nomm&#233;e &#171; chat_voir &#187; qui d&#233;taille un chat. On va cr&#233;er pour cela 3 fichiers :&lt;/p&gt; &lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; &lt;code class='spip_code' dir='ltr'&gt;prive/exec/chat_voir.html&lt;/code&gt; g&#232;re l'ensemble de la page,&lt;/li&gt;&lt;li&gt; &lt;code class='spip_code' dir='ltr'&gt;prive/contenu/chat.html&lt;/code&gt;, s'occupe simplement du contenu &#224; afficher au centre et &lt;/li&gt;&lt;li&gt; &lt;code class='spip_code' dir='ltr'&gt;prive/infos/chat.html&lt;/code&gt; d&#233;crit l'objet dans la colonne gauche.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Code de &lt;code class='spip_code' dir='ltr'&gt;prive/exec/chat_voir.html&lt;/code&gt;. Comme pr&#233;c&#233;demment, une autorisation teste si on a le droit d'acceder au contenu. Ici, on utilise la boucle CONDITION du plugin &#171; spip_bonux &#187; pour pouvoir ins&#233;rer des boucles dans la condition. En l'occurrence une boucle sur le chat s&#233;lectionn&#233;.&lt;/p&gt; &lt;p&gt;Un lien pour modifier ansi que le titre sont affich&#233;s avant d'appeler le fichier affichant le contenu (&lt;code class='spip_code' dir='ltr'&gt;[(#INCLURE{fond=prive/contenu/chat,id=#ID_CHAT})]&lt;/code&gt;) dont tout le contenu est envoy&#233; au pipeline &#171; afficher_contenu_objet &#187; (qui servira notamment au plugin &#171; Champs Extras &#187;).&lt;/p&gt; &lt;p&gt;Enfin, dans la navigation, on appelle le pipeline &#171; boite_infos &#187; ; c'est lui qui chargera le fichier &lt;code class='spip_code' dir='ltr'&gt;prive/infos/chat.html&lt;/code&gt;.&lt;/p&gt; &lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.spip2 .imp {font-weight: bold; color: red;}
.spip2 .coMULTI {color: #808080; font-style: italic;}
.spip2 .es0 {color: #000099; font-weight: bold;}
.spip2 .re0 {color: #E1861A;}
.spip2 .re1 {color: #CA5200;}
.spip2 .re2 {color: #e72;}
.spip2 .re10 {color: #527EE0;}
.spip2 .re11 {color: #222;}
.spip2 .re12 {color: #745E4B;}
.spip2 .re13 {color: #222;}
.spip2 .re20 {color: #527EE0;}
.spip2 .re21 {color: #222}
.spip2 .re22 {color: #745E4B;}
.spip2 .re23 {color: #222;}
.spip2 .re30 {color: #C90}
.spip2 .re31 {color: #C90}
.spip2 .re40 {color: #74B900;}
.spip2 .re50 {color: #E1861A;}
.spip2 span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re11&quot;&gt;&lt;BOUCLE_si_autorise&lt;span class=&quot;re10&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;CONDITION&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;si &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#ID_CHAT&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|intval&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|et&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#AUTORISER&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;voir,chat,&lt;span class=&quot;re1&quot;&gt;#ID_CHAT&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re13&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re11&quot;&gt;&lt;BOUCLE_chat&lt;span class=&quot;re10&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;CHATS&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;id_chat&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;tout&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re13&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;div class='fiche_objet'&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#AUTORISER&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;modifier,chat,&lt;span class=&quot;re1&quot;&gt;#ID_CHAT&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;div class='bandeau_actions'&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#URL_ECRIRE&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;chat_edit&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re50&quot;&gt;|parametre_url&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;id_chat,&lt;span class=&quot;re1&quot;&gt;#ID_CHAT&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re50&quot;&gt;|parametre_url&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;retour,&lt;span class=&quot;re1&quot;&gt;#SELF&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re50&quot;&gt;|icone&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;span class=&quot;re30&quot;&gt;&lt;:chats:action_modifier:&gt;&lt;/span&gt;, &lt;span class=&quot;re1&quot;&gt;#CHEMIN&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;images/chat-&lt;span class=&quot;nu0&quot;&gt;24&lt;/span&gt;.png&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;, &lt;span class=&quot;re1&quot;&gt;#LANG_RIGHT&lt;/span&gt;, edit.gif&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;h1&gt;&lt;span class=&quot;re1&quot;&gt;#NOM&lt;/span&gt;&lt;/h1&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;div id='wysiwyg'&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#PIPELINE&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;afficher_contenu_objet,&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#ARRAY&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re40&quot;&gt; args,&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#ARRAY&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re40&quot;&gt; type,chat,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re40&quot;&gt; id_objet,&lt;span class=&quot;re1&quot;&gt;#ID_CHAT&lt;/span&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re40&quot;&gt; contexte,&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#ARRAY&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re40&quot;&gt; id_chat,&lt;span class=&quot;re1&quot;&gt;#ID_CHAT&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re40&quot;&gt; data,&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#INCLURE&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;fond=prive/contenu/chat,id=&lt;span class=&quot;re1&quot;&gt;#ID_CHAT&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;coMULTI&quot;&gt;&lt;!--#navigation--&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#REM&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; Ce pipeline charge prive/infos/$type &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;div class='cadre cadre-info'&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#PIPELINE&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;boite_infos,&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#ARRAY&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re40&quot;&gt; args,&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#ARRAY&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re40&quot;&gt; type,chat,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re40&quot;&gt; id,&lt;span class=&quot;re1&quot;&gt;#ID_CHAT&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re40&quot;&gt; data,''&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;/div&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;coMULTI&quot;&gt;&lt;!--/#navigation--&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re11&quot;&gt;&lt;/BOUCLE_chat&lt;/span&gt;&lt;span class=&quot;re13&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re11&quot;&gt;&lt;/BOUCLE_si_autorise&lt;/span&gt;&lt;span class=&quot;re13&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/8721f10c608ad43df86014cb0807db91.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Le second fichier &lt;code class='spip_code' dir='ltr'&gt;prive/contenu/chat.html&lt;/code&gt; affiche le contenu du chat et se pr&#233;sente comme une liste de champs &#224; afficher. C'est le m&#234;me code r&#233;p&#233;t&#233; pour chaque champ (pour notre exemple) :&lt;/p&gt;
&lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.spip2 .imp {font-weight: bold; color: red;}
.spip2 .coMULTI {color: #808080; font-style: italic;}
.spip2 .es0 {color: #000099; font-weight: bold;}
.spip2 .re0 {color: #E1861A;}
.spip2 .re1 {color: #CA5200;}
.spip2 .re2 {color: #e72;}
.spip2 .re10 {color: #527EE0;}
.spip2 .re11 {color: #222;}
.spip2 .re12 {color: #745E4B;}
.spip2 .re13 {color: #222;}
.spip2 .re20 {color: #527EE0;}
.spip2 .re21 {color: #222}
.spip2 .re22 {color: #745E4B;}
.spip2 .re23 {color: #222;}
.spip2 .re30 {color: #C90}
.spip2 .re31 {color: #C90}
.spip2 .re40 {color: #74B900;}
.spip2 .re50 {color: #E1861A;}
.spip2 span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re11&quot;&gt;&lt;BOUCLE_afficher_contenu&lt;span class=&quot;re10&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;CHATS&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;id_chat=&lt;span class=&quot;re1&quot;&gt;#ENV&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;id&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;tout&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re13&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;div class=&quot;champ contenu_nom&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#NOM&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|strlen&lt;/span&gt;|?&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;'',vide&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&quot;&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;div class='label'&gt;&lt;span class=&quot;re30&quot;&gt;&lt;:chats:label_nom:&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;div dir='&lt;span class=&quot;re1&quot;&gt;#LANG_DIR&lt;/span&gt;' class='&lt;span class=&quot;re1&quot;&gt;#EDIT&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;nom&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt; nom'&gt;&lt;span class=&quot;re1&quot;&gt;#NOM&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;div class=&quot;champ contenu_race&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#RACE&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|strlen&lt;/span&gt;|?&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;'',vide&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&quot;&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;div class='label'&gt;&lt;span class=&quot;re30&quot;&gt;&lt;:chats:label_race:&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;div dir='&lt;span class=&quot;re1&quot;&gt;#LANG_DIR&lt;/span&gt;' class='&lt;span class=&quot;re1&quot;&gt;#EDIT&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;race&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt; race'&gt;&lt;span class=&quot;re1&quot;&gt;#RACE&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;div class=&quot;champ contenu_robe&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#ROBE&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|strlen&lt;/span&gt;|?&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;'',vide&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&quot;&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;div class='label'&gt;&lt;span class=&quot;re30&quot;&gt;&lt;:chats:label_robe:&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;div dir='&lt;span class=&quot;re1&quot;&gt;#LANG_DIR&lt;/span&gt;' class='&lt;span class=&quot;re1&quot;&gt;#EDIT&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;robe&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt; robe'&gt;&lt;span class=&quot;re1&quot;&gt;#ROBE&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;div class=&quot;champ contenu_annee_naissance&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#ANNEE_NAISSANCE&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|strlen&lt;/span&gt;|?&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;'',vide&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&quot;&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;div class='label'&gt;&lt;span class=&quot;re30&quot;&gt;&lt;:chats:label_annee_naissance:&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;div dir='&lt;span class=&quot;re1&quot;&gt;#LANG_DIR&lt;/span&gt;' class='&lt;span class=&quot;re1&quot;&gt;#EDIT&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;annee_naissance&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt; annee_naissance'&gt;&lt;span class=&quot;re1&quot;&gt;#ANNEE_NAISSANCE&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;div class=&quot;champ contenu_infos&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#INFOS&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|strlen&lt;/span&gt;|?&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;'',vide&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&quot;&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;div class='label'&gt;&lt;span class=&quot;re30&quot;&gt;&lt;:chats:label_infos:&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;div dir='&lt;span class=&quot;re1&quot;&gt;#LANG_DIR&lt;/span&gt;' class='&lt;span class=&quot;re1&quot;&gt;#EDIT&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;infos&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt; infos'&gt;&lt;span class=&quot;re1&quot;&gt;#INFOS&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re11&quot;&gt;&lt;/BOUCLE_afficher_contenu&lt;/span&gt;&lt;span class=&quot;re13&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/93fe103445417a08c97dc526f916e92b.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Le dernier fichier &lt;code class='spip_code' dir='ltr'&gt;prive/infos/chat.html&lt;/code&gt; d&#233;crit quelques statistiques des objets. Ici rien d'int&#233;ressant ne nous concerne, on affiche simplement l'identifiant du chat :&lt;/p&gt;
&lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.spip2 .imp {font-weight: bold; color: red;}
.spip2 .coMULTI {color: #808080; font-style: italic;}
.spip2 .es0 {color: #000099; font-weight: bold;}
.spip2 .re0 {color: #E1861A;}
.spip2 .re1 {color: #CA5200;}
.spip2 .re2 {color: #e72;}
.spip2 .re10 {color: #527EE0;}
.spip2 .re11 {color: #222;}
.spip2 .re12 {color: #745E4B;}
.spip2 .re13 {color: #222;}
.spip2 .re20 {color: #527EE0;}
.spip2 .re21 {color: #222}
.spip2 .re22 {color: #745E4B;}
.spip2 .re23 {color: #222;}
.spip2 .re30 {color: #C90}
.spip2 .re31 {color: #C90}
.spip2 .re40 {color: #74B900;}
.spip2 .re50 {color: #E1861A;}
.spip2 span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re11&quot;&gt;&lt;BOUCLE_chat_info&lt;span class=&quot;re10&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;CHATS&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;id_chat=&lt;span class=&quot;re1&quot;&gt;#ENV&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;id&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;tout&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re13&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;div class='infos'&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;div class='numero'&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re30&quot;&gt;&lt;:chats:info_gauche_numero_chat:&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;p&gt;&lt;span class=&quot;re1&quot;&gt;#ID_CHAT&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re11&quot;&gt;&lt;/BOUCLE_chat_info&lt;/span&gt;&lt;span class=&quot;re13&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/78cdff9c9dc33331da78d2ee73cd1361.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;dl class='spip_document_244 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH139/vue_chat-c4fe5.png' width='500' height='139' alt='PNG - 13.2 ko' style='height:139px;width:500px;' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-244 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Vue du chat&lt;/strong&gt;&lt;/dt&gt;
&lt;/dl&gt;
&lt;h3 class='h3 spip'&gt;Cr&#233;ation d'une page priv&#233;e pour ajouter ou modifier un chat&lt;/h3&gt;
&lt;p&gt;Nous cr&#233;ons pour cela 2 fichiers :&lt;/p&gt; &lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; &lt;code class='spip_code' dir='ltr'&gt;prive/exec/chat_edit.html&lt;/code&gt; g&#232;re l'affichage de l'ensemble de la page et appelle le fichier suivant&lt;/li&gt;&lt;li&gt; &lt;code class='spip_code' dir='ltr'&gt;prive/editer/chat.html&lt;/code&gt; charge le formulaire. On pourrait cela dit mettre l'int&#233;gralit&#233; de ce fichier dans le premier. Cette inclusion est simplement l&#224; pour reprendre le m&#234;me sch&#233;ma que le core de SPIP.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Le code le &lt;code class='spip_code' dir='ltr'&gt;prive/exec/chat_edit.html&lt;/code&gt; calcule une icone de retour (pour revenir en arri&#232;re sans valider le formulaire), et un titre, puis appelle l'inclusion avec ces valeurs. Le hic est la n&#233;cessit&#233; de r&#233;cup&#233;rer soit une variable &lt;code class='spip_code' dir='ltr'&gt;id_chat&lt;/code&gt; par GET, soit par POST (lorsqu'on r&#233;affiche un formulaire qui a une erreur). Le cache &#224; z&#233;ro et le calcul &lt;code class='spip_code' dir='ltr'&gt;[(#VAL{id_chat}|_request|sinon{new})]&lt;/code&gt; nous le permet.&lt;/p&gt; &lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.spip2 .imp {font-weight: bold; color: red;}
.spip2 .coMULTI {color: #808080; font-style: italic;}
.spip2 .es0 {color: #000099; font-weight: bold;}
.spip2 .re0 {color: #E1861A;}
.spip2 .re1 {color: #CA5200;}
.spip2 .re2 {color: #e72;}
.spip2 .re10 {color: #527EE0;}
.spip2 .re11 {color: #222;}
.spip2 .re12 {color: #745E4B;}
.spip2 .re13 {color: #222;}
.spip2 .re20 {color: #527EE0;}
.spip2 .re21 {color: #222}
.spip2 .re22 {color: #745E4B;}
.spip2 .re23 {color: #222;}
.spip2 .re30 {color: #C90}
.spip2 .re31 {color: #C90}
.spip2 .re40 {color: #74B900;}
.spip2 .re50 {color: #E1861A;}
.spip2 span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re1&quot;&gt;#CACHE&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;0&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#SET&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;id_chat,&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#VAL&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;id_chat&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|_request&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|sinon&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;new&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re11&quot;&gt;&lt;BOUCLE_si_autorise&lt;span class=&quot;re10&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;CONDITION&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;si &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#AUTORISER&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;modifier,chat,&lt;span class=&quot;re1&quot;&gt;#GET&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;id_chat&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re13&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#SET&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;retour, &lt;span class=&quot;re1&quot;&gt;#URL_ECRIRE&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;chats&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re11&quot;&gt;&lt;BOUCLE_titre&lt;span class=&quot;re10&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;CHATS&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;id_chat=&lt;span class=&quot;re1&quot;&gt;#GET&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;id_chat&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;tout&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re13&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#SET&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;titre, &lt;span class=&quot;re1&quot;&gt;#NOM&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#SET&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;retour, &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#URL_ECRIRE&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;chat_voir&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|parametre_url&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;id_chat,&lt;span class=&quot;re1&quot;&gt;#ID_CHAT&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re11&quot;&gt;&lt;/BOUCLE_titre&lt;/span&gt;&lt;span class=&quot;re13&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#INCLURE&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;fond=prive/editer/chat,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re40&quot;&gt; id_chat=&lt;span class=&quot;re1&quot;&gt;#GET&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;id_chat&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re40&quot;&gt; icone_retour=&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#ENV&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;retour,&lt;span class=&quot;re1&quot;&gt;#GET&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;retour&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re40&quot;&gt; &lt;span class=&quot;re50&quot;&gt;|icone&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;span class=&quot;re30&quot;&gt;&lt;:icone_retour:&gt;&lt;/span&gt;, &lt;span class=&quot;re1&quot;&gt;#CHEMIN&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;images/chat-&lt;span class=&quot;nu0&quot;&gt;24&lt;/span&gt;.png&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;, &lt;span class=&quot;re1&quot;&gt;#LANG_LEFT&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re40&quot;&gt; titre=&lt;span class=&quot;re1&quot;&gt;#GET&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;titre&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re40&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re11&quot;&gt;&lt;/BOUCLE_si_autorise&lt;/span&gt;&lt;span class=&quot;re13&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/1873cbc70f57024d5a5affff1c0b9071.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Le second fichier, &lt;code class='spip_code' dir='ltr'&gt;prive/editer/chat.html&lt;/code&gt; affiche l'icone, le titre, et appelle le formulaire d'&#233;dition CVT.&lt;/p&gt;
&lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.spip2 .imp {font-weight: bold; color: red;}
.spip2 .coMULTI {color: #808080; font-style: italic;}
.spip2 .es0 {color: #000099; font-weight: bold;}
.spip2 .re0 {color: #E1861A;}
.spip2 .re1 {color: #CA5200;}
.spip2 .re2 {color: #e72;}
.spip2 .re10 {color: #527EE0;}
.spip2 .re11 {color: #222;}
.spip2 .re12 {color: #745E4B;}
.spip2 .re13 {color: #222;}
.spip2 .re20 {color: #527EE0;}
.spip2 .re21 {color: #222}
.spip2 .re22 {color: #745E4B;}
.spip2 .re23 {color: #222;}
.spip2 .re30 {color: #C90}
.spip2 .re31 {color: #C90}
.spip2 .re40 {color: #74B900;}
.spip2 .re50 {color: #E1861A;}
.spip2 span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;div class='cadre-formulaire-editer'&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;div class=&quot;entete-formulaire&quot;&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re1&quot;&gt;#ENV&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;**&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;icone_retour&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;re30&quot;&gt;&lt;:chats:info_modifier_chat:&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;h1&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#ENV&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;titre,&lt;span class=&quot;re30&quot;&gt;&lt;:chats:texte_nouveau_chat:&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/h1&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re1&quot;&gt;#FORMULAIRE_EDITER_CHAT&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#ENV&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;id_chat,new&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;,&lt;span class=&quot;re1&quot;&gt;#ENV&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;redirect&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/c6bf5a75b99f94708e8e7380e3faf522.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;h3 class='h3 spip'&gt;Cr&#233;ation du formulaire CVT d'&#233;dition&lt;/h3&gt;
&lt;p&gt;Nous cr&#233;ons 3 fichiers en tout :&lt;/p&gt; &lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; &lt;code class='spip_code' dir='ltr'&gt;formulaires/editer_chat.html&lt;/code&gt; contenant le HTML du formulaire,&lt;/li&gt;&lt;li&gt; &lt;code class='spip_code' dir='ltr'&gt;formulaires/editer_chat.php&lt;/code&gt; contenant les 3 fonctions Charger, V&#233;rifier et Traiter, mais qui appellent simplement des fonctions SPIP g&#233;n&#233;riques,&lt;/li&gt;&lt;li&gt; &lt;code class='spip_code' dir='ltr'&gt;action/editer_chat.php&lt;/code&gt; qui contient le traitement du formulaire.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Le code HTML du formulaire CVT, utilise ici la balise #SAISIE du plugin &#171; saisies &#187; simplement pour se simplifier l'&#233;criture (Oui je sais, y l'heure actuelle ce plugin n'est pas document&#233; !). Le fichier &lt;code class='spip_code' dir='ltr'&gt;formulaires/editer_chat.html&lt;/code&gt; contient :&lt;/p&gt;
&lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.spip2 .imp {font-weight: bold; color: red;}
.spip2 .coMULTI {color: #808080; font-style: italic;}
.spip2 .es0 {color: #000099; font-weight: bold;}
.spip2 .re0 {color: #E1861A;}
.spip2 .re1 {color: #CA5200;}
.spip2 .re2 {color: #e72;}
.spip2 .re10 {color: #527EE0;}
.spip2 .re11 {color: #222;}
.spip2 .re12 {color: #745E4B;}
.spip2 .re13 {color: #222;}
.spip2 .re20 {color: #527EE0;}
.spip2 .re21 {color: #222}
.spip2 .re22 {color: #745E4B;}
.spip2 .re23 {color: #222;}
.spip2 .re30 {color: #C90}
.spip2 .re31 {color: #C90}
.spip2 .re40 {color: #74B900;}
.spip2 .re50 {color: #E1861A;}
.spip2 span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;div class='formulaire_spip formulaire_editer formulaire_&lt;span class=&quot;re1&quot;&gt;#FORM&lt;/span&gt; formulaire_&lt;span class=&quot;re1&quot;&gt;#FORM&lt;/span&gt;-&lt;span class=&quot;re1&quot;&gt;#ENV&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;id_chat,nouveau&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;'&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;p class=&quot;reponse_formulaire reponse_formulaire_ok&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#ENV&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;**&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;message_ok&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/p&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;p class=&quot;reponse_formulaire reponse_formulaire_erreur&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#ENV&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;message_erreur&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/p&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#ENV&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;editable&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|oui&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;form method='post' action='&lt;span class=&quot;re1&quot;&gt;#ENV&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;action&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;'&gt;&lt;div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re1&quot;&gt;#ACTION_FORMULAIRE&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#ENV&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;action&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;input type='hidden' name='id_chat' value='&lt;span class=&quot;re1&quot;&gt;#ENV&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;id_chat&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;' /&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;ul&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#SAISIE&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;input, nom,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re40&quot;&gt; label=&lt;span class=&quot;re30&quot;&gt;&lt;:chats:label_nom:&gt;&lt;/span&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re40&quot;&gt; obligatoire=oui&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#SAISIE&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;input, race,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re40&quot;&gt; label=&lt;span class=&quot;re30&quot;&gt;&lt;:chats:label_race:&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#SAISIE&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;input, robe,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re40&quot;&gt; label=&lt;span class=&quot;re30&quot;&gt;&lt;:chats:label_robe:&gt;&lt;/span&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re40&quot;&gt; size=4&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#SAISIE&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;input, annee_naissance,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re40&quot;&gt; label=&lt;span class=&quot;re30&quot;&gt;&lt;:chats:label_annee_naissance:&gt;&lt;/span&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re40&quot;&gt; size=4&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#SAISIE&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;textarea, infos,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re40&quot;&gt; label=&lt;span class=&quot;re30&quot;&gt;&lt;:chats:label_infos:&gt;&lt;/span&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re40&quot;&gt; explication=&lt;span class=&quot;re30&quot;&gt;&lt;:chats:explication_infos:&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/ul&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#REM&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; ajouter les saisies supplementaires : extra et autre, a cet endroit &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;coMULTI&quot;&gt;&lt;!--extra--&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;p class=&quot;boutons&quot;&gt;&lt;input type='submit' class='submit' value='&lt;span class=&quot;re30&quot;&gt;&lt;:bouton_enregistrer:&gt;&lt;/span&gt;' /&gt;&lt;/p&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/div&gt;&lt;/form&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/5eb801a0b6e2bfd15d65b0b8788b4937.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;dl class='spip_document_241 spip_documents'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH693/edition_chat-27efc.png' width='500' height='693' alt='PNG - 24.3 ko' style='height:693px;width:500px;' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-241 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Edition d'un chat&lt;/strong&gt;&lt;/dt&gt;
&lt;/dl&gt;
&lt;p&gt;Le fichier PHP correspondant &lt;code class='spip_code' dir='ltr'&gt;formulaires/editer_chat.php&lt;/code&gt; quant &#224; lui contient :&lt;/p&gt;
&lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.php .imp {font-weight: bold; color: red;}
.php .kw1 {color: #b1b100;}
.php .kw2 {color: #000000; font-weight: bold;}
.php .kw3 {color: #990000;}
.php .kw4 {color: #009900; font-weight: bold;}
.php .co1 {color: #666666; font-style: italic;}
.php .co2 {color: #666666; font-style: italic;}
.php .co3 {color: #0000cc; font-style: italic;}
.php .co4 {color: #009933; font-style: italic;}
.php .coMULTI {color: #666666; font-style: italic;}
.php .es0 {color: #000099; font-weight: bold;}
.php .es1 {color: #000099; font-weight: bold;}
.php .es2 {color: #660099; font-weight: bold;}
.php .es3 {color: #660099; font-weight: bold;}
.php .es4 {color: #006699; font-weight: bold;}
.php .es5 {color: #006699; font-weight: bold; font-style: italic;}
.php .es6 {color: #009933; font-weight: bold;}
.php .es_h {color: #000099; font-weight: bold;}
.php .br0 {color: #009900;}
.php .sy0 {color: #339933;}
.php .sy1 {color: #000000; font-weight: bold;}
.php .st0 {color: #0000ff;}
.php .st_h {color: #0000ff;}
.php .nu0 {color: #cc66cc;}
.php .nu8 {color: #208080;}
.php .nu12 {color: #208080;}
.php .nu19 {color:#800080;}
.php .me1 {color: #004000;}
.php .me2 {color: #004000;}
.php .re0 {color: #000088;}
.php span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;div class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;&lt;?php&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/defined&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;defined&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&quot;_ECRIRE_INC_VERSION&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;include_spip&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'inc/actions'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;include_spip&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'inc/editer'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; formulaires_editer_chat_charger_dist&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$id_chat&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'new'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$retour&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;''&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$valeurs&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; formulaires_editer_objet_charger&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'chat'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$id_chat&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;''&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;''&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$retour&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;''&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$valeurs&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; formulaires_editer_chat_verifier_dist&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$id_chat&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'new'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$retour&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;''&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$erreurs&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; formulaires_editer_objet_verifier&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'chat'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$id_chat&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'nom'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$erreurs&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; formulaires_editer_chat_traiter_dist&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$id_chat&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'new'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$retour&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;''&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; formulaires_editer_objet_traiter&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'chat'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$id_chat&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;''&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;''&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$retour&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;''&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;sy1&quot;&gt;?&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/26a4cc366ff144ac33be59fc612d7314.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Les fonctions g&#233;n&#233;riques &lt;code class='spip_code' dir='ltr'&gt;formulaires_editer_objet_$action()&lt;/code&gt; ont des arguments pr&#233;d&#233;finis. Certains nous sont inutiles et nous mettons simplement une chaine vide &lt;code class='spip_code' dir='ltr'&gt;''&lt;/code&gt; &#224; la place. Les deux premi&#232;res fonctions (charger et v&#233;rifier) peuvent &#234;tre compl&#232;tement prises en charge sans rien faire de plus (si nous n'avons pas de besoins particuliers). Seule la fonction traiter n&#233;cessite de cr&#233;er une action de traitement, dans un fichier &lt;code class='spip_code' dir='ltr'&gt;action/editer_chat.php&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;Ce dernier fichier contient 3 fonctions :&lt;/p&gt; &lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; &lt;code class='spip_code' dir='ltr'&gt;action_editer_chat_dist()&lt;/code&gt; verifie l'argument, appelle &lt;code class='spip_code' dir='ltr'&gt;insert_chat()&lt;/code&gt; si on a besoin d'un nouveau chat, puis appelle &lt;code class='spip_code' dir='ltr'&gt;revisions_chats($id_chat)&lt;/code&gt; qui va appliquer les modifications.&lt;/li&gt;&lt;li&gt; &lt;code class='spip_code' dir='ltr'&gt;insert_chat()&lt;/code&gt; cr&#233;e un nouvel enregistrement de chat, en appelant juste avant le pipeline &#171; pre_insertion &#187;.&lt;/li&gt;&lt;li&gt; &lt;code class='spip_code' dir='ltr'&gt;revisions_chats($id_chat)&lt;/code&gt;, r&#233;cup&#232;re les champs post&#233;s du formulaire, puis appelle la fonction g&#233;n&#233;rique &#171; modifier_contenu &#187; en passant le nom de la table, l'identifiant, et les champs &#224; modifier. Cette fonction appellera automatiquement les pipelines &#171; pre_edition &#187; et &#171; post_edition &#187;. Peu connu, on peut aussi lui passer en param&#232;tre d'option la cl&#233; pour invalider le cache en m&#234;me temps.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Voici le contenu de ce fichier :&lt;/p&gt;
&lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.php .imp {font-weight: bold; color: red;}
.php .kw1 {color: #b1b100;}
.php .kw2 {color: #000000; font-weight: bold;}
.php .kw3 {color: #990000;}
.php .kw4 {color: #009900; font-weight: bold;}
.php .co1 {color: #666666; font-style: italic;}
.php .co2 {color: #666666; font-style: italic;}
.php .co3 {color: #0000cc; font-style: italic;}
.php .co4 {color: #009933; font-style: italic;}
.php .coMULTI {color: #666666; font-style: italic;}
.php .es0 {color: #000099; font-weight: bold;}
.php .es1 {color: #000099; font-weight: bold;}
.php .es2 {color: #660099; font-weight: bold;}
.php .es3 {color: #660099; font-weight: bold;}
.php .es4 {color: #006699; font-weight: bold;}
.php .es5 {color: #006699; font-weight: bold; font-style: italic;}
.php .es6 {color: #009933; font-weight: bold;}
.php .es_h {color: #000099; font-weight: bold;}
.php .br0 {color: #009900;}
.php .sy0 {color: #339933;}
.php .sy1 {color: #000000; font-weight: bold;}
.php .st0 {color: #0000ff;}
.php .st_h {color: #0000ff;}
.php .nu0 {color: #cc66cc;}
.php .nu8 {color: #208080;}
.php .nu12 {color: #208080;}
.php .nu19 {color:#800080;}
.php .me1 {color: #004000;}
.php .me2 {color: #004000;}
.php .re0 {color: #000088;}
.php span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;div class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;&lt;?php&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/defined&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;defined&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&quot;_ECRIRE_INC_VERSION&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; action_editer_chat_dist&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$securiser_action&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; charger_fonction&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'securiser_action'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'inc'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$arg&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$securiser_action&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;co1&quot;&gt;// pas de chat ? on en cree un nouveau, mais seulement si 'oui' en argument.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$id_chat&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/intval&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;intval&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$arg&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$arg&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'oui'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; include_spip&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'inc/headers'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; redirige_url_ecrire&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$id_chat&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; insert_chat&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$id_chat&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$err&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; revisions_chats&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$id_chat&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$id_chat&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$err&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; insert_chat&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$champs&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;st_h&quot;&gt;'nom'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; _T&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'chats:item_nouveau_chat'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;co1&quot;&gt;// Envoyer aux plugins&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$champs&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; pipeline&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'pre_insertion'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;st_h&quot;&gt;'args'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;st_h&quot;&gt;'table'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'spip_chats'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;st_h&quot;&gt;'data'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$champs&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$id_chat&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; sql_insertq&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&quot;spip_chats&quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$champs&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$id_chat&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;co1&quot;&gt;// Enregistrer certaines modifications d'un chat&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; revisions_chats&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$id_chat&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$c&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;co1&quot;&gt;// recuperer les champs dans POST s'ils ne sont pas transmis&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$c&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$c&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'nom'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'race'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'robe'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'annee_naissance'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'infos'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$champ&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$a&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; _request&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$champ&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!==&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$c&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$champ&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$a&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; include_spip&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'inc/modifier'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; modifier_contenu&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'chat'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$id_chat&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;st_h&quot;&gt;'nonvide'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'nom'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; _T&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'info_sans_titre'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;st_h&quot;&gt;'invalideur'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&quot;id='id_chat/&lt;span class=&quot;es4&quot;&gt;$id_chat&lt;/span&gt;'&quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$c&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;sy1&quot;&gt;?&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/74c391643b4b19afa85bab0ce26b232b.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;h3 class='h3 spip'&gt;Cr&#233;ation de l'action de suppression&lt;/h3&gt;
&lt;p&gt;L'action de suppression n&#233;cessite de cr&#233;er un fichier &lt;code class='spip_code' dir='ltr'&gt;action/supprimer_chat.php&lt;/code&gt; qui va r&#233;aliser la suppression apr&#232;s avoir v&#233;rifi&#233; que l'argument attendu est correct.&lt;/p&gt; &lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.php .imp {font-weight: bold; color: red;}
.php .kw1 {color: #b1b100;}
.php .kw2 {color: #000000; font-weight: bold;}
.php .kw3 {color: #990000;}
.php .kw4 {color: #009900; font-weight: bold;}
.php .co1 {color: #666666; font-style: italic;}
.php .co2 {color: #666666; font-style: italic;}
.php .co3 {color: #0000cc; font-style: italic;}
.php .co4 {color: #009933; font-style: italic;}
.php .coMULTI {color: #666666; font-style: italic;}
.php .es0 {color: #000099; font-weight: bold;}
.php .es1 {color: #000099; font-weight: bold;}
.php .es2 {color: #660099; font-weight: bold;}
.php .es3 {color: #660099; font-weight: bold;}
.php .es4 {color: #006699; font-weight: bold;}
.php .es5 {color: #006699; font-weight: bold; font-style: italic;}
.php .es6 {color: #009933; font-weight: bold;}
.php .es_h {color: #000099; font-weight: bold;}
.php .br0 {color: #009900;}
.php .sy0 {color: #339933;}
.php .sy1 {color: #000000; font-weight: bold;}
.php .st0 {color: #0000ff;}
.php .st_h {color: #0000ff;}
.php .nu0 {color: #cc66cc;}
.php .nu8 {color: #208080;}
.php .nu12 {color: #208080;}
.php .nu19 {color:#800080;}
.php .me1 {color: #004000;}
.php .me2 {color: #004000;}
.php .re0 {color: #000088;}
.php span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;div class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;&lt;?php&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/defined&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;defined&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&quot;_ECRIRE_INC_VERSION&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; action_supprimer_chat_dist&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$securiser_action&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; charger_fonction&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'securiser_action'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'inc'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$arg&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$securiser_action&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/preg_match&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;preg_match&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&quot;,^(\d+)$,&quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$arg&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$r&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; spip_log&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&quot;action_supprimer_chat_dist &lt;span class=&quot;es4&quot;&gt;$arg&lt;/span&gt; pas compris&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; action_supprimer_chat_post&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$r&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; action_supprimer_chat_post&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$id_chat&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; sql_delete&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&quot;spip_chats&quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&quot;id_chat=&quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; sql_quote&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$id_chat&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; include_spip&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'inc/invalideur'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; suivre_invalideur&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&quot;id='id_chat/&lt;span class=&quot;es4&quot;&gt;$id_chat&lt;/span&gt;'&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;sy1&quot;&gt;?&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/e9c060467403c8b82d2a2047104b7d58.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;h3 class='h3 spip'&gt;Interface avec &#171; Champs Extras 2 &#187;&lt;/h3&gt;
&lt;p&gt;Figurez-vous que c'est le plus simple maintenant, car notre objet CHAT traverse tous les pipelines qu'il faut pour que Champs Extras ins&#232;re de nouveaux champs &#224; cet objet.&lt;/p&gt; &lt;p&gt;Il suffit donc de d&#233;clarer &#224; Champs Extras que l'objet Chat peut-&#234;tre utilis&#233;. Pour cela, on d&#233;clare utiliser un pipeline dans &lt;code class='spip_code' dir='ltr'&gt;plugin.xml&lt;/code&gt;, et l'on cr&#233;e un fichier &lt;code class='spip_code' dir='ltr'&gt;chats_pipelines.php&lt;/code&gt; pour accueillir la fonction correspondante.&lt;/p&gt; &lt;p&gt;&lt;code class='spip_code' dir='ltr'&gt;plugin.xml&lt;/code&gt; :&lt;/p&gt;
&lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.xml .imp {font-weight: bold; color: red;}
.xml .es0 {color: #000099; font-weight: bold;}
.xml .br0 {color: #66cc66;}
.xml .sy0 {color: #66cc66;}
.xml .st0 {color: #ff0000;}
.xml .sc-1 {color: #808080; font-style: italic;}
.xml .sc0 {color: #00bbdd;}
.xml .sc1 {color: #ddbb00;}
.xml .sc2 {color: #339933;}
.xml .sc3 {color: #009900;}
.xml .re0 {color: #000066;}
.xml .re1 {color: #000000; font-weight: bold;}
.xml .re2 {color: #000000; font-weight: bold;}
.xml span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_xml cadre&quot;&gt;&lt;div class=&quot;xml&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;sc-1&quot;&gt;&lt;!-- avec plugin champs extras 2 --&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;pipeline&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;nom&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;objets_extensibles&lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;/nom&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;inclure&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;chats_pipelines.php&lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;/inclure&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;/pipeline&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/174fd9fd40ca60e85d6a67fc51918f06.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;code class='spip_code' dir='ltr'&gt;chats_pipelines.php&lt;/code&gt; :&lt;/p&gt;
&lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.php .imp {font-weight: bold; color: red;}
.php .kw1 {color: #b1b100;}
.php .kw2 {color: #000000; font-weight: bold;}
.php .kw3 {color: #990000;}
.php .kw4 {color: #009900; font-weight: bold;}
.php .co1 {color: #666666; font-style: italic;}
.php .co2 {color: #666666; font-style: italic;}
.php .co3 {color: #0000cc; font-style: italic;}
.php .co4 {color: #009933; font-style: italic;}
.php .coMULTI {color: #666666; font-style: italic;}
.php .es0 {color: #000099; font-weight: bold;}
.php .es1 {color: #000099; font-weight: bold;}
.php .es2 {color: #660099; font-weight: bold;}
.php .es3 {color: #660099; font-weight: bold;}
.php .es4 {color: #006699; font-weight: bold;}
.php .es5 {color: #006699; font-weight: bold; font-style: italic;}
.php .es6 {color: #009933; font-weight: bold;}
.php .es_h {color: #000099; font-weight: bold;}
.php .br0 {color: #009900;}
.php .sy0 {color: #339933;}
.php .sy1 {color: #000000; font-weight: bold;}
.php .st0 {color: #0000ff;}
.php .st_h {color: #0000ff;}
.php .nu0 {color: #cc66cc;}
.php .nu8 {color: #208080;}
.php .nu12 {color: #208080;}
.php .nu19 {color:#800080;}
.php .me1 {color: #004000;}
.php .me2 {color: #004000;}
.php .re0 {color: #000088;}
.php span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;div class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;&lt;?php&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; chats_objets_extensibles&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$objets&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array_merge&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array_merge&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$objets&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'chat'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; _T&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'chats:chats'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;sy1&quot;&gt;?&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/ae81eb7981002ec81bfcc301750d8cb9.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;dl class='spip_document_240 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH358/champs_extras_chats-25d02.png' width='500' height='358' alt='PNG - 21.1 ko' style='height:358px;width:500px;' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-240 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Champs Extras des Chats&lt;/strong&gt;&lt;/dt&gt;
&lt;dd class='crayon document-descriptif-240 spip_doc_descriptif' style='width:350px;'&gt;Liste des champs extras d&#233;clar&#233;s.
&lt;/dd&gt;
&lt;/dl&gt;
&lt;dl class='spip_document_242 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH854/edition_chat_extra-cd644.png' width='500' height='854' alt='PNG - 29.3 ko' style='height:854px;width:500px;' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-242 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Edition d'un chat avec extras&lt;/strong&gt;&lt;/dt&gt;
&lt;/dl&gt;
&lt;dl class='spip_document_245 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH181/vue_extra-1e381.png' width='500' height='181' alt='PNG - 16.9 ko' style='height:181px;width:500px;' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-245 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Vue du chat avec extra&lt;/strong&gt;&lt;/dt&gt;
&lt;/dl&gt;
&lt;h3 class='h3 spip'&gt;Conclusions&lt;/h3&gt;
&lt;p&gt;Cet objet &#171; Chat &#187; tr&#232;s sommaire montre que r&#233;aliser l'interface et l'outil de modification n&#233;cessite encore beaucoup de code et de squelettes SPIP. Cependant, cr&#233;er un nouvel objet est possible et de nombreuses fonctions de l'API de SPIP 2.0 permettent un gain de temps appr&#233;ciable.&lt;/p&gt; &lt;p&gt;Le chemin parcouru par SPIP en quelques temps est bien visible mais il reste encore des outils qui m&#233;riteraient d'&#234;tre simplifi&#233;es et am&#233;lior&#233;es, comme cr&#233;er une fonction &lt;code class='spip_code' dir='ltr'&gt;inserer_contenu($objet, $champs)&lt;/code&gt; pour la cr&#233;ation d'&#233;l&#233;ments, ou encore &lt;code class='spip_code' dir='ltr'&gt;$c = recuperer_champs_post($noms)&lt;/code&gt;. Je n'ai pas r&#233;ussi, sans chercher non plus, si on avait un moyen de cr&#233;er un fil d'ariane sur les pages exec en squelette, mais je n'ai pas ce souvenir.&lt;/p&gt; &lt;p&gt;Tout cela m'a entre autre permis de distinguer qu'un plugin &#171; Tables Extras &#187; est difficilement envisageable encore sans faire &#233;crire du code, mais en m&#234;me temps que des parties pourraient se r&#233;aliser automatiquement.&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_ps'&gt;&lt;p&gt;Le plugin est pr&#233;sent sur la Zone de SPIP ici : &lt;a href='http://zone.spip.org/trac/spip-zone/browser/_plugins_/chats' class='spip_out' rel='nofollow external'&gt;http://zone.spip.org/trac/spip-zone...&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
		</content:encoded>


		
		<enclosure url="http://marcimat.magraine.net/IMG/zip/plugin_chats.zip" length="22900" type="application/zip" />
		

	</item>
<item xml:lang="fr">
		<title>Squelettes SPIP &#224; layout unique</title>
		<link>http://marcimat.magraine.net/Squelettes-SPIP-a-layout-unique</link>
		<guid isPermaLink="true">http://marcimat.magraine.net/Squelettes-SPIP-a-layout-unique</guid>
		<dc:date>2009-06-27T14:29:45Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>Matthieu Marcillaud</dc:creator>



		<description>
&lt;p&gt;Les possibilit&#233;s de SPIP 2.0 permettent, gr&#226;ce - entre autre - au crit&#232;re env, d'&#233;crire des jeux de squelettes dont la structure HTML est indiqu&#233;e dans un unique fichier. Historique Des squelettes pour SPIP 1.9 avaient d&#233;j&#224; une structure proche ; c'est le cas de SPIP Clear. SPIP 2.0 a introduit un crit&#232;re nomm&#233; &#171; env &#187; qui permet de passer tout l'environnement d'un squelette &#224; un autre. Dans l'article l'apr&#232;s SPIP 2.0 C&#233;dric propose de modifier les squelettes fournis avec SPIP pour utiliser... Le (...)&lt;/p&gt;


-
&lt;a href="http://marcimat.magraine.net/-Semences-SPIP-" rel="directory"&gt;Semences SPIP&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_chapo'&gt;&lt;p&gt;Les possibilit&#233;s de SPIP 2.0 permettent, gr&#226;ce - entre autre - au crit&#232;re &lt;code class='spip_code' dir='ltr'&gt;{env}&lt;/code&gt;, d'&#233;crire des jeux de squelettes dont la structure HTML est indiqu&#233;e dans un unique fichier.&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;h3 class='h3 spip'&gt;Historique&lt;/h3&gt;
&lt;p&gt;Des squelettes pour SPIP 1.9 avaient d&#233;j&#224; une structure proche ; c'est le cas de &lt;a href='http://www.spip-contrib.net/Spip-Clear' class='spip_out' rel='external'&gt;SPIP Clear&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;SPIP 2.0 a introduit un crit&#232;re nomm&#233; &#171; env &#187; qui permet de passer tout l'environnement d'un squelette &#224; un autre.&lt;/p&gt; &lt;p&gt;Dans l'article &lt;a href='http://www.spip-contrib.net/L-apres-SPIP-2' class='spip_out' rel='external'&gt;l'apr&#232;s SPIP 2.0&lt;/a&gt; C&#233;dric propose de modifier les squelettes fournis avec SPIP pour utiliser...&lt;/p&gt; &lt;h3 class='h3 spip'&gt;Le crit&#232;re ENV&lt;/h3&gt;
&lt;p&gt;Le crit&#232;re &lt;code class='spip_code' dir='ltr'&gt;{env}&lt;/code&gt; transmet toutes les informations d'environnement d'un squelette &#224; un autre.&lt;/p&gt; &lt;p&gt;Si un squelette X.html re&#231;oit les informations &#171; id_rubrique &#187;, &#171; id_article &#187; et &#171; lang &#187;, alors il peut inclure un autre squelette en transmettant ces param&#232;tres de la sorte :&lt;/p&gt; &lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.spip2 .imp {font-weight: bold; color: red;}
.spip2 .coMULTI {color: #808080; font-style: italic;}
.spip2 .es0 {color: #000099; font-weight: bold;}
.spip2 .re0 {color: #E1861A;}
.spip2 .re1 {color: #CA5200;}
.spip2 .re2 {color: #e72;}
.spip2 .re10 {color: #527EE0;}
.spip2 .re11 {color: #222;}
.spip2 .re12 {color: #745E4B;}
.spip2 .re13 {color: #222;}
.spip2 .re20 {color: #527EE0;}
.spip2 .re21 {color: #222}
.spip2 .re22 {color: #745E4B;}
.spip2 .re23 {color: #222;}
.spip2 .re30 {color: #C90}
.spip2 .re31 {color: #C90}
.spip2 .re40 {color: #74B900;}
.spip2 .re50 {color: #E1861A;}
.spip2 span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re21&quot;&gt;&lt;INCLURE&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;fond=pages/entete&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;id_rubrique&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;id_article&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;lang&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt; /&lt;/span&gt;&lt;span class=&quot;re23&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Avec le crit&#232;re &lt;code class='spip_code' dir='ltr'&gt;{env}&lt;/code&gt;, cela donne, pour le m&#234;me comportement :&lt;/p&gt;
&lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.spip2 .imp {font-weight: bold; color: red;}
.spip2 .coMULTI {color: #808080; font-style: italic;}
.spip2 .es0 {color: #000099; font-weight: bold;}
.spip2 .re0 {color: #E1861A;}
.spip2 .re1 {color: #CA5200;}
.spip2 .re2 {color: #e72;}
.spip2 .re10 {color: #527EE0;}
.spip2 .re11 {color: #222;}
.spip2 .re12 {color: #745E4B;}
.spip2 .re13 {color: #222;}
.spip2 .re20 {color: #527EE0;}
.spip2 .re21 {color: #222}
.spip2 .re22 {color: #745E4B;}
.spip2 .re23 {color: #222;}
.spip2 .re30 {color: #C90}
.spip2 .re31 {color: #C90}
.spip2 .re40 {color: #74B900;}
.spip2 .re50 {color: #E1861A;}
.spip2 span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re21&quot;&gt;&lt;INCLURE&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;fond=pages/entete&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;env&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt; /&lt;/span&gt;&lt;span class=&quot;re23&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Avantages :&lt;/strong&gt;&lt;/p&gt; &lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; &#233;criture plus courte !&lt;/li&gt;&lt;li&gt; tout est transmis : pas besoin de r&#233;fl&#233;chir !&lt;/li&gt;&lt;li&gt; la pagination fonctionne (pas besoin de &lt;code class='spip_code' dir='ltr'&gt;{self=#SELF}&lt;/code&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Inconv&#233;nient :&lt;/strong&gt;&lt;/p&gt; &lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; tout est transmis ! Ainsi, si des param&#232;tres sont inutiles au squelette qui est appel&#233;, il y aura quand m&#234;me un cache sp&#233;cifique de cr&#233;&#233; si ce param&#232;tre inutile varie. Si on appelle : &lt;code class='spip_code' dir='ltr'&gt;?page=X&amp;id_article=3&amp;id_mot=5&lt;/code&gt; dans l'URL, le param&#232;tre &lt;code class='spip_code' dir='ltr'&gt;id_mot&lt;/code&gt;, d'apr&#232;s la premi&#232;re &#233;criture est inutile &#224; l'inclusion. Pourtant, avec le crit&#232;re &lt;code class='spip_code' dir='ltr'&gt;{env}&lt;/code&gt;, il y aura autant de caches g&#233;n&#233;r&#233;s que de variation de la valeur de &lt;code class='spip_code' dir='ltr'&gt;id_mot&lt;/code&gt;.&lt;/li&gt;&lt;/ul&gt;
&lt;h3 class='h3 spip'&gt;Un gabarit de page d&#233;finit une seule fois (layout unique)&lt;/h3&gt;
&lt;p&gt;Dans la distribution actuelle de SPIP 2.0, les squelettes par d&#233;faut (le r&#233;pertoire &lt;code class='spip_code' dir='ltr'&gt;squelettes-dist&lt;/code&gt;) contient pour chaque objet (article, rubrique, sommaire, mot...) une description des blocs HTML utilis&#233;s, sur la base de layout gala.&lt;/p&gt; &lt;p&gt;Pour une raison X ou Y, si quelqu'un veut modifier pour son squelette cette structure HTML - ce qu'on appelle souvent layout ou gabarit - il doit modifier tous les fichiers article.html, rubrique.html, mot.html... pour tenir compte de ce changement.&lt;/p&gt; &lt;p&gt;En fait, le code g&#233;n&#233;rant la structure HTML est dupliqu&#233; autant de fois qu'il y a de type de page sur le site.&lt;/p&gt; &lt;p&gt;On peut avec le crit&#232;re &lt;code class='spip_code' dir='ltr'&gt;{env}&lt;/code&gt; faire tout autrement pour ne conserver qu'un seul fichier g&#233;n&#233;rant la structure (une seule fois le code), pour peu qu'on ait un peu d'organisation !&lt;/p&gt; &lt;p&gt;Prenons &lt;code class='spip_code' dir='ltr'&gt;plan.html&lt;/code&gt; et revisitons le. Il va simplement inclure un fichier &#171; pages/layout.html &#187; (ou tout autre nom qui vous convient) en transmettant un argument en plus : le type de page appel&#233;.&lt;/p&gt; &lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.spip2 .imp {font-weight: bold; color: red;}
.spip2 .coMULTI {color: #808080; font-style: italic;}
.spip2 .es0 {color: #000099; font-weight: bold;}
.spip2 .re0 {color: #E1861A;}
.spip2 .re1 {color: #CA5200;}
.spip2 .re2 {color: #e72;}
.spip2 .re10 {color: #527EE0;}
.spip2 .re11 {color: #222;}
.spip2 .re12 {color: #745E4B;}
.spip2 .re13 {color: #222;}
.spip2 .re20 {color: #527EE0;}
.spip2 .re21 {color: #222}
.spip2 .re22 {color: #745E4B;}
.spip2 .re23 {color: #222;}
.spip2 .re30 {color: #C90}
.spip2 .re31 {color: #C90}
.spip2 .re40 {color: #74B900;}
.spip2 .re50 {color: #E1861A;}
.spip2 span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re21&quot;&gt;&lt;INCLURE&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;fond=pages/layout&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;env&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;type=plan&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt; /&lt;/span&gt;&lt;span class=&quot;re23&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Le fichier &#171; layout.html &#187; va utiliser ce param&#232;tre suppl&#233;mentaire pour appeler ensuite d'autres inclusions. Voyons &#224; quoi il peut ressembler :&lt;/p&gt; &lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.spip2 .imp {font-weight: bold; color: red;}
.spip2 .coMULTI {color: #808080; font-style: italic;}
.spip2 .es0 {color: #000099; font-weight: bold;}
.spip2 .re0 {color: #E1861A;}
.spip2 .re1 {color: #CA5200;}
.spip2 .re2 {color: #e72;}
.spip2 .re10 {color: #527EE0;}
.spip2 .re11 {color: #222;}
.spip2 .re12 {color: #745E4B;}
.spip2 .re13 {color: #222;}
.spip2 .re20 {color: #527EE0;}
.spip2 .re21 {color: #222}
.spip2 .re22 {color: #745E4B;}
.spip2 .re23 {color: #222;}
.spip2 .re30 {color: #C90}
.spip2 .re31 {color: #C90}
.spip2 .re40 {color: #74B900;}
.spip2 .re50 {color: #E1861A;}
.spip2 span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML &lt;span class=&quot;nu0&quot;&gt;1.0&lt;/span&gt; Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;html xmlns=&quot;http://www.w3.org/&lt;span class=&quot;nu0&quot;&gt;1999&lt;/span&gt;/xhtml&quot; xml:lang=&quot;&lt;span class=&quot;re1&quot;&gt;#LANG&lt;/span&gt;&quot; lang=&quot;&lt;span class=&quot;re1&quot;&gt;#LANG&lt;/span&gt;&quot; dir=&quot;&lt;span class=&quot;re1&quot;&gt;#LANG_DIR&lt;/span&gt;&quot;&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;head&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re21&quot;&gt;&lt;INCLURE&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;fond=pages/inc-head&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/span&gt; /&lt;/span&gt;&lt;span class=&quot;re23&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re21&quot;&gt;&lt;INCLURE&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;fond=pages/head/&lt;span class=&quot;re1&quot;&gt;#ENV&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;type&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;env&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/span&gt; /&lt;/span&gt;&lt;span class=&quot;re23&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;/head&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re11&quot;&gt;&lt;body class=&quot;page_&lt;span class=&quot;re1&quot;&gt;#ENV&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;type&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/span&gt;&quot;&lt;/span&gt;&lt;span class=&quot;re13&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;div id=&quot;page&quot;&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;div id=&quot;entete&quot;&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re21&quot;&gt;&lt;INCLURE&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;fond=pages/inc-entete&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/span&gt; /&lt;/span&gt;&lt;span class=&quot;re23&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;div id=&quot;conteneur&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;div id=&quot;contenu&quot;&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re21&quot;&gt;&lt;INCLURE&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;fond=pages/contenu/&lt;span class=&quot;re1&quot;&gt;#ENV&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;type&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;env&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/span&gt; /&lt;/span&gt;&lt;span class=&quot;re23&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;div id=&quot;navigation&quot;&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re21&quot;&gt;&lt;INCLURE&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;fond=pages/inc-navigation&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;id_rubrique&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;id_article&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/span&gt; /&lt;/span&gt;&lt;span class=&quot;re23&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re21&quot;&gt;&lt;INCLURE&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;fond=pages/extra/&lt;span class=&quot;re1&quot;&gt;#ENV&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;type&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;env&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/span&gt; /&lt;/span&gt;&lt;span class=&quot;re23&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;div id=&quot;pied&quot;&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re21&quot;&gt;&lt;INCLURE&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;fond=pages/inc-pied&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/span&gt; /&lt;/span&gt;&lt;span class=&quot;re23&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re1&quot;&gt;#SPIP_CRON&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re11&quot;&gt;&lt;/body&lt;/span&gt;&lt;span class=&quot;re13&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;/html&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/44fce2b074cfa47528bb5f5092756e84.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;h3 class='h3 spip'&gt;Quelques d&#233;tails du fichier de structure&lt;/h3&gt;
&lt;p&gt;Ce fichier, dans cet exemple, d&#233;finit le DOCTYPE des pages g&#233;n&#233;r&#233;es. Les m&#233;ta-informations, entre les balises &lt;code class='spip_code' dir='ltr'&gt;&lt;head&gt;&lt;/code&gt; et &lt;code class='spip_code' dir='ltr'&gt;&lt;/head&gt;&lt;/code&gt; sont ajout&#233;es par deux inclusions : une inclusion g&#233;n&#233;rique quelque soit la page, via :&lt;/p&gt; &lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.spip2 .imp {font-weight: bold; color: red;}
.spip2 .coMULTI {color: #808080; font-style: italic;}
.spip2 .es0 {color: #000099; font-weight: bold;}
.spip2 .re0 {color: #E1861A;}
.spip2 .re1 {color: #CA5200;}
.spip2 .re2 {color: #e72;}
.spip2 .re10 {color: #527EE0;}
.spip2 .re11 {color: #222;}
.spip2 .re12 {color: #745E4B;}
.spip2 .re13 {color: #222;}
.spip2 .re20 {color: #527EE0;}
.spip2 .re21 {color: #222}
.spip2 .re22 {color: #745E4B;}
.spip2 .re23 {color: #222;}
.spip2 .re30 {color: #C90}
.spip2 .re31 {color: #C90}
.spip2 .re40 {color: #74B900;}
.spip2 .re50 {color: #E1861A;}
.spip2 span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re21&quot;&gt;&lt;INCLURE&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;fond=pages/inc-head&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt; /&lt;/span&gt;&lt;span class=&quot;re23&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Cette inclusion ajoute par exemple les liens vers les fichiers CSS et vers la librairie jQuery &#224; travers la balise &lt;code class='spip_code' dir='ltr'&gt;#INSERT_HEAD&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;Puis une inclusion sp&#233;cifique en fonction du type de page demand&#233; ajoute des informations particuli&#232;res (souvent le titre et la description, parfois des Javascript suppl&#233;mentaires). Le nom du fichier est calcul&#233; gr&#226;ce &#224; la balise &lt;code class='spip_code' dir='ltr'&gt;#ENV{type}&lt;/code&gt; :&lt;/p&gt; &lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.spip2 .imp {font-weight: bold; color: red;}
.spip2 .coMULTI {color: #808080; font-style: italic;}
.spip2 .es0 {color: #000099; font-weight: bold;}
.spip2 .re0 {color: #E1861A;}
.spip2 .re1 {color: #CA5200;}
.spip2 .re2 {color: #e72;}
.spip2 .re10 {color: #527EE0;}
.spip2 .re11 {color: #222;}
.spip2 .re12 {color: #745E4B;}
.spip2 .re13 {color: #222;}
.spip2 .re20 {color: #527EE0;}
.spip2 .re21 {color: #222}
.spip2 .re22 {color: #745E4B;}
.spip2 .re23 {color: #222;}
.spip2 .re30 {color: #C90}
.spip2 .re31 {color: #C90}
.spip2 .re40 {color: #74B900;}
.spip2 .re50 {color: #E1861A;}
.spip2 span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re21&quot;&gt;&lt;INCLURE&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;fond=pages/head/&lt;span class=&quot;re1&quot;&gt;#ENV&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;type&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;env&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt; /&lt;/span&gt;&lt;span class=&quot;re23&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Cette seconde inclusion appelle donc, pour notre exemple, le fichier &#171; pages/head/plan.html &#187;. Il contient peu de chose :&lt;/p&gt; &lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.spip2 .imp {font-weight: bold; color: red;}
.spip2 .coMULTI {color: #808080; font-style: italic;}
.spip2 .es0 {color: #000099; font-weight: bold;}
.spip2 .re0 {color: #E1861A;}
.spip2 .re1 {color: #CA5200;}
.spip2 .re2 {color: #e72;}
.spip2 .re10 {color: #527EE0;}
.spip2 .re11 {color: #222;}
.spip2 .re12 {color: #745E4B;}
.spip2 .re13 {color: #222;}
.spip2 .re20 {color: #527EE0;}
.spip2 .re21 {color: #222}
.spip2 .re22 {color: #745E4B;}
.spip2 .re23 {color: #222;}
.spip2 .re30 {color: #C90}
.spip2 .re31 {color: #C90}
.spip2 .re40 {color: #74B900;}
.spip2 .re50 {color: #E1861A;}
.spip2 span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;title&gt;&lt;span class=&quot;re30&quot;&gt;&lt;:plan_site:&gt;&lt;/span&gt; - &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#NOM_SITE_SPIP&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|textebrut&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/title&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;meta name=&quot;description&quot; content=&quot;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#DESCRIPTIF_SITE_SPIP&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|couper&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;150&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|attribut_html&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&quot; /&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;meta name=&quot;robots&quot; content=&quot;none&quot; /&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/6bb13d04cf7f3221cdd94ee481f8e7f4.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Le reste n'a donc plus de secret : entre les balises &lt;code class='spip_code' dir='ltr'&gt;&lt;body&gt;&lt;/code&gt; et &lt;code class='spip_code' dir='ltr'&gt;&lt;/body&gt;&lt;/code&gt; se trouve uniquement la structure HTML et des inclusions, de la m&#234;me forme que dans le &lt;code class='spip_code' dir='ltr'&gt;&lt;head&gt;&lt;/code&gt;.&lt;/p&gt; &lt;h3 class='h3 spip'&gt;Organisation des dossiers (squelette Zesty)&lt;/h3&gt;
&lt;p&gt;La page de structure du code HTML appelle un certain nombre d'inclusions. Elles sont rang&#233;es dans des sous r&#233;pertoires pr&#233;alablement choisis. Dans le cas de Zesty, on retrouve dans le r&#233;pertoire &lt;code class='spip_code' dir='ltr'&gt;pages/&lt;/code&gt;, les r&#233;pertoires &lt;code class='spip_code' dir='ltr'&gt;head/&lt;/code&gt;, &lt;code class='spip_code' dir='ltr'&gt;navigation/&lt;/code&gt; et &lt;code class='spip_code' dir='ltr'&gt;contenu/&lt;/code&gt; ce qui donne une arborescence comme ceci :&lt;/p&gt; &lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; article.html&lt;/li&gt;&lt;li&gt; rubrique.html&lt;/li&gt;&lt;li&gt; ...&lt;/li&gt;&lt;li&gt; pages/&lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; layout.html&lt;/li&gt;&lt;li&gt; head/&lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; article.html&lt;/li&gt;&lt;li&gt; rubrique.html&lt;/li&gt;&lt;li&gt; ...&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt; contenu/&lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; article.html&lt;/li&gt;&lt;li&gt; rubrique.html&lt;/li&gt;&lt;li&gt; ...&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt; navigation/&lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; article.html&lt;/li&gt;&lt;li&gt; rubrique.html&lt;/li&gt;&lt;li&gt; ...&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;h3 class='h3 spip'&gt;Cas particuliers des objets et des 404&lt;/h3&gt;
&lt;p&gt;SPIP appelle automatiquement la page 404 lorsqu'aucun contenu n'est g&#233;n&#233;r&#233; par la page demand&#233;e. Dans le cas des articles par exemple, si l'on appelle directement le fichier de structure, un contenu HTML sera g&#233;n&#233;r&#233;, m&#234;me si aucun article n'est pr&#233;sent. Il faut donc conditionner l'inclusion de la structure &#224; la pr&#233;sence de l'article, en la mettant dans une boucle. Il r&#233;sulte un fichier &lt;code class='spip_code' dir='ltr'&gt;article.html&lt;/code&gt; comme ceci :&lt;/p&gt; &lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.spip2 .imp {font-weight: bold; color: red;}
.spip2 .coMULTI {color: #808080; font-style: italic;}
.spip2 .es0 {color: #000099; font-weight: bold;}
.spip2 .re0 {color: #E1861A;}
.spip2 .re1 {color: #CA5200;}
.spip2 .re2 {color: #e72;}
.spip2 .re10 {color: #527EE0;}
.spip2 .re11 {color: #222;}
.spip2 .re12 {color: #745E4B;}
.spip2 .re13 {color: #222;}
.spip2 .re20 {color: #527EE0;}
.spip2 .re21 {color: #222}
.spip2 .re22 {color: #745E4B;}
.spip2 .re23 {color: #222;}
.spip2 .re30 {color: #C90}
.spip2 .re31 {color: #C90}
.spip2 .re40 {color: #74B900;}
.spip2 .re50 {color: #E1861A;}
.spip2 span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re11&quot;&gt;&lt;BOUCLE_principale_article&lt;span class=&quot;re10&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;ARTICLES&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;id_article&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re13&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re21&quot;&gt;&lt;INCLURE&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;fond=pages/layout&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;env&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;type=article&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt; /&lt;/span&gt;&lt;span class=&quot;re23&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re11&quot;&gt;&lt;/BOUCLE_principale_article&lt;/span&gt;&lt;span class=&quot;re13&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/3636fef585ba42ac587ce5846d5d11bc.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;De la m&#234;me mani&#232;re, la page 404 doit envoyer des ent&#234;tes particuli&#232;res. Il suffit de les ins&#233;rer avant l'appel de l'inclusion, ce qui donne pour le fichier &lt;code class='spip_code' dir='ltr'&gt;404.html&lt;/code&gt; :&lt;/p&gt; &lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.spip2 .imp {font-weight: bold; color: red;}
.spip2 .coMULTI {color: #808080; font-style: italic;}
.spip2 .es0 {color: #000099; font-weight: bold;}
.spip2 .re0 {color: #E1861A;}
.spip2 .re1 {color: #CA5200;}
.spip2 .re2 {color: #e72;}
.spip2 .re10 {color: #527EE0;}
.spip2 .re11 {color: #222;}
.spip2 .re12 {color: #745E4B;}
.spip2 .re13 {color: #222;}
.spip2 .re20 {color: #527EE0;}
.spip2 .re21 {color: #222}
.spip2 .re22 {color: #745E4B;}
.spip2 .re23 {color: #222;}
.spip2 .re30 {color: #C90}
.spip2 .re31 {color: #C90}
.spip2 .re40 {color: #74B900;}
.spip2 .re50 {color: #E1861A;}
.spip2 span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re1&quot;&gt;#HTTP_HEADER&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&quot;HTTP/1.0 404 Not Found&quot;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re1&quot;&gt;#HTTP_HEADER&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&quot;Cache-Control: no-store, no-cache, must-revalidate&quot;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re1&quot;&gt;#HTTP_HEADER&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;Pragma: no-cache&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re21&quot;&gt;&lt;INCLURE&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;fond=pages/layout&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;env&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;type=404&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt; /&lt;/span&gt;&lt;span class=&quot;re23&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/3ebca86933b668706508eac0ad699cda.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;h3 class='h3 spip'&gt;De la simplicit&#233; des th&#232;mes&lt;/h3&gt;
&lt;p&gt;Souvent lorsque l'on r&#233;cup&#232;re un th&#232;me graphique sur internet, il n'a pas la m&#234;me structure HTML que celui des squelettes SPIP d'origine. Avec cette organisation de fichiers, il est bien plus facile de s'adapter : on surcharge dans un plugin ou dans son dossier squelettes les fichiers &#171; layout.html &#187; et &#171; habillage.css &#187; et voil&#224; !&lt;/p&gt; &lt;p&gt;&lt;span class='spip_document_217 spip_documents spip_documents_center'&gt;
&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH649/zesty-e9d83.png' width='500' height='649' alt=&quot;&quot; style='height:649px;width:500px;' /&gt;&lt;/span&gt;
&lt;span class='spip_document_218 spip_documents spip_documents_center'&gt;
&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH693/zesty_rose-e120b.png' width='500' height='693' alt=&quot;&quot; style='height:693px;width:500px;' /&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		
		<enclosure url="http://marcimat.magraine.net/IMG/zip/zestyzip-d45d456.zip" length="23696" type="application/zip" />
		
		<enclosure url="http://marcimat.magraine.net/IMG/zip/Zesty-avignon.zip" length="426560" type="application/zip" />
		

	</item>
<item xml:lang="fr">
		<title>Les formulaires CVT de SPIP</title>
		<link>http://marcimat.magraine.net/Les-formulaires-CVT-de-SPIP</link>
		<guid isPermaLink="true">http://marcimat.magraine.net/Les-formulaires-CVT-de-SPIP</guid>
		<dc:date>2009-06-27T09:47:01Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>Matthieu Marcillaud</dc:creator>



		<description>
&lt;p&gt;Introduction Les formulaires de SPIP 2.0 sont maintenant d&#233;coup&#233;s en 4 parties : le HTML qui g&#232;re l'affichage graphique du formulaire, la fonction charger() ins&#232;re les valeurs pr&#233;remplies, la fonction verifier() contr&#244;le les donn&#233;es soumises, la fonction traiter() ex&#233;cute les actions. La partie HTML du formulaire est &#233;crite dans le fichier formulaires/nom.html. Les 3 fonctions PHP dans le fichier formulaires/nom.php et s'appellent pr&#233;cis&#233;ment : formulaires_nom_charger_dist(), (...)&lt;/p&gt;


-
&lt;a href="http://marcimat.magraine.net/-Semences-SPIP-" rel="directory"&gt;Semences SPIP&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_texte'&gt;&lt;h3 class='h3 spip'&gt;Introduction&lt;/h3&gt;
&lt;p&gt;Les formulaires de SPIP 2.0 sont maintenant d&#233;coup&#233;s en 4 parties :&lt;/p&gt; &lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; le HTML qui g&#232;re l'affichage graphique du formulaire,&lt;/li&gt;&lt;li&gt; la fonction &lt;code class='spip_code' dir='ltr'&gt;charger()&lt;/code&gt; ins&#232;re les valeurs pr&#233;remplies,&lt;/li&gt;&lt;li&gt; la fonction &lt;code class='spip_code' dir='ltr'&gt;verifier()&lt;/code&gt; contr&#244;le les donn&#233;es soumises,&lt;/li&gt;&lt;li&gt; la fonction &lt;code class='spip_code' dir='ltr'&gt;traiter()&lt;/code&gt; ex&#233;cute les actions.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;La partie HTML du formulaire est &#233;crite dans le fichier &lt;code class='spip_code' dir='ltr'&gt;formulaires/{nom}.html&lt;/code&gt;. Les 3 fonctions PHP dans le fichier &lt;code class='spip_code' dir='ltr'&gt;formulaires/{nom}.php&lt;/code&gt; et s'appellent pr&#233;cis&#233;ment :&lt;/p&gt; &lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; &lt;code class='spip_code' dir='ltr'&gt;formulaires_{nom}_charger_dist()&lt;/code&gt;,&lt;/li&gt;&lt;li&gt; &lt;code class='spip_code' dir='ltr'&gt;formulaires_{nom}_verifier_dist()&lt;/code&gt;,&lt;/li&gt;&lt;li&gt; &lt;code class='spip_code' dir='ltr'&gt;formulaires_{nom}_traiter_dist()&lt;/code&gt;.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Le formulaire s'appelle dans un squelette SPIP par la balise &lt;code class='spip_code' dir='ltr'&gt;#FORMULAIRE_{NOM}&lt;/code&gt;, par exemple &lt;code class='spip_code' dir='ltr'&gt;#FORMULAIRE_PIPOTIN&lt;/code&gt;&lt;/p&gt; &lt;h3 class='h3 spip'&gt;Projet exemple : traduire via google&lt;/h3&gt;
&lt;p&gt;Nous avons besoin d'un formulaire disposant d'un champ texte, dont le contenu sera traduit en anglais en utilisant l'API de Google Translate au moment de la soumission.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;HTML&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;La partie HTML ressemble &#224; &#231;&#224; :&lt;/p&gt;
&lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.spip2 .imp {font-weight: bold; color: red;}
.spip2 .coMULTI {color: #808080; font-style: italic;}
.spip2 .es0 {color: #000099; font-weight: bold;}
.spip2 .re0 {color: #E1861A;}
.spip2 .re1 {color: #CA5200;}
.spip2 .re2 {color: #e72;}
.spip2 .re10 {color: #527EE0;}
.spip2 .re11 {color: #222;}
.spip2 .re12 {color: #745E4B;}
.spip2 .re13 {color: #222;}
.spip2 .re20 {color: #527EE0;}
.spip2 .re21 {color: #222}
.spip2 .re22 {color: #745E4B;}
.spip2 .re23 {color: #222;}
.spip2 .re30 {color: #C90}
.spip2 .re31 {color: #C90}
.spip2 .re40 {color: #74B900;}
.spip2 .re50 {color: #E1861A;}
.spip2 span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;div class=&quot;formulaire_spip formulaire_pipotin&quot;&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;p class=&quot;reponse_formulaire reponse_formulaire_erreur&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#ENV&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;message_erreur&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/p&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;p class=&quot;reponse_formulaire reponse_formulaire_ok&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#ENV&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;message_ok&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/p&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;form action=&quot;&lt;span class=&quot;re1&quot;&gt;#ENV&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;action&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&quot; method=&quot;post&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re1&quot;&gt;#ACTION_FORMULAIRE&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#ENV&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;action&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;ul&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re1&quot;&gt;#SET&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;erreurs,&lt;span class=&quot;re1&quot;&gt;#ENV&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;**&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;erreurs&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|table_valeur&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;traduire&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;li class=&quot;editer_traduire obligatoire&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#GET&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;erreurs&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|oui&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;erreur&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&quot;&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;label for=&quot;traduire&quot;&gt;Traduire&lt;/label&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class='erreur_message'&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#GET&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;erreurs&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;textarea name='traduire' id='champ_traduire'&gt;&lt;span class=&quot;re1&quot;&gt;#ENV&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;traduire&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/li&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re1&quot;&gt;#SET&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;erreurs,&lt;span class=&quot;re1&quot;&gt;#ENV&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;**&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;erreurs&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|table_valeur&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;traduction&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;li class=&quot;editer_traduction&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#GET&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;erreurs&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|oui&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;erreur&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&quot;&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;label for=&quot;traduction&quot;&gt;Traduction&lt;/label&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class='erreur_message'&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#GET&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;erreurs&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;textarea name='traduction' id='champ_traduction'&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#ENV&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;traduction&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/li&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/ul&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;p class=&quot;boutons&quot;&gt;&lt;input type=&quot;submit&quot; class=&quot;submit&quot; value=&quot;&lt;span class=&quot;re30&quot;&gt;&lt;:pass_ok:&gt;&lt;/span&gt;&quot; /&gt;&lt;/p&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;/div&gt;&lt;/form&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/5e543caac3bcf5ca846340c3043bc41b.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Analysons le code pour comprendre. Il y a plusieurs &#233;l&#233;ments. D'une part le code est encadr&#233; dans une balise &lt;code class='spip_code' dir='ltr'&gt;&lt;div&gt;&lt;/code&gt; ayant une classe CSS g&#233;n&#233;rale &#171; formulaire_spip &#187; et une sp&#233;cifique &#171; formulaire_XX &#187; :&lt;/p&gt;
&lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.spip2 .imp {font-weight: bold; color: red;}
.spip2 .coMULTI {color: #808080; font-style: italic;}
.spip2 .es0 {color: #000099; font-weight: bold;}
.spip2 .re0 {color: #E1861A;}
.spip2 .re1 {color: #CA5200;}
.spip2 .re2 {color: #e72;}
.spip2 .re10 {color: #527EE0;}
.spip2 .re11 {color: #222;}
.spip2 .re12 {color: #745E4B;}
.spip2 .re13 {color: #222;}
.spip2 .re20 {color: #527EE0;}
.spip2 .re21 {color: #222}
.spip2 .re22 {color: #745E4B;}
.spip2 .re23 {color: #222;}
.spip2 .re30 {color: #C90}
.spip2 .re31 {color: #C90}
.spip2 .re40 {color: #74B900;}
.spip2 .re50 {color: #E1861A;}
.spip2 span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;div class=&quot;formulaire_spip formulaire_pipotin&quot;&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&#8230;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/d8a4e16a7456f85404126e34175a63a5.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Dedans, deux lignes servent &#224; afficher les messages de r&#233;ussite ou d'erreur :&lt;/p&gt;
&lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.spip2 .imp {font-weight: bold; color: red;}
.spip2 .coMULTI {color: #808080; font-style: italic;}
.spip2 .es0 {color: #000099; font-weight: bold;}
.spip2 .re0 {color: #E1861A;}
.spip2 .re1 {color: #CA5200;}
.spip2 .re2 {color: #e72;}
.spip2 .re10 {color: #527EE0;}
.spip2 .re11 {color: #222;}
.spip2 .re12 {color: #745E4B;}
.spip2 .re13 {color: #222;}
.spip2 .re20 {color: #527EE0;}
.spip2 .re21 {color: #222}
.spip2 .re22 {color: #745E4B;}
.spip2 .re23 {color: #222;}
.spip2 .re30 {color: #C90}
.spip2 .re31 {color: #C90}
.spip2 .re40 {color: #74B900;}
.spip2 .re50 {color: #E1861A;}
.spip2 span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;p class=&quot;reponse_formulaire reponse_formulaire_erreur&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#ENV&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;message_erreur&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/p&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;p class=&quot;reponse_formulaire reponse_formulaire_ok&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#ENV&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;message_ok&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/p&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/d2ccdb8443b682006d188b601f30a4bf.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Les variables d'environnement &#171; message_erreur &#187; et &#171; message_ok &#187; sont envoy&#233;es au squelette via les retour des fonctions PHP&#8230;&lt;/p&gt; &lt;p&gt;Ensuite, la description du formulaire ajoute gr&#226;ce &#224; la balise &lt;code class='spip_code' dir='ltr'&gt;#ACTION_FORMULAIRE&lt;/code&gt; des informations utiles &#224; SPIP pour le traitement du formulaire.&lt;/p&gt; &lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.spip2 .imp {font-weight: bold; color: red;}
.spip2 .coMULTI {color: #808080; font-style: italic;}
.spip2 .es0 {color: #000099; font-weight: bold;}
.spip2 .re0 {color: #E1861A;}
.spip2 .re1 {color: #CA5200;}
.spip2 .re2 {color: #e72;}
.spip2 .re10 {color: #527EE0;}
.spip2 .re11 {color: #222;}
.spip2 .re12 {color: #745E4B;}
.spip2 .re13 {color: #222;}
.spip2 .re20 {color: #527EE0;}
.spip2 .re21 {color: #222}
.spip2 .re22 {color: #745E4B;}
.spip2 .re23 {color: #222;}
.spip2 .re30 {color: #C90}
.spip2 .re31 {color: #C90}
.spip2 .re40 {color: #74B900;}
.spip2 .re50 {color: #E1861A;}
.spip2 span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;form action=&quot;&lt;span class=&quot;re1&quot;&gt;#ENV&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;action&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&quot; method=&quot;post&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re1&quot;&gt;#ACTION_FORMULAIRE&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#ENV&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;action&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &#8230;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;/div&gt;&lt;/form&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/e6ff521daf24d257d4d4c9c6a2f6b84d.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;L'URL de soumission est calcul&#233;e par SPIP et envoy&#233;e par la variable &#171; action &#187; &#224; l'environnement du squelette.&lt;/p&gt; &lt;p&gt;Se trouve ensuite les champs du formulaire, structur&#233;s dans un chainage UL / LI. Ils affichent &#233;ventuellement des messages d'erreurs.&lt;/p&gt; &lt;p&gt;Les champs sont ins&#233;r&#233;s avec des classes CSS particuli&#232;res si le champ est obligatoire ou en erreur.&lt;/p&gt; &lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.spip2 .imp {font-weight: bold; color: red;}
.spip2 .coMULTI {color: #808080; font-style: italic;}
.spip2 .es0 {color: #000099; font-weight: bold;}
.spip2 .re0 {color: #E1861A;}
.spip2 .re1 {color: #CA5200;}
.spip2 .re2 {color: #e72;}
.spip2 .re10 {color: #527EE0;}
.spip2 .re11 {color: #222;}
.spip2 .re12 {color: #745E4B;}
.spip2 .re13 {color: #222;}
.spip2 .re20 {color: #527EE0;}
.spip2 .re21 {color: #222}
.spip2 .re22 {color: #745E4B;}
.spip2 .re23 {color: #222;}
.spip2 .re30 {color: #C90}
.spip2 .re31 {color: #C90}
.spip2 .re40 {color: #74B900;}
.spip2 .re50 {color: #E1861A;}
.spip2 span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re1&quot;&gt;#SET&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;erreurs,&lt;span class=&quot;re1&quot;&gt;#ENV&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;**&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;erreurs&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|table_valeur&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;traduire&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;li class=&quot;editer_traduire obligatoire&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#GET&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;erreurs&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|oui&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;erreur&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&quot;&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;label for=&quot;traduire&quot;&gt;Traduire&lt;/label&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class='erreur_message'&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#GET&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;erreurs&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;textarea name='traduire' id='champ_traduire'&gt;&lt;span class=&quot;re1&quot;&gt;#ENV&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;traduire&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;/li&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/551d3c6ec35210aa507e1a4ba8b07ac1.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Pour terminer sur la partie HTML, signalons que la version 1.12 de CFG, &#224; titre exp&#233;rimental, propose une balise &lt;code class='spip_code' dir='ltr'&gt;#SAISIE&lt;/code&gt; simplifiant l'&#233;criture d'appel des champs de formulaire. Avec, cela donne l'&#233;criture suivante :&lt;/p&gt; &lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.spip2 .imp {font-weight: bold; color: red;}
.spip2 .coMULTI {color: #808080; font-style: italic;}
.spip2 .es0 {color: #000099; font-weight: bold;}
.spip2 .re0 {color: #E1861A;}
.spip2 .re1 {color: #CA5200;}
.spip2 .re2 {color: #e72;}
.spip2 .re10 {color: #527EE0;}
.spip2 .re11 {color: #222;}
.spip2 .re12 {color: #745E4B;}
.spip2 .re13 {color: #222;}
.spip2 .re20 {color: #527EE0;}
.spip2 .re21 {color: #222}
.spip2 .re22 {color: #745E4B;}
.spip2 .re23 {color: #222;}
.spip2 .re30 {color: #C90}
.spip2 .re31 {color: #C90}
.spip2 .re40 {color: #74B900;}
.spip2 .re50 {color: #E1861A;}
.spip2 span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#SAISIE&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;textarea,traduire,oui&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;label=Traduire&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Soit au complet, le formulaire HTML donnerait :&lt;/p&gt; &lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.spip2 .imp {font-weight: bold; color: red;}
.spip2 .coMULTI {color: #808080; font-style: italic;}
.spip2 .es0 {color: #000099; font-weight: bold;}
.spip2 .re0 {color: #E1861A;}
.spip2 .re1 {color: #CA5200;}
.spip2 .re2 {color: #e72;}
.spip2 .re10 {color: #527EE0;}
.spip2 .re11 {color: #222;}
.spip2 .re12 {color: #745E4B;}
.spip2 .re13 {color: #222;}
.spip2 .re20 {color: #527EE0;}
.spip2 .re21 {color: #222}
.spip2 .re22 {color: #745E4B;}
.spip2 .re23 {color: #222;}
.spip2 .re30 {color: #C90}
.spip2 .re31 {color: #C90}
.spip2 .re40 {color: #74B900;}
.spip2 .re50 {color: #E1861A;}
.spip2 span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;div class=&quot;formulaire_spip formulaire_pipotin&quot;&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;p class=&quot;reponse_formulaire reponse_formulaire_erreur&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#ENV&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;message_erreur&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/p&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;p class=&quot;reponse_formulaire reponse_formulaire_ok&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#ENV&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;message_ok&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/p&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;form action=&quot;&lt;span class=&quot;re1&quot;&gt;#ENV&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;action&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&quot; method=&quot;post&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re1&quot;&gt;#ACTION_FORMULAIRE&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#ENV&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;action&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;ul&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#SAISIE&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;textarea,traduire,oui&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;label=Traduire&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#ENV&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;traduction&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|oui&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#SAISIE&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;textarea,traduction&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;label=Traduction&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/ul&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;p class=&quot;boutons&quot;&gt;&lt;input type=&quot;submit&quot; class=&quot;submit&quot; value=&quot;&lt;span class=&quot;re30&quot;&gt;&lt;:pass_ok:&gt;&lt;/span&gt;&quot; /&gt;&lt;/p&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;/div&gt;&lt;/form&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/de953642a46e3fccfb792c5577eedf13.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;h3 class='h3 spip'&gt;Charger&lt;/h3&gt;
&lt;p&gt;La fonction PHP &lt;code class='spip_code' dir='ltr'&gt;charger()&lt;/code&gt; permet d'envoyer &#224; l'environnement du squelette de formulaire des valeurs par d&#233;faut. La fonction retourne un tableau PHP correspondant au contexte de compilation. Mais, si les nom des cl&#233;s du tableau correspondent &#224; des variables qui ont d&#233;j&#224; &#233;t&#233; soumises (par soumission du formulaire ou via l'URL), alors ce sont ces valeurs que le squelette utilisera pour son contexte.&lt;/p&gt; &lt;p&gt;Pour notre formulaire, nous allons avoir besoin de 2 param&#232;tres, l'un pour recevoir le texte &#224; traduire, l'autre pour retourner le contenu de la traduction.&lt;/p&gt; &lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.php .imp {font-weight: bold; color: red;}
.php .kw1 {color: #b1b100;}
.php .kw2 {color: #000000; font-weight: bold;}
.php .kw3 {color: #990000;}
.php .kw4 {color: #009900; font-weight: bold;}
.php .co1 {color: #666666; font-style: italic;}
.php .co2 {color: #666666; font-style: italic;}
.php .co3 {color: #0000cc; font-style: italic;}
.php .co4 {color: #009933; font-style: italic;}
.php .coMULTI {color: #666666; font-style: italic;}
.php .es0 {color: #000099; font-weight: bold;}
.php .es1 {color: #000099; font-weight: bold;}
.php .es2 {color: #660099; font-weight: bold;}
.php .es3 {color: #660099; font-weight: bold;}
.php .es4 {color: #006699; font-weight: bold;}
.php .es5 {color: #006699; font-weight: bold; font-style: italic;}
.php .es6 {color: #009933; font-weight: bold;}
.php .es_h {color: #000099; font-weight: bold;}
.php .br0 {color: #009900;}
.php .sy0 {color: #339933;}
.php .sy1 {color: #000000; font-weight: bold;}
.php .st0 {color: #0000ff;}
.php .st_h {color: #0000ff;}
.php .nu0 {color: #cc66cc;}
.php .nu8 {color: #208080;}
.php .nu12 {color: #208080;}
.php .nu19 {color:#800080;}
.php .me1 {color: #004000;}
.php .me2 {color: #004000;}
.php .re0 {color: #000088;}
.php span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;div class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; formulaires_pipotin_charger_dist&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$contexte&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;st_h&quot;&gt;'traduire'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;''&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;st_h&quot;&gt;'traduction'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;''&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$contexte&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/9ed14ebceea503c47d26132976b76a0a.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Ici, par d&#233;faut les deux param&#232;tres sont laiss&#233;s vides. Lorsque l'on soumet le formulaire (si l'on a rempli le champ &quot;traduire&quot; dans celui-ci) - et que la fonction v&#233;rifier ou traiter indique qu'il faut r&#233;afficher la saisie, la gestion de CVT fait que le texte soumis dans le champ &quot;traduire&quot; sera r&#233;introduit automatiquement dans le contexte au chargement du formulaire. On ne perd donc pas les donn&#233;es saisies si une erreur appara&#238;t.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Param&#232;tres d'un formulaire&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Il est possible d'envoyer des param&#232;tres lors de l'appel du formulaire dans les squelettes, par exemple :&lt;/p&gt;
&lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.spip2 .imp {font-weight: bold; color: red;}
.spip2 .coMULTI {color: #808080; font-style: italic;}
.spip2 .es0 {color: #000099; font-weight: bold;}
.spip2 .re0 {color: #E1861A;}
.spip2 .re1 {color: #CA5200;}
.spip2 .re2 {color: #e72;}
.spip2 .re10 {color: #527EE0;}
.spip2 .re11 {color: #222;}
.spip2 .re12 {color: #745E4B;}
.spip2 .re13 {color: #222;}
.spip2 .re20 {color: #527EE0;}
.spip2 .re21 {color: #222}
.spip2 .re22 {color: #745E4B;}
.spip2 .re23 {color: #222;}
.spip2 .re30 {color: #C90}
.spip2 .re31 {color: #C90}
.spip2 .re40 {color: #74B900;}
.spip2 .re50 {color: #E1861A;}
.spip2 span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#FORMULAIRE_NOM&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;parametreA, parametreB&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Ces deux param&#232;tres sont alors r&#233;cup&#233;rables en tant que param&#232;tres des fonctions Charger, V&#233;rifier et Traiter :&lt;/p&gt;
&lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.php .imp {font-weight: bold; color: red;}
.php .kw1 {color: #b1b100;}
.php .kw2 {color: #000000; font-weight: bold;}
.php .kw3 {color: #990000;}
.php .kw4 {color: #009900; font-weight: bold;}
.php .co1 {color: #666666; font-style: italic;}
.php .co2 {color: #666666; font-style: italic;}
.php .co3 {color: #0000cc; font-style: italic;}
.php .co4 {color: #009933; font-style: italic;}
.php .coMULTI {color: #666666; font-style: italic;}
.php .es0 {color: #000099; font-weight: bold;}
.php .es1 {color: #000099; font-weight: bold;}
.php .es2 {color: #660099; font-weight: bold;}
.php .es3 {color: #660099; font-weight: bold;}
.php .es4 {color: #006699; font-weight: bold;}
.php .es5 {color: #006699; font-weight: bold; font-style: italic;}
.php .es6 {color: #009933; font-weight: bold;}
.php .es_h {color: #000099; font-weight: bold;}
.php .br0 {color: #009900;}
.php .sy0 {color: #339933;}
.php .sy1 {color: #000000; font-weight: bold;}
.php .st0 {color: #0000ff;}
.php .st_h {color: #0000ff;}
.php .nu0 {color: #cc66cc;}
.php .nu8 {color: #208080;}
.php .nu12 {color: #208080;}
.php .nu19 {color:#800080;}
.php .me1 {color: #004000;}
.php .me2 {color: #004000;}
.php .re0 {color: #000088;}
.php span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;div class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;formulaires_nom_charger_dist&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$parametreA&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$parametreB&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;sy0&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/b94a4528f5f961549719ebee2fe51554.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;h3 class='h3 spip'&gt;V&#233;rifier&lt;/h3&gt;
&lt;p&gt;Elle sert &#224; tester les saisies des utilisateurs et &#224; retourner &#233;ventuellement des messages d'erreur en cas de probl&#232;mes, qui peuvent &#234;tre sp&#233;cifiques &#224; un champ de saisie. Pour notre exemple, on peut proposer :&lt;/p&gt;
&lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.php .imp {font-weight: bold; color: red;}
.php .kw1 {color: #b1b100;}
.php .kw2 {color: #000000; font-weight: bold;}
.php .kw3 {color: #990000;}
.php .kw4 {color: #009900; font-weight: bold;}
.php .co1 {color: #666666; font-style: italic;}
.php .co2 {color: #666666; font-style: italic;}
.php .co3 {color: #0000cc; font-style: italic;}
.php .co4 {color: #009933; font-style: italic;}
.php .coMULTI {color: #666666; font-style: italic;}
.php .es0 {color: #000099; font-weight: bold;}
.php .es1 {color: #000099; font-weight: bold;}
.php .es2 {color: #660099; font-weight: bold;}
.php .es3 {color: #660099; font-weight: bold;}
.php .es4 {color: #006699; font-weight: bold;}
.php .es5 {color: #006699; font-weight: bold; font-style: italic;}
.php .es6 {color: #009933; font-weight: bold;}
.php .es_h {color: #000099; font-weight: bold;}
.php .br0 {color: #009900;}
.php .sy0 {color: #339933;}
.php .sy1 {color: #000000; font-weight: bold;}
.php .st0 {color: #0000ff;}
.php .st_h {color: #0000ff;}
.php .nu0 {color: #cc66cc;}
.php .nu8 {color: #208080;}
.php .nu12 {color: #208080;}
.php .nu19 {color:#800080;}
.php .me1 {color: #004000;}
.php .me2 {color: #004000;}
.php .re0 {color: #000088;}
.php span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;div class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; formulaires_pipotine_verifier_dist&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$erreurs&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;_request&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'traduire'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$erreurs&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'message_erreur'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&quot;Vous avez oubli&#233; d'&#233;crire ! Votre clavier est cass&#233; ?&quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$erreurs&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'traduire'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&quot;C'est l&#224; dedans qu'on &#233;crit son texte !&quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$erreurs&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/e0919ce28d6fe279816f20dbfb7c165c.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;La fonction v&#233;rifier est assez simple : elle retourne un tableau PHP vide s'il n'y a pas d'erreur, un tableau non vide s'il y a une erreur quelconque.&lt;/p&gt; &lt;h3 class='h3 spip'&gt;Traiter&lt;/h3&gt;
&lt;p&gt;C'est la fonction qui s'occupe de tout les traitements que doit ex&#233;cuter le formulaire lorsque les v&#233;rifications sont valides.&lt;/p&gt; &lt;p&gt;Cette fonction retourne un tableau PHP qui peut contenir entre autre les cl&#233;s &quot;message_ok&quot;, &quot;message_erreur&quot;, &quot;editable&quot; (si le formulaire doit ou non &#234;tre r&#233;affich&#233; apr&#232;s le traitement).&lt;/p&gt; &lt;p&gt;Ici, nous devons interroger une page distante de Google et r&#233;cup&#233;rer son r&#233;sultat. On utilise l'API de SPIP pour cela (recuperer_page) et la fonction de PHP 5.2 pour analyser le JSON (tableau javascript) r&#233;cup&#233;r&#233;.&lt;/p&gt; &lt;p&gt;En cas d'erreur, on le signale ; en cas de r&#233;ussite, on force l'insertion du texte r&#233;cup&#233;r&#233; dans le prochain chargement du formulaire, avec la fonction de SPIP &#171; &lt;code class='spip_code' dir='ltr'&gt;set_request()&lt;/code&gt; &#187;&lt;/p&gt; &lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.php .imp {font-weight: bold; color: red;}
.php .kw1 {color: #b1b100;}
.php .kw2 {color: #000000; font-weight: bold;}
.php .kw3 {color: #990000;}
.php .kw4 {color: #009900; font-weight: bold;}
.php .co1 {color: #666666; font-style: italic;}
.php .co2 {color: #666666; font-style: italic;}
.php .co3 {color: #0000cc; font-style: italic;}
.php .co4 {color: #009933; font-style: italic;}
.php .coMULTI {color: #666666; font-style: italic;}
.php .es0 {color: #000099; font-weight: bold;}
.php .es1 {color: #000099; font-weight: bold;}
.php .es2 {color: #660099; font-weight: bold;}
.php .es3 {color: #660099; font-weight: bold;}
.php .es4 {color: #006699; font-weight: bold;}
.php .es5 {color: #006699; font-weight: bold; font-style: italic;}
.php .es6 {color: #009933; font-weight: bold;}
.php .es_h {color: #000099; font-weight: bold;}
.php .br0 {color: #009900;}
.php .sy0 {color: #339933;}
.php .sy1 {color: #000000; font-weight: bold;}
.php .st0 {color: #0000ff;}
.php .st_h {color: #0000ff;}
.php .nu0 {color: #cc66cc;}
.php .nu8 {color: #208080;}
.php .nu12 {color: #208080;}
.php .nu19 {color:#800080;}
.php .me1 {color: #004000;}
.php .me2 {color: #004000;}
.php .re0 {color: #000088;}
.php span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;div class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;co1&quot;&gt;// http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&amp;q=hello%20world&amp;langpair=en%7Cit&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;a href=&quot;http://www.php.net/define&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;define&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'URL_GOOGLE_TRANSLATE'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&quot;http://ajax.googleapis.com/ajax/services/language/translate&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; formulaires_pipotin_traiter_dist&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;co1&quot;&gt;// creer l'url selon l'api google&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$texte&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; _request&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'traduire'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$url&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; parametre_url&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;URL_GOOGLE_TRANSLATE&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'v'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&quot;1.0&quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'&amp;'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$url&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; parametre_url&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$url&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'langpair'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'fr|en'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'&amp;'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$url&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; parametre_url&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$url&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'q'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$texte&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'&amp;'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;co1&quot;&gt;// chargement du texte traduit par google (retour : json)&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; include_spip&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'inc/distant'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$trad&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; recuperer_page&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$url&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;co1&quot;&gt;// attention : php 5.2&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$trad&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/json_decode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;json_decode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$trad&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;// true = retour array et non classe&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;co1&quot;&gt;// recuperation du resultat si OK&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$trad&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'responseStatus'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;200&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;st0&quot;&gt;&quot;editable&quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;st0&quot;&gt;&quot;message_erreur&quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&quot;Pas de chance, faux retour de l'ami Google !&quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;co1&quot;&gt;// envoi au charger&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; set_request&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'traduction'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$trad&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'responseData'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'translatedText'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;co1&quot;&gt;// message&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;st0&quot;&gt;&quot;editable&quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;st0&quot;&gt;&quot;message_ok&quot;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&quot;Et voil&#224; la traduction !&quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/86f6806067aac621f4d6e16fc8b1eacd.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
		
		</content:encoded>


		
		<enclosure url="http://marcimat.magraine.net/IMG/zip/pipot.zip" length="5624" type="application/zip" />
		

	</item>
<item xml:lang="fr">
		<title>URLs en minuscules</title>
		<link>http://marcimat.magraine.net/URLs-en-minuscules</link>
		<guid isPermaLink="true">http://marcimat.magraine.net/URLs-en-minuscules</guid>
		<dc:date>2009-01-03T10:23:27Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>Matthieu Marcillaud</dc:creator>



		<description>
&lt;p&gt;A partir de SPIP 2.0, il existe un pipeline permettant de modifier les urls cr&#233;&#233;es avant de les enregistrer dans la base de donn&#233;e. Par cons&#233;quent, il est possible de les modifier comme on le souhaite. Pipeline creer_chaine_url Je ne reviens pas sur l'utilisation d'un pipeline, nous allons ici imaginer qu'on modifie un fichier d'options d'un site dans config/mes_options.php. Le pipeline creer_chaine_url re&#231;oit les arguments de type d'objet et d'id_objet demand&#233; (exemple : rubrique et 8), ainsi que (...)&lt;/p&gt;


-
&lt;a href="http://marcimat.magraine.net/-Semences-SPIP-" rel="directory"&gt;Semences SPIP&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_texte'&gt;&lt;p&gt;A partir de SPIP 2.0, il existe un pipeline permettant de modifier les urls cr&#233;&#233;es avant de les enregistrer dans la base de donn&#233;e. Par cons&#233;quent, il est possible de les modifier comme on le souhaite.&lt;/p&gt; &lt;h3 class='h3 spip'&gt;Pipeline creer_chaine_url&lt;/h3&gt;
&lt;p&gt;Je ne reviens pas sur l'utilisation d'un pipeline, nous allons ici imaginer qu'on modifie un fichier d'options d'un site dans &lt;code class='spip_code' dir='ltr'&gt;config/mes_options.php&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;Le pipeline &lt;code class='spip_code' dir='ltr'&gt;creer_chaine_url&lt;/code&gt; re&#231;oit les arguments de type d'&lt;code class='spip_code' dir='ltr'&gt;objet&lt;/code&gt; et d'&lt;code class='spip_code' dir='ltr'&gt;id_objet&lt;/code&gt; demand&#233; (exemple : rubrique et 8), ainsi que la valeur actuelle de l'url calcul&#233;e. Il est possible donc de compl&#232;tement la recalculer, ou simplement de l'adapter &#224; ses besoins, comme pour ici : la passer en minuscules.&lt;/p&gt; &lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.php .imp {font-weight: bold; color: red;}
.php .kw1 {color: #b1b100;}
.php .kw2 {color: #000000; font-weight: bold;}
.php .kw3 {color: #990000;}
.php .kw4 {color: #009900; font-weight: bold;}
.php .co1 {color: #666666; font-style: italic;}
.php .co2 {color: #666666; font-style: italic;}
.php .co3 {color: #0000cc; font-style: italic;}
.php .co4 {color: #009933; font-style: italic;}
.php .coMULTI {color: #666666; font-style: italic;}
.php .es0 {color: #000099; font-weight: bold;}
.php .es1 {color: #000099; font-weight: bold;}
.php .es2 {color: #660099; font-weight: bold;}
.php .es3 {color: #660099; font-weight: bold;}
.php .es4 {color: #006699; font-weight: bold;}
.php .es5 {color: #006699; font-weight: bold; font-style: italic;}
.php .es6 {color: #009933; font-weight: bold;}
.php .es_h {color: #000099; font-weight: bold;}
.php .br0 {color: #009900;}
.php .sy0 {color: #339933;}
.php .sy1 {color: #000000; font-weight: bold;}
.php .st0 {color: #0000ff;}
.php .st_h {color: #0000ff;}
.php .nu0 {color: #cc66cc;}
.php .nu8 {color: #208080;}
.php .nu12 {color: #208080;}
.php .nu19 {color:#800080;}
.php .me1 {color: #004000;}
.php .me2 {color: #004000;}
.php .re0 {color: #000088;}
.php span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;div class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;&lt;?php&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$GLOBALS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'spip_pipeline'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'creer_chaine_url'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.=&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'|my_minuscules'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;co1&quot;&gt;// passer simplement l'url en minuscule&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; my_minuscules&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$flux&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$flux&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'data'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/strtolower&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;strtolower&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$flux&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'data'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$flux&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;sy1&quot;&gt;?&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/82662874e10f5e6b0714f5eac4c2b2a6.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;h3 class='h3 spip'&gt;Mettre &#224; jour ses URLs&lt;/h3&gt;
&lt;p&gt;Pour que le pipeline soit pris en compte, il faut supprimer le fichier &lt;code class='spip_code' dir='ltr'&gt;tmp/charger_pipelines.php&lt;/code&gt;. Enfin, pour que les nouvelles URLs se chargent, vous devez&lt;/p&gt; &lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; soit effacer la table spip_urls (mais vous perdez alors toutes vos anciennes URLs qui ne seront plus dirig&#233;es sur les nouvelles), &lt;/li&gt;&lt;li&gt; soit cliquer sur le bouton &quot;Voir en ligne&quot; depuis l'interface priv&#233;e, de chacun de vos articles ce qui a le m&#233;rite de recr&#233;er l'url. Sauf que... Sauf que si on utilise (comme moi !) des tables MySQL en format &quot;utf8_general_ci&quot; (ci voulant dire &quot;case insensitive&quot;), MySQL ne me fait pas de diff&#233;rence entre une recherche de 'Carnet' et de 'carnet' et consid&#232;re donc lorsqu'on change juste la casse que l'URL est d&#233;j&#224; stock&#233;e (et SPIP ne la met pas &#224; jour). Du coup, cette seconde solution n'est pas toujours la meilleure :)&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>Interfaces extras !</title>
		<link>http://marcimat.magraine.net/Interfaces-extras</link>
		<guid isPermaLink="true">http://marcimat.magraine.net/Interfaces-extras</guid>
		<dc:date>2008-12-28T11:32:45Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>Matthieu Marcillaud</dc:creator>



		<description>
&lt;p&gt;Apr&#232;s les petites p&#233;rip&#233;ties de tout &#224; l'heure (Outils de debug), nous pouvons poursuivre la modification du plugin champs extras. Nous souhaitons 2 choses : pouvoir ordonner les champs extras, et pouvoir prendre en compte les champs d&#233;j&#224; pr&#233;sents dans la base de donn&#233;es ! Ce qui parait &#233;vident au premier abord ne l'est pas forc&#233;ment dans la r&#233;alit&#233;. On va &#234;tre m&#233;thodique et commencer par corriger les principaux &#233;cueils actuels du plugin : ne pas d&#233;clarer les autorisations dans le fichier d'option mais (...)&lt;/p&gt;


-
&lt;a href="http://marcimat.magraine.net/-Semences-SPIP-" rel="directory"&gt;Semences SPIP&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_chapo'&gt;&lt;p&gt;Apr&#232;s les petites p&#233;rip&#233;ties de tout &#224; l'heure (&lt;a href='http://marcimat.magraine.net/Outils-de-debug' class='spip_in'&gt;Outils de debug&lt;/a&gt;), nous pouvons poursuivre la modification du plugin champs extras. Nous souhaitons 2 choses : pouvoir ordonner les champs extras, et pouvoir prendre en compte les champs d&#233;j&#224; pr&#233;sents dans la base de donn&#233;es !&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;p&gt;Ce qui parait &#233;vident au premier abord ne l'est pas forc&#233;ment dans la r&#233;alit&#233;. On va &#234;tre m&#233;thodique et commencer par corriger les principaux &#233;cueils actuels du plugin :&lt;/p&gt; &lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; ne pas d&#233;clarer les autorisations dans le fichier d'option mais bien en utilisant un fichier sp&#233;cifique appel&#233; par le pipeline autoriser,&lt;/li&gt;&lt;li&gt; ne pas jouer au fou avec des &lt;code class='spip_code' dir='ltr'&gt;id_extra&lt;/code&gt; bas&#233; sur les cl&#233;s de tableau qui pourraient &#234;tre probl&#233;matiques si deux administrateurs modifient un m&#234;me extra en m&#234;me temps (bon, j'admets c'est peu probable),&lt;/li&gt;&lt;li&gt; utiliser la classe &lt;code class='spip_code' dir='ltr'&gt;ChampExtra&lt;/code&gt; aussi dans l'interface plut&#244;t que d'utiliser un autre tableau, ce qui sera plus p&#233;renne,&lt;/li&gt;&lt;li&gt; rationaliser les noms des fonctions entre les deux plugins,&lt;/li&gt;&lt;li&gt; ajouter des points de log.&lt;/li&gt;&lt;/ul&gt;
&lt;h3 class='h3 spip'&gt;Rationaliser les nommages&lt;/h3&gt;
&lt;p&gt;Afin d'&#233;viter de trop se disperser dans les noms des fonctions entre le plugin 'core' et le plugin 'interface' pour les champs extras, nous allons les renommer, ainsi que leurs fonctions &lt;code class='spip_code' dir='ltr'&gt;cextras&lt;/code&gt; et &lt;code class='spip_code' dir='ltr'&gt;iextras&lt;/code&gt;. Et en plus, je l'ai d&#233;j&#224; fait, ce qui donne : &lt;a href='http://zone.spip.org/trac/spip-zone/changeset/25554' class='spip_out' rel='nofollow external'&gt;http://zone.spip.org/trac/spip-zone...&lt;/a&gt; et le retardataire &lt;a href='http://zone.spip.org/trac/spip-zone/changeset/25555' class='spip_out' rel='nofollow external'&gt;http://zone.spip.org/trac/spip-zone...&lt;/a&gt; !&lt;/p&gt; &lt;h3 class='h3 spip'&gt;Autorisations au bon endroit !&lt;/h3&gt;
&lt;p&gt;Je l'avais oubli&#233; un peu trop vite, mais il y a un pipeline pour les autorisations, qui permet de charger un fichier contenant de nouvelles autorisations.&lt;/p&gt; &lt;p&gt;Nous allons donc le d&#233;clarer dans l'interface &#224; la place du fichier d'options.&lt;/p&gt;
&lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.xml .imp {font-weight: bold; color: red;}
.xml .es0 {color: #000099; font-weight: bold;}
.xml .br0 {color: #66cc66;}
.xml .sy0 {color: #66cc66;}
.xml .st0 {color: #ff0000;}
.xml .sc-1 {color: #808080; font-style: italic;}
.xml .sc0 {color: #00bbdd;}
.xml .sc1 {color: #ddbb00;}
.xml .sc2 {color: #339933;}
.xml .sc3 {color: #009900;}
.xml .re0 {color: #000066;}
.xml .re1 {color: #000000; font-weight: bold;}
.xml .re2 {color: #000000; font-weight: bold;}
.xml span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_xml cadre&quot;&gt;&lt;div class=&quot;xml&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;pipeline&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;nom&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;autoriser&lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;/nom&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;inclure&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;inc/iextras_autoriser.php&lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;/inclure&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;sc3&quot;&gt;&lt;span class=&quot;re1&quot;&gt;&lt;/pipeline&lt;span class=&quot;re2&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/2fb6c676619bb6ba369d74422b897bc7.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Le fichier d'options est d&#233;plac&#233;, renomm&#233; dans &lt;code class='spip_code' dir='ltr'&gt;inc/iextras_autoriser.php&lt;/code&gt; et modifi&#233; comme suit :&lt;/p&gt;
&lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.php .imp {font-weight: bold; color: red;}
.php .kw1 {color: #b1b100;}
.php .kw2 {color: #000000; font-weight: bold;}
.php .kw3 {color: #990000;}
.php .kw4 {color: #009900; font-weight: bold;}
.php .co1 {color: #666666; font-style: italic;}
.php .co2 {color: #666666; font-style: italic;}
.php .co3 {color: #0000cc; font-style: italic;}
.php .co4 {color: #009933; font-style: italic;}
.php .coMULTI {color: #666666; font-style: italic;}
.php .es0 {color: #000099; font-weight: bold;}
.php .es1 {color: #000099; font-weight: bold;}
.php .es2 {color: #660099; font-weight: bold;}
.php .es3 {color: #660099; font-weight: bold;}
.php .es4 {color: #006699; font-weight: bold;}
.php .es5 {color: #006699; font-weight: bold; font-style: italic;}
.php .es6 {color: #009933; font-weight: bold;}
.php .es_h {color: #000099; font-weight: bold;}
.php .br0 {color: #009900;}
.php .sy0 {color: #339933;}
.php .sy1 {color: #000000; font-weight: bold;}
.php .st0 {color: #0000ff;}
.php .st_h {color: #0000ff;}
.php .nu0 {color: #cc66cc;}
.php .nu8 {color: #208080;}
.php .nu12 {color: #208080;}
.php .nu19 {color:#800080;}
.php .me1 {color: #004000;}
.php .me2 {color: #004000;}
.php .re0 {color: #000088;}
.php span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;div class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;&lt;?php&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/defined&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;defined&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&quot;_ECRIRE_INC_VERSION&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;co1&quot;&gt;// fonction pour le pipeline, n'a rien a effectuer&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; iextras_autoriser&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;co1&quot;&gt;// declarations d'autorisations&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; autoriser_iextras_onglet_dist&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$faire&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$type&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$id&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$qui&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$opt&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; autoriser&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'configurer'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'iextra'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$id&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$qui&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$opt&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; autoriser_iextras_configurer_dist&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$faire&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$type&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$id&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$qui&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$opt&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; autoriser&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'webmestre'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$type&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$id&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$qui&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$opt&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;sy1&quot;&gt;?&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/9cec7f3bdeacaa62f09fdc9fbb81d08f.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;La fonction &lt;code class='spip_code' dir='ltr'&gt;iextras_autoriser&lt;/code&gt; doit &#234;tre pr&#233;sente, mais elle ne sert &#224; rien. Elle est juste pr&#233;texte &#224; la lecture du fichier d'autorisation au moment de l'appel &#224; la librairie &lt;code class='spip_code' dir='ltr'&gt;autoriser&lt;/code&gt; de SPIP.&lt;/p&gt; &lt;h3 class='h3 spip'&gt; Ajouter des points de logs&lt;/h3&gt;
&lt;p&gt;Certaines actions effectu&#233;es m&#233;ritent d'&#234;tre loggu&#233;es, comme l'ajout et la suppression de champ extra.&lt;/p&gt; &lt;p&gt;Cr&#233;ons une fonction pour cela dans le core du plugin :&lt;/p&gt;
&lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.php .imp {font-weight: bold; color: red;}
.php .kw1 {color: #b1b100;}
.php .kw2 {color: #000000; font-weight: bold;}
.php .kw3 {color: #990000;}
.php .kw4 {color: #009900; font-weight: bold;}
.php .co1 {color: #666666; font-style: italic;}
.php .co2 {color: #666666; font-style: italic;}
.php .co3 {color: #0000cc; font-style: italic;}
.php .co4 {color: #009933; font-style: italic;}
.php .coMULTI {color: #666666; font-style: italic;}
.php .es0 {color: #000099; font-weight: bold;}
.php .es1 {color: #000099; font-weight: bold;}
.php .es2 {color: #660099; font-weight: bold;}
.php .es3 {color: #660099; font-weight: bold;}
.php .es4 {color: #006699; font-weight: bold;}
.php .es5 {color: #006699; font-weight: bold; font-style: italic;}
.php .es6 {color: #009933; font-weight: bold;}
.php .es_h {color: #000099; font-weight: bold;}
.php .br0 {color: #009900;}
.php .sy0 {color: #339933;}
.php .sy1 {color: #000000; font-weight: bold;}
.php .st0 {color: #0000ff;}
.php .st_h {color: #0000ff;}
.php .nu0 {color: #cc66cc;}
.php .nu8 {color: #208080;}
.php .nu12 {color: #208080;}
.php .nu19 {color:#800080;}
.php .me1 {color: #004000;}
.php .me2 {color: #004000;}
.php .re0 {color: #000088;}
.php span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;div class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; extras_log&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$contenu&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$important&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$important&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; OR &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/defined&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;defined&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'EXTRAS_DEBUG'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; and EXTRAS_DEBUG&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; spip_log&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$contenu&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'extras'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/bf0d33f1a14e0744d3583eea92f8f828.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;On ajoutera au fur et &#224; mesure des appels aux points essentiels du plugin.&lt;/p&gt; &lt;h3 class='h3 spip'&gt;Utiliser la classe ChampExtra dans l'interface graphique&lt;/h3&gt;
&lt;p&gt;Les objets PHP peuvent se lin&#233;ariser et se d&#233;-lin&#233;ariser de la m&#234;me mani&#232;re que les tableaux PHP. La condition est que la classe soit d&#233;finie au moment de la d&#233;-lin&#233;arisation. Ce qu'on appelle lin&#233;arisation, ou s&#233;rialisation, c'est l'action de transformer une variable PHP en une chaine de caract&#232;re particuli&#232;re pouvant alors &#234;tre stock&#233;e, par exemple dans un fichier. Ces chaines peuvent &#234;tre ensuite d&#233;-s&#233;rialis&#233;es pour obtenir de nouveau la variable d'origine.&lt;/p&gt; &lt;p&gt;Donc, &#224; la place d'un tableau PHP, nous allons stocker une classe ChampExtra.&lt;/p&gt; &lt;p&gt;Rien d'extraordinaire &#224; montrer ici : &lt;a href='http://zone.spip.org/trac/spip-zone/changeset/25559' class='spip_out' rel='nofollow external'&gt;http://zone.spip.org/trac/spip-zone...&lt;/a&gt;&lt;/p&gt; &lt;h3 class='h3 spip'&gt;Utiliser un identifiant qui identifie r&#233;ellement !&lt;/h3&gt;
&lt;p&gt;L'identifiant que nous avons attribu&#233; aux champs extras correspond en ce moment &#224; la cl&#233; du tableau PHP contenant la liste des champs extras. Cette cl&#233;, g&#233;n&#233;r&#233;e automatiquement n'identifie pas les contenus, mais juste une position dans un tableau. Si par m&#233;garde la position change entre le moment o&#249; l'on affiche la liste des extras et le moment o&#249; l'on appuie sur le bouton supprimer (parce que quelqu'un a d&#233;plac&#233; l'extra en question presque au m&#234;me moment), alors ce sera un mauvais champ qui sera supprim&#233; ! Pas good !&lt;/p&gt; &lt;p&gt;Nous allons donc cr&#233;er un identifiant qui repr&#233;sente r&#233;ellement le contenu du champ extra, de sorte que si le champ est d&#233;plac&#233; dans le tableau, ce soit bien lui n&#233;anmoins qui soit supprim&#233; et non son voisin.&lt;/p&gt; &lt;p&gt;On ajoute donc des petites fonctions &#224; la classe ChampExtra pour g&#233;rer cet identifiant :&lt;/p&gt;
&lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.php .imp {font-weight: bold; color: red;}
.php .kw1 {color: #b1b100;}
.php .kw2 {color: #000000; font-weight: bold;}
.php .kw3 {color: #990000;}
.php .kw4 {color: #009900; font-weight: bold;}
.php .co1 {color: #666666; font-style: italic;}
.php .co2 {color: #666666; font-style: italic;}
.php .co3 {color: #0000cc; font-style: italic;}
.php .co4 {color: #009933; font-style: italic;}
.php .coMULTI {color: #666666; font-style: italic;}
.php .es0 {color: #000099; font-weight: bold;}
.php .es1 {color: #000099; font-weight: bold;}
.php .es2 {color: #660099; font-weight: bold;}
.php .es3 {color: #660099; font-weight: bold;}
.php .es4 {color: #006699; font-weight: bold;}
.php .es5 {color: #006699; font-weight: bold; font-style: italic;}
.php .es6 {color: #009933; font-weight: bold;}
.php .es_h {color: #000099; font-weight: bold;}
.php .br0 {color: #009900;}
.php .sy0 {color: #339933;}
.php .sy1 {color: #000000; font-weight: bold;}
.php .st0 {color: #0000ff;}
.php .st_h {color: #0000ff;}
.php .nu0 {color: #cc66cc;}
.php .nu8 {color: #208080;}
.php .nu12 {color: #208080;}
.php .nu19 {color:#800080;}
.php .me1 {color: #004000;}
.php .me2 {color: #004000;}
.php .re0 {color: #000088;}
.php span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;div class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;co1&quot;&gt;// creer l'id du champ extra :&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; make_id&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;co1&quot;&gt;// creer un hash&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$hash&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$cle&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$cle&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!==&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'_'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$hash&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$val&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&gt;&lt;/span&gt;_id &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/substr&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;substr&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/md5&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;md5&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/serialize&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;serialize&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$hash&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;co1&quot;&gt;// determiner un identifiant&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; get_id&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&gt;&lt;/span&gt;_id&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;make_id&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&gt;&lt;/span&gt;_id&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;co1&quot;&gt;// transformer en tableau PHP les variable publiques de la classe.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; toArray&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$extra&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$cle&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$val&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$cle&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!==&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'_'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$extra&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$cle&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$val&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$extra&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'id_extra'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;get_id&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$extra&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/cd7880fe8f82b6f8a57c70029e95f59b.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;La premi&#232;re fonction &lt;code class='spip_code' dir='ltr'&gt;make_id()&lt;/code&gt; cr&#233;e un hash (une chaine unique) en utilisant les variables de la classe &lt;code class='spip_code' dir='ltr'&gt;ChampExtra&lt;/code&gt; qui ne commencent pas par un soulign&#233;.&lt;/p&gt; &lt;p&gt;La seconde &lt;code class='spip_code' dir='ltr'&gt;get_id()&lt;/code&gt; renvoie l'identifiant (ou le cr&#233;e puis le renvoie), enfin, la derni&#232;re d&#233;j&#224; pr&#233;sente mais modifi&#233;e retourne un tableau PHP avec le contenu de la classe &lt;code class='spip_code' dir='ltr'&gt;ChampExtra&lt;/code&gt; et en profite pour ajouter dedans une cl&#233; 'id_extra' avec l'identifiant en question.&lt;/p&gt; &lt;p&gt;De la sorte, le formulaire peut maintenant r&#233;cup&#233;rer des donn&#233;es en fonction d'un identifiant fiable. Voyons par exemple comment devient la fonction charger du formulaire :&lt;/p&gt;
&lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.php .imp {font-weight: bold; color: red;}
.php .kw1 {color: #b1b100;}
.php .kw2 {color: #000000; font-weight: bold;}
.php .kw3 {color: #990000;}
.php .kw4 {color: #009900; font-weight: bold;}
.php .co1 {color: #666666; font-style: italic;}
.php .co2 {color: #666666; font-style: italic;}
.php .co3 {color: #0000cc; font-style: italic;}
.php .co4 {color: #009933; font-style: italic;}
.php .coMULTI {color: #666666; font-style: italic;}
.php .es0 {color: #000099; font-weight: bold;}
.php .es1 {color: #000099; font-weight: bold;}
.php .es2 {color: #660099; font-weight: bold;}
.php .es3 {color: #660099; font-weight: bold;}
.php .es4 {color: #006699; font-weight: bold;}
.php .es5 {color: #006699; font-weight: bold; font-style: italic;}
.php .es6 {color: #009933; font-weight: bold;}
.php .es_h {color: #000099; font-weight: bold;}
.php .br0 {color: #009900;}
.php .sy0 {color: #339933;}
.php .sy1 {color: #000000; font-weight: bold;}
.php .st0 {color: #0000ff;}
.php .st_h {color: #0000ff;}
.php .nu0 {color: #cc66cc;}
.php .nu8 {color: #208080;}
.php .nu12 {color: #208080;}
.php .nu19 {color:#800080;}
.php .me1 {color: #004000;}
.php .me2 {color: #004000;}
.php .re0 {color: #000088;}
.php span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;div class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; formulaires_editer_champ_extra_charger_dist&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$id_extra&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'new'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$redirect&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;''&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;co1&quot;&gt;// nouveau ?&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$new&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$id_extra&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'new'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; ? &lt;span class=&quot;st_h&quot;&gt;' '&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;''&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;co1&quot;&gt;// valeur par defaut&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$valeurs&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;st_h&quot;&gt;'champ'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;''&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;st_h&quot;&gt;'table'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;''&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;st_h&quot;&gt;'type'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;''&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;st_h&quot;&gt;'label'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;''&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;st_h&quot;&gt;'sql'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&quot;text NOT NULL DEFAULT ''&quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;st_h&quot;&gt;'id_extra'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$id_extra&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;st_h&quot;&gt;'new'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$new&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;st_h&quot;&gt;'redirect'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$redirect&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;co1&quot;&gt;// si un extra est demande (pour edition)&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;co1&quot;&gt;// remplir les valeurs avec infos de celui-ci&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$new&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$extras&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; iextras_get_extras&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$extras&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$extra&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$extra&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;get_id&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$id_extra&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$valeurs&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array_merge&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array_merge&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$valeurs&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$extra&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;toArray&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;break&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$valeurs&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/640148071a0b52b7dcff2ff0861e6944.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Lorsque nous sommes face &#224; un champ en modification (pas nouveau), on parcoure la liste des champs extras tant qu'on ne trouve pas celui ayant le bon identifiant. Lorsque c'est le bon, on ajoute ses valeurs dans le chargement. C'est un peu plus long en traitement, mais ce n'est pas un lieu d'un site fr&#233;quent&#233; (&#231;a ne sert qu'&#224; la cr&#233;ation du site g&#233;n&#233;ralement). Les changements complets sont l&#224; : &lt;a href='http://zone.spip.org/trac/spip-zone/changeset/25560' class='spip_out' rel='nofollow external'&gt;http://zone.spip.org/trac/spip-zone...&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Nous avons maintenant corrig&#233; les principaux &#233;cueils et pouvons attaquer la prise en compte par le plugin des champs d&#233;j&#224; ajout&#233;s dans la base de donn&#233;e. Ca ne va pas &#234;tre si simple que &#231;a !&lt;/p&gt; &lt;h3 class='h3 spip'&gt;Bien poser la probl&#233;matique...&lt;/h3&gt;
&lt;p&gt;Quand on ne sait pas trop comment commencer, il y a plusieurs possibilit&#233;s :&lt;/p&gt; &lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; dormir (le plus efficace certainement),&lt;/li&gt;&lt;li&gt; faire des sch&#233;mas et des plans sur papier qui permettent d'avoir une vue d'ensemble meilleure ou encore &#233;crire en fran&#231;ais la probl&#233;matique,&lt;/li&gt;&lt;li&gt; commencer par ce dont on est certain ; le reste viendra en codant.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Cernons la probl&#233;matique : certains webmestres ont d&#233;j&#224; ajout&#233; dans des tables des champs via phpMyAdmin ou en &#233;crivant dans un squelette SPIP :&lt;/p&gt;
&lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.php .imp {font-weight: bold; color: red;}
.php .kw1 {color: #b1b100;}
.php .kw2 {color: #000000; font-weight: bold;}
.php .kw3 {color: #990000;}
.php .kw4 {color: #009900; font-weight: bold;}
.php .co1 {color: #666666; font-style: italic;}
.php .co2 {color: #666666; font-style: italic;}
.php .co3 {color: #0000cc; font-style: italic;}
.php .co4 {color: #009933; font-style: italic;}
.php .coMULTI {color: #666666; font-style: italic;}
.php .es0 {color: #000099; font-weight: bold;}
.php .es1 {color: #000099; font-weight: bold;}
.php .es2 {color: #660099; font-weight: bold;}
.php .es3 {color: #660099; font-weight: bold;}
.php .es4 {color: #006699; font-weight: bold;}
.php .es5 {color: #006699; font-weight: bold; font-style: italic;}
.php .es6 {color: #009933; font-weight: bold;}
.php .es_h {color: #000099; font-weight: bold;}
.php .br0 {color: #009900;}
.php .sy0 {color: #339933;}
.php .sy1 {color: #000000; font-weight: bold;}
.php .st0 {color: #0000ff;}
.php .st_h {color: #0000ff;}
.php .nu0 {color: #cc66cc;}
.php .nu8 {color: #208080;}
.php .nu12 {color: #208080;}
.php .nu19 {color:#800080;}
.php .me1 {color: #004000;}
.php .me2 {color: #004000;}
.php .re0 {color: #000088;}
.php span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;div class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;&lt;?php&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;sql_alter&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&quot;TABLE spip_articles ADD COLUMN fruits text NOT NULL DEFAULT ''&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;sy1&quot;&gt;?&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/258c8144ebcc18db5f2e9a07e0bcfe6e.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Ces champs d&#233;j&#224; pr&#233;sents ne sont pour le moment pas pris en compte par le plugin. La question, c'est comment les prendre en compte, et que prendre en compte aussi. Car il peut y avoir une lecture &#224; plusieurs niveaux : le champ peut exister et &#234;tre d&#233;clar&#233;, mais sans &#234;tre accessible aux r&#233;dacteurs d'articles, c'est &#224; dire ne s'affichant pas dans les formulaires. Le champ peut aussi &#234;tre d&#233;clar&#233; et devoir s'afficher.&lt;/p&gt; &lt;p&gt;Le plus simple, il me semble, c'est de pouvoir dire qu'un champ peut non seulement &#234;tre supprim&#233;, mais peut aussi &#234;tre li&#233; et d&#233;li&#233; au plugin champs extras. Ainsi, on pourrait lier un champ au plugin, il s'affiche alors dans le formulaire, puis le d&#233;lier (il ne s'y affiche plus, et n'est plus g&#233;r&#233; par le plugin d'interface) mais est toujours pr&#233;sent dans la table. Ceci r&#233;soudrait l'&#233;pineux probl&#232;me de la suppression car sinon, on ne pourrait retirer un champ extra ajout&#233; dans le plugin qu'en le supprimant... Ce qui n'est pas forc&#233;ment id&#233;al.&lt;/p&gt; &lt;p&gt;On a donc un premier aper&#231;u de ce qu'il faut r&#233;aliser (ajouter un champ existant / d&#233;lier un champ extra du plugin).&lt;/p&gt; &lt;p&gt;Commen&#231;ons par pouvoir ajouter les champs existants. Il faut d&#233;j&#224; pouvoir les lister. Enfin, lister tous les champs de la base de donn&#233;e qui ne sont pas d&#233;clar&#233;s &#224; SPIP, c'est bien de ceux l&#224; qu'il s'agit, car ceux d&#233;j&#224; d&#233;clar&#233;s ont toutes les chances d'&#234;tre d&#233;j&#224; g&#233;r&#233;s par d'autres plugins. Ca tombe assez bien car Fil a d&#233;j&#224; r&#233;alis&#233; cette partie dans le futur d&#233;funt plugin &#171; extras2 &#187; que ce plugin est en train de manger !&lt;/p&gt; &lt;p&gt;On va donc int&#233;grer tout ou partie de son code. (&#161; Que viva GPL !)&lt;/p&gt; &lt;h3 class='h3 spip'&gt;R&#233;cup&#233;rer les descriptions des tables SQL&lt;/h3&gt;
&lt;p&gt;On va donc comparer deux descriptions : celle des tables r&#233;elles et celles des d&#233;clarations faites &#224; SPIP. La diff&#233;rence des deux donnera les champs possiblement utilisables par le plugin. Ajoutons ces fonctions au core, adapt&#233;es de Fil :&lt;/p&gt;
&lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.php .imp {font-weight: bold; color: red;}
.php .kw1 {color: #b1b100;}
.php .kw2 {color: #000000; font-weight: bold;}
.php .kw3 {color: #990000;}
.php .kw4 {color: #009900; font-weight: bold;}
.php .co1 {color: #666666; font-style: italic;}
.php .co2 {color: #666666; font-style: italic;}
.php .co3 {color: #0000cc; font-style: italic;}
.php .co4 {color: #009933; font-style: italic;}
.php .coMULTI {color: #666666; font-style: italic;}
.php .es0 {color: #000099; font-weight: bold;}
.php .es1 {color: #000099; font-weight: bold;}
.php .es2 {color: #660099; font-weight: bold;}
.php .es3 {color: #660099; font-weight: bold;}
.php .es4 {color: #006699; font-weight: bold;}
.php .es5 {color: #006699; font-weight: bold; font-style: italic;}
.php .es6 {color: #009933; font-weight: bold;}
.php .es_h {color: #000099; font-weight: bold;}
.php .br0 {color: #009900;}
.php .sy0 {color: #339933;}
.php .sy1 {color: #000000; font-weight: bold;}
.php .st0 {color: #0000ff;}
.php .st_h {color: #0000ff;}
.php .nu0 {color: #cc66cc;}
.php .nu8 {color: #208080;}
.php .nu12 {color: #208080;}
.php .nu19 {color:#800080;}
.php .me1 {color: #004000;}
.php .me2 {color: #004000;}
.php .re0 {color: #000088;}
.php span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;div class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;co1&quot;&gt;// Liste les champs anormaux par rapport aux definitions de SPIP&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;co1&quot;&gt;// (aucune garantie que $connect autre que la connexion principale fasse quelque chose)&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; extras_champs_anormaux&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$connect&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;''&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;co1&quot;&gt;// recuperer les tables et champs accessibles&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$tout&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; extras_base&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$connect&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;co1&quot;&gt;// recuperer les champs SPIP connus&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; include_spip&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'base/auxiliaires'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; include_spip&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'base/serial'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$tables_spip&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array_merge&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array_merge&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$GLOBALS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'tables_principales'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$GLOBALS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'tables_auxiliaires'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;co1&quot;&gt;// chercher ce qui est different&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$ntables&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$nchamps&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$tout&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$table&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$champs&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/isset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$tables_spip&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$table&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'field'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$nchamps&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$table&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$champs&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$champs&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$champ&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$desc&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/isset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$tables_spip&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$table&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'field'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$champ&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$nchamps&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$table&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$champ&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$desc&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;a href=&quot;http://www.php.net/unset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;unset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$tout&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$nchamps&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$tout&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$nchamps&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$tout&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;co1&quot;&gt;// etablit la liste de tous les champs de toutes les tables du connect donne&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;co1&quot;&gt;// ignore la table 'spip_test'&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; extras_base&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$connect&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;''&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$champs&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;extras_tables&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$connect&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$table&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$table&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'spip_test'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$champs&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$table&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; extras_champs&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$table&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$connect&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$champs&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;co1&quot;&gt;// liste les tables dispos ans la connexion $connect&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; extras_tables&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$connect&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;''&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$a&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$s&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; sql_showbase&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$connect&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$t&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; sql_fetch&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$s&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$connect&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$a&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array_pop&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array_pop&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$t&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$a&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;co1&quot;&gt;// liste les champs dispos ans la table $table de la connexion $connect&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; extras_champs&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$table&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$connect&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$desc&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; sql_showtable&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$table&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$connect&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/is_array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;is_array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$desc&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'field'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$desc&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'field'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/2643a6186ae93cf69ffb7f76606a4e15.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Commen&#231;ons par observer la fonction &lt;code class='spip_code' dir='ltr'&gt;extra_tables()&lt;/code&gt;. Elle demande quelle sont les tables r&#233;ellement pr&#233;sentes dans la base, gr&#224;ce &#224; la fonction sql &lt;code class='spip_code' dir='ltr'&gt;sql_showbase()&lt;/code&gt;. Le param&#232;tre &lt;code class='spip_code' dir='ltr'&gt;$connect&lt;/code&gt; correspond au nom du fichier de connexion qu'utilise SPIP pour se connecter (dans le r&#233;pertoire &lt;code class='spip_code' dir='ltr'&gt;connect/&lt;/code&gt;). Lorsqu'il n'est pas renseign&#233;, SPIP utilise sa connexion principale (la connexion ayant install&#233;e le SPIP).&lt;/p&gt; &lt;p&gt;La fonction &lt;code class='spip_code' dir='ltr'&gt;extra_champs()&lt;/code&gt; prend un nom de table en entr&#233;e et r&#233;cup&#232;re la liste des champs r&#233;els et leurs descriptions SQL, ceci gr&#224;ce &#224; la fonction &lt;code class='spip_code' dir='ltr'&gt;sql_showtable()&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;La fonction &lt;code class='spip_code' dir='ltr'&gt;extra_base()&lt;/code&gt; cr&#233;e un tableau de toutes les descriptions des champs pour chaque table rencontr&#233;e.&lt;/p&gt; &lt;p&gt;Reste maintenant la fonction &lt;code class='spip_code' dir='ltr'&gt;extras_champs_anormaux()&lt;/code&gt;. Elle r&#233;cup&#232;re tous les champs r&#233;els en appelant &lt;code class='spip_code' dir='ltr'&gt;extra_base()&lt;/code&gt;, tous les champs SPIP d&#233;clar&#233;s en concat&#233;nant les tableaux &lt;code class='spip_code' dir='ltr'&gt;tables_principales&lt;/code&gt; et &lt;code class='spip_code' dir='ltr'&gt;tables_auxiliaires&lt;/code&gt;, et retourne la liste des champs pr&#233;sents en base, mais non d&#233;clar&#233;s &#224; SPIP.&lt;/p&gt; &lt;h3 class='h3 spip'&gt;Afficher les champs utilisables dans l'interface&lt;/h3&gt;
&lt;p&gt;Nous allons maintenant afficher ces champs dans l'interface graphique du plugin, avec des actions pour les associer ou les supprimer d&#233;finitivement.&lt;/p&gt; &lt;p&gt;Ajoutons d&#233;j&#224; l'appel &#224; un squelette les affichant dans &lt;code class='spip_code' dir='ltr'&gt;exec/iextras.php&lt;/code&gt; :&lt;/p&gt;
&lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.php .imp {font-weight: bold; color: red;}
.php .kw1 {color: #b1b100;}
.php .kw2 {color: #000000; font-weight: bold;}
.php .kw3 {color: #990000;}
.php .kw4 {color: #009900; font-weight: bold;}
.php .co1 {color: #666666; font-style: italic;}
.php .co2 {color: #666666; font-style: italic;}
.php .co3 {color: #0000cc; font-style: italic;}
.php .co4 {color: #009933; font-style: italic;}
.php .coMULTI {color: #666666; font-style: italic;}
.php .es0 {color: #000099; font-weight: bold;}
.php .es1 {color: #000099; font-weight: bold;}
.php .es2 {color: #660099; font-weight: bold;}
.php .es3 {color: #660099; font-weight: bold;}
.php .es4 {color: #006699; font-weight: bold;}
.php .es5 {color: #006699; font-weight: bold; font-style: italic;}
.php .es6 {color: #009933; font-weight: bold;}
.php .es_h {color: #000099; font-weight: bold;}
.php .br0 {color: #009900;}
.php .sy0 {color: #339933;}
.php .sy1 {color: #000000; font-weight: bold;}
.php .st0 {color: #0000ff;}
.php .st_h {color: #0000ff;}
.php .nu0 {color: #cc66cc;}
.php .nu8 {color: #208080;}
.php .nu12 {color: #208080;}
.php .nu19 {color:#800080;}
.php .me1 {color: #004000;}
.php .me2 {color: #004000;}
.php .re0 {color: #000088;}
.php span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;div class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;include_spip&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'inc/cextras_gerer'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; recuperer_fond&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'prive/contenu/champs_extras_possibles'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;st_h&quot;&gt;'extras'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt;extras_champs_anormaux&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/9c78d2cc5c974ac98b2e4d78503255e5.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Puis cr&#233;ons le squelette &lt;code class='spip_code' dir='ltr'&gt;champs_extras_possibles.html&lt;/code&gt;, sur le m&#234;me principe que son coll&#232;gue &lt;code class='spip_code' dir='ltr'&gt;prive/contenu/champs_extra.html&lt;/code&gt; :&lt;/p&gt;
&lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.spip2 .imp {font-weight: bold; color: red;}
.spip2 .coMULTI {color: #808080; font-style: italic;}
.spip2 .es0 {color: #000099; font-weight: bold;}
.spip2 .re0 {color: #E1861A;}
.spip2 .re1 {color: #CA5200;}
.spip2 .re2 {color: #e72;}
.spip2 .re10 {color: #527EE0;}
.spip2 .re11 {color: #222;}
.spip2 .re12 {color: #745E4B;}
.spip2 .re13 {color: #222;}
.spip2 .re20 {color: #527EE0;}
.spip2 .re21 {color: #222}
.spip2 .re22 {color: #745E4B;}
.spip2 .re23 {color: #222;}
.spip2 .re30 {color: #C90}
.spip2 .re31 {color: #C90}
.spip2 .re40 {color: #74B900;}
.spip2 .re50 {color: #E1861A;}
.spip2 span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re11&quot;&gt;&lt;BOUCLE_si_extras&lt;span class=&quot;re10&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;CONDITION&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;si &lt;span class=&quot;re1&quot;&gt;#ENV&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;extras&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re13&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#CHEMIN&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;images/iextras-24.png&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|debut_cadre_trait_couleur&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;, &quot;&quot;, &lt;span class=&quot;re30&quot;&gt;&lt;:iextras:liste_des_extras_possibles:&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re11&quot;&gt;&lt;BOUCLE_tables&lt;span class=&quot;re10&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;POUR&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;tableau &lt;span class=&quot;re1&quot;&gt;#ENV&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;**&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;extras&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re13&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;h2&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#VAL&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;iextras:table_&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|concat&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#CLE&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|replace&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;^spip_&lt;span class=&quot;re50&quot;&gt;|s&lt;/span&gt;$,''&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|_T&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/h2&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re11&quot;&gt;&lt;B_extras&lt;/span&gt;&lt;span class=&quot;re13&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;ul class=&quot;liste_extras_possibles&quot;&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re11&quot;&gt;&lt;BOUCLE_extras&lt;span class=&quot;re10&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;POUR&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;tableau &lt;span class=&quot;re1&quot;&gt;#VALEUR&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re13&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;li&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re1&quot;&gt;#CLE&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; | &lt;a href=&quot;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#URL_ACTION_AUTEUR&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;iextras, &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;associer_champ/&lt;span class=&quot;re1&quot;&gt;#&lt;span class=&quot;re2&quot;&gt;_tables:&lt;/span&gt;CLE&lt;/span&gt;/&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#CLE&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;, &lt;span class=&quot;re1&quot;&gt;#SELF&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&quot;&gt;&lt;span class=&quot;re30&quot;&gt;&lt;:iextras:action_associer:&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; | &lt;a href=&quot;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#URL_ACTION_AUTEUR&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;iextras, &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;supprimer_champ/&lt;span class=&quot;re1&quot;&gt;#&lt;span class=&quot;re2&quot;&gt;_tables:&lt;/span&gt;CLE&lt;/span&gt;/&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#CLE&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;, &lt;span class=&quot;re1&quot;&gt;#SELF&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&quot; class=&quot;supprimer&quot;&gt;&lt;span class=&quot;re30&quot;&gt;&lt;:iextras:action_supprimer:&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/li&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re11&quot;&gt;&lt;/BOUCLE_extras&lt;/span&gt;&lt;span class=&quot;re13&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/ul&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re11&quot;&gt;&lt;/B_extras&lt;/span&gt;&lt;span class=&quot;re13&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re11&quot;&gt;&lt;/BOUCLE_tables&lt;/span&gt;&lt;span class=&quot;re13&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;function&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;$&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re40&quot;&gt; $&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;'ul.liste_extras_possibles .supprimer'&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;.click&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;function&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re40&quot;&gt; return confirm&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&quot;&lt;span class=&quot;re30&quot;&gt;&lt;:iextras:supprimer_reelement&lt;span class=&quot;re50&quot;&gt;|attribut_html&lt;/span&gt;:&gt;&lt;/span&gt;&quot;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re40&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;jQuery&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;/script&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#VAL&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;1&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|fin_cadre_trait_couleur&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re11&quot;&gt;&lt;/BOUCLE_si_extras&lt;/span&gt;&lt;span class=&quot;re13&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/1f2bcbdaf78320f924fbeb4087a6460a.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Nous bouclons sur les diff&#233;rentes tables, puis sur les champs et nous affichons un lien pour associer et un lien pour supprimer le champ.&lt;/p&gt; &lt;p&gt;Nous en profitons pour ajouter en m&#234;me temps, sur l'autre squelette &lt;code class='spip_code' dir='ltr'&gt;prive/contenu/champs_extras.html&lt;/code&gt; un lien pour d&#233;sassocier un champ extra d&#233;clar&#233; :&lt;/p&gt;
&lt;form action='' method='get'&gt;&lt;div&gt;
&lt;input type='hidden' name='exec' value='' /&gt;
&lt;textarea readonly='readonly' cols='40' rows='3' class='spip_cadre' dir='ltr'&gt;| &lt;a href=&quot;[(#URL_ACTION_AUTEUR{iextras, [desassocier_extra/(#VALEUR|table_valeur{id_extra})], #SELF})]&quot;&gt;&lt;:iextras:action_desassocier:&gt;&lt;/a&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;/form&gt; &lt;p&gt;Il faut maintenant s'occuper de traiter les diff&#233;rentes actions.&lt;/p&gt; &lt;h3 class='h3 spip'&gt;Cr&#233;er les nouvelles actions&lt;/h3&gt;
&lt;p&gt;Modifions le fichier &lt;code class='spip_code' dir='ltr'&gt;actions/iextras.php&lt;/code&gt; pour lui ajouter ces traitements. Cela peut donner le r&#233;sultat ci-dessous. Chaque action appelle une fonction d&#233;di&#233;e. Notons juste le cas de l'association d'un champ SQL d&#233;j&#224; pr&#233;sent : apr&#232;s l'appel de la fonction d'association, on redirige la page vers le formulaire de modification. C'est un peu d&#233;routant, mais lorsqu'on ajoute un tel champ, une des premi&#232;res choses faite sera de renseigner correctement le label, donc envoyer sur le formulaire parait assez coh&#233;rent. (NdA : finalement j'ai r&#233;ellement trouv&#233; &#231;a trop d&#233;routant en pratique et j'ai mis en commentaire ce code)&lt;/p&gt; &lt;p&gt;Pour cela, on appelle la fonction &lt;code class='spip_code' dir='ltr'&gt;redirige_par_entete()&lt;/code&gt; pr&#233;sent dans la librairie &lt;code class='spip_code' dir='ltr'&gt;inc/header&lt;/code&gt;. Elle prend comme param&#232;tre l'URL de redirection et doit &#234;tre appel&#233;e avant tout affichage sur la page.&lt;/p&gt; &lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.php .imp {font-weight: bold; color: red;}
.php .kw1 {color: #b1b100;}
.php .kw2 {color: #000000; font-weight: bold;}
.php .kw3 {color: #990000;}
.php .kw4 {color: #009900; font-weight: bold;}
.php .co1 {color: #666666; font-style: italic;}
.php .co2 {color: #666666; font-style: italic;}
.php .co3 {color: #0000cc; font-style: italic;}
.php .co4 {color: #009933; font-style: italic;}
.php .coMULTI {color: #666666; font-style: italic;}
.php .es0 {color: #000099; font-weight: bold;}
.php .es1 {color: #000099; font-weight: bold;}
.php .es2 {color: #660099; font-weight: bold;}
.php .es3 {color: #660099; font-weight: bold;}
.php .es4 {color: #006699; font-weight: bold;}
.php .es5 {color: #006699; font-weight: bold; font-style: italic;}
.php .es6 {color: #009933; font-weight: bold;}
.php .es_h {color: #000099; font-weight: bold;}
.php .br0 {color: #009900;}
.php .sy0 {color: #339933;}
.php .sy1 {color: #000000; font-weight: bold;}
.php .st0 {color: #0000ff;}
.php .st_h {color: #0000ff;}
.php .nu0 {color: #cc66cc;}
.php .nu8 {color: #208080;}
.php .nu12 {color: #208080;}
.php .nu19 {color:#800080;}
.php .me1 {color: #004000;}
.php .me2 {color: #004000;}
.php .re0 {color: #000088;}
.php span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;div class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;&lt;?php&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/defined&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;defined&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&quot;_ECRIRE_INC_VERSION&quot;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; action_iextras_dist&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$securiser_action&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; charger_fonction&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'securiser_action'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'inc'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$arg&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$securiser_action&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;co1&quot;&gt;// droits&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; include_spip&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'inc/autoriser'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;autoriser&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'configurer'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'iextra'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; include_spip&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'inc/minipres'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; minipres&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;a href=&quot;http://www.php.net/exit&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;exit&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;sy0&quot;&gt;@&lt;/span&gt;&lt;a href=&quot;http://www.php.net/list&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;list&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$arg&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$id_extra_ou_table&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$champ&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/explode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;explode&lt;/span&gt;&lt;/a&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'/'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$arg&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;co1&quot;&gt;// actions possibles&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/in_array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;in_array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$arg&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;st_h&quot;&gt;'supprimer_extra'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;st_h&quot;&gt;'desassocier_extra'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;st_h&quot;&gt;'associer_champ'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;st_h&quot;&gt;'supprimer_champ'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; include_spip&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'inc/minipres'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; minipres&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;_T&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'iextras:erreur_action'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&quot;action&quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$arg&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;a href=&quot;http://www.php.net/exit&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;exit&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;co1&quot;&gt;// cas de suppression&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$arg&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'supprimer_extra'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; and &lt;span class=&quot;re0&quot;&gt;$id_extra&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$id_extra_ou_table&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; action_supprimer_champ_extra&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$id_extra&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;co1&quot;&gt;// cas de desassociation&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$arg&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'desassocier_extra'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; and &lt;span class=&quot;re0&quot;&gt;$id_extra&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$id_extra_ou_table&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; action_desassocier_champ_extra&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$id_extra&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;co1&quot;&gt;// cas de l'association d'un champ existant&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$arg&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'associer_champ'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; and &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$table&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$id_extra_ou_table&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; and &lt;span class=&quot;re0&quot;&gt;$champ&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$id_extra&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; action_associer_champ_sql_comme_champ_extra&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$table&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$champ&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;co1&quot;&gt;// si l'association fonctionne, rediriger vers le formulaire de modification du champ extra&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$id_extra&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;co1&quot;&gt;// redirection vers le formulaire d'edition du champ&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$redirect&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; generer_url_ecrire&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'iextras_edit'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$redirect&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; parametre_url&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$redirect&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'id_extra'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$id_extra&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'&amp;'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; include_spip&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'inc/header'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; redirige_par_entete&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$redirect&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;co1&quot;&gt;// cas de la suppression d'un champ existant&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$arg&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'supprimer_champ'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; and &lt;span class=&quot;re0&quot;&gt;$table&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$id_extra_ou_table&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; action_supprimer_champ_sql&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$table&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$champ&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;co1&quot;&gt;// suppression d'un champ extra donne&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; action_supprimer_champ_extra&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$id_extra&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; include_spip&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'inc/iextras'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$extras&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; iextras_get_extras&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$extras&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$i&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$extra&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$extra&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;get_id&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$id_extra&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; extras_log&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&quot;Suppression d'un champ par auteur &quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$GLOBALS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'auteur_session'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'id_auteur'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; extras_log&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$extra&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$table&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; table_objet_sql&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$extra&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;table&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; sql_alter&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&quot;TABLE &lt;span class=&quot;es4&quot;&gt;$table&lt;/span&gt; DROP &quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$extra&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;champ&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;a href=&quot;http://www.php.net/unset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;unset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$extras&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$i&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; iextras_set_extras&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$extras&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;break&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;co1&quot;&gt;// desassocier un champ extra &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;co1&quot;&gt;// (ne plus le gerer avec le plugin champ extra&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;co1&quot;&gt;// mais ne pas le supprimer de la base de donnee)&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; action_desassocier_champ_extra&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$id_extra&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; include_spip&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'inc/iextras'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$extras&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; iextras_get_extras&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$extras&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$i&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$extra&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$extra&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;get_id&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$id_extra&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; extras_log&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&quot;Desassociation du champ &lt;span class=&quot;es4&quot;&gt;$extra-&gt;table&lt;/span&gt;/&lt;span class=&quot;es4&quot;&gt;$extra-&gt;champ&lt;/span&gt; par auteur &quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$GLOBALS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'auteur_session'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'id_auteur'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;a href=&quot;http://www.php.net/unset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;unset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$extras&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$i&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; iextras_set_extras&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$extras&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;break&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;co1&quot;&gt;// definir un champ SQL existant comme un champ extra a prendre&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;co1&quot;&gt;// en compte par ce plugin&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; action_associer_champ_sql_comme_champ_extra&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$table&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$champ&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;co1&quot;&gt;// recuperer la description du champ&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; include_spip&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'inc/cextras_gerer'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$champs&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; extras_champs_anormaux&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/isset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$champs&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$table&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$champ&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$sql&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$champs&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$table&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$champ&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;co1&quot;&gt;// creer un champ extra avec ce champ&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$extra&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;new&lt;/span&gt; ChampExtra&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;st_h&quot;&gt;'table'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; objet_type&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$table&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;st_h&quot;&gt;'champ'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$champ&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;st_h&quot;&gt;'label'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'label_'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$champ&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;st_h&quot;&gt;'type'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;'input'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;st_h&quot;&gt;'sql'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$sql&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;co1&quot;&gt;// penser a creer une fonction pour ajouter et supprimer un champ...&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;co1&quot;&gt;// ajout du champ&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; extras_log&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&quot;Ajout d'un champ deja existant par auteur &quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$GLOBALS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'auteur_session'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'id_auteur'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; extras_log&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$extra&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$extras&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; iextras_get_extras&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$extras&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$extra&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; iextras_set_extras&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$extras&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;co1&quot;&gt;// retourner id_extra&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$extra&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;get_id&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;co1&quot;&gt;// suppression de la base d'un champ d'une table donnee.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; action_supprimer_champ_sql&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$table&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$champ&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;co1&quot;&gt;// recuperer les descriptions&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;co1&quot;&gt;// pour verifier que le champ n'est pas declare par quelqu'un&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; include_spip&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'inc/cextras_gerer'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$champs&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; extras_champs_anormaux&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/isset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$champs&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$table&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$champ&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;co1&quot;&gt;// suppression&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; extras_log&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&quot;Suppression du champ &lt;span class=&quot;es4&quot;&gt;$table&lt;/span&gt;/&lt;span class=&quot;es4&quot;&gt;$champ&lt;/span&gt; par auteur &quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$GLOBALS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'auteur_session'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'id_auteur'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$table&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; table_objet_sql&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$table&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; sql_alter&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&quot;TABLE &lt;span class=&quot;es4&quot;&gt;$table&lt;/span&gt; DROP &quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$champ&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;sy1&quot;&gt;?&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/eb0f0e2078e4bff26f985b08839ba708.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;h3 class='h3 spip'&gt;Ordonner les champs extras&lt;/h3&gt;
&lt;p&gt;Lorsqu'il y a au moins deux champs extras d&#233;clar&#233;s sur une table, on peut avoir envie de les afficher dans un certain ordre. Nous allons donc ajouter deux actions : monter et descendre. Par ailleurs, on ne peut pas monter le premier &#233;l&#233;ment ni descendre le dernier !&lt;/p&gt; &lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.spip2 .imp {font-weight: bold; color: red;}
.spip2 .coMULTI {color: #808080; font-style: italic;}
.spip2 .es0 {color: #000099; font-weight: bold;}
.spip2 .re0 {color: #E1861A;}
.spip2 .re1 {color: #CA5200;}
.spip2 .re2 {color: #e72;}
.spip2 .re10 {color: #527EE0;}
.spip2 .re11 {color: #222;}
.spip2 .re12 {color: #745E4B;}
.spip2 .re13 {color: #222;}
.spip2 .re20 {color: #527EE0;}
.spip2 .re21 {color: #222}
.spip2 .re22 {color: #745E4B;}
.spip2 .re23 {color: #222;}
.spip2 .re30 {color: #C90}
.spip2 .re31 {color: #C90}
.spip2 .re40 {color: #74B900;}
.spip2 .re50 {color: #E1861A;}
.spip2 span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#TOTAL_BOUCLE&lt;/span&gt;|&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;1&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|oui&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#COMPTEUR_BOUCLE&lt;/span&gt;|!=&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;1&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|oui&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; | &lt;a href=&quot;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#URL_ACTION_AUTEUR&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;iextras, &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;monter_extra/&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#VALEUR&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|table_valeur&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;id_extra&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;, &lt;span class=&quot;re1&quot;&gt;#SELF&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&quot;&gt;&lt;span class=&quot;re30&quot;&gt;&lt;:iextras:action_monter:&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#COMPTEUR_BOUCLE&lt;/span&gt;|!==&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#TOTAL_BOUCLE&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|oui&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; | &lt;a href=&quot;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#URL_ACTION_AUTEUR&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;iextras, &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;descendre_extra/&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#VALEUR&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|table_valeur&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;id_extra&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;, &lt;span class=&quot;re1&quot;&gt;#SELF&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&quot;&gt;&lt;span class=&quot;re30&quot;&gt;&lt;:iextras:action_descendre:&gt;&lt;/span&gt;&lt;/a&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/0fa5833a399d2a60d1128c0e19e12719.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;En ajoutant ces deux nouvelles actions, on remarque qu'il commence &#224; y en avoir beaucoup (d'actions) et que leur affichage est un peu le fouillis. Avant de traiter les actions, on va effectuer un peu de pr&#233;sentation CSS.&lt;/p&gt; &lt;p&gt;D'une part, nous allons mettre les actions dans une liste &lt;code class='spip_code' dir='ltr'&gt;ul/li&lt;/code&gt; :&lt;/p&gt;
&lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.spip2 .imp {font-weight: bold; color: red;}
.spip2 .coMULTI {color: #808080; font-style: italic;}
.spip2 .es0 {color: #000099; font-weight: bold;}
.spip2 .re0 {color: #E1861A;}
.spip2 .re1 {color: #CA5200;}
.spip2 .re2 {color: #e72;}
.spip2 .re10 {color: #527EE0;}
.spip2 .re11 {color: #222;}
.spip2 .re12 {color: #745E4B;}
.spip2 .re13 {color: #222;}
.spip2 .re20 {color: #527EE0;}
.spip2 .re21 {color: #222}
.spip2 .re22 {color: #745E4B;}
.spip2 .re23 {color: #222;}
.spip2 .re30 {color: #C90}
.spip2 .re31 {color: #C90}
.spip2 .re40 {color: #74B900;}
.spip2 .re50 {color: #E1861A;}
.spip2 span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;ul class=&quot;actions&quot;&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#TOTAL_BOUCLE&lt;/span&gt;|&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;1&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|oui&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#COMPTEUR_BOUCLE&lt;/span&gt;|!=&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;1&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|oui&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;li&gt;&lt;a href=&quot;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#URL_ACTION_AUTEUR&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;iextras, &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;monter_extra/&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#VALEUR&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|table_valeur&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;id_extra&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;, &lt;span class=&quot;re1&quot;&gt;#SELF&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&quot; title=&quot;&lt;span class=&quot;re30&quot;&gt;&lt;:iextras:action_monter_title&lt;span class=&quot;re50&quot;&gt;|attribut_html&lt;/span&gt;:&gt;&quot;&gt;&lt;:iextras:action_monter:&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#COMPTEUR_BOUCLE&lt;/span&gt;|!==&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#TOTAL_BOUCLE&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|oui&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;li&gt;&lt;a href=&quot;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#URL_ACTION_AUTEUR&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;iextras, &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;descendre_extra/&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#VALEUR&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|table_valeur&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;id_extra&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;, &lt;span class=&quot;re1&quot;&gt;#SELF&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&quot; title=&quot;&lt;span class=&quot;re30&quot;&gt;&lt;:iextras:action_descendre_title&lt;span class=&quot;re50&quot;&gt;|attribut_html&lt;/span&gt;:&gt;&quot;&gt;&lt;:iextras:action_descendre:&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;li&gt;&lt;a href=&quot;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#URL_ECRIRE&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;iextras_edit&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|parametre_url&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;id_extra,&lt;span class=&quot;re1&quot;&gt;#VALEUR&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|table_valeur&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;id_extra&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&quot; title=&quot;&lt;span class=&quot;re30&quot;&gt;&lt;:iextras:action_modifier_title&lt;span class=&quot;re50&quot;&gt;|attribut_html&lt;/span&gt;:&gt;&quot;&gt;&lt;:iextras:action_modifier:&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;li&gt;&lt;a href=&quot;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#URL_ACTION_AUTEUR&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;iextras, &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;desassocier_extra/&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#VALEUR&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|table_valeur&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;id_extra&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;, &lt;span class=&quot;re1&quot;&gt;#SELF&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&quot; title=&quot;&lt;span class=&quot;re30&quot;&gt;&lt;:iextras:action_desassocier_title&lt;span class=&quot;re50&quot;&gt;|attribut_html&lt;/span&gt;:&gt;&quot;&gt;&lt;:iextras:action_desassocier:&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;li&gt;&lt;a href=&quot;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#URL_ACTION_AUTEUR&lt;/span&gt;&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;iextras, &lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;supprimer_extra/&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#VALEUR&lt;/span&gt;&lt;span class=&quot;re50&quot;&gt;|table_valeur&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;id_extra&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;, &lt;span class=&quot;re1&quot;&gt;#SELF&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&quot; class=&quot;supprimer&quot; title=&quot;&lt;span class=&quot;re30&quot;&gt;&lt;:iextras:action_supprimer_title&lt;span class=&quot;re50&quot;&gt;|attribut_html&lt;/span&gt;:&gt;&quot;&gt;&lt;:iextras:action_supprimer:&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/b3a58db4f08b6ed74242c875fd5f0501.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;h3 class='h3 spip'&gt;Ajouter du CSS dans l'interface priv&#233;&lt;/h3&gt;
&lt;p&gt;Ensuite, nous allons ajouter du CSS pour pr&#233;senter cette liste. Comment ? Tr&#232;s simple, chaque plugin peut d&#233;clarer un fichier &lt;code class='spip_code' dir='ltr'&gt;prive/style_prive_plugin_prefix.html&lt;/code&gt; qui sera interpr&#233;t&#233; comme un fichier css. Cr&#233;ons le fichier &lt;code class='spip_code' dir='ltr'&gt;prive/style_prive_plugin_iextras.html&lt;/code&gt; et ajoutons dedans :&lt;/p&gt;
&lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.spip2 .imp {font-weight: bold; color: red;}
.spip2 .coMULTI {color: #808080; font-style: italic;}
.spip2 .es0 {color: #000099; font-weight: bold;}
.spip2 .re0 {color: #E1861A;}
.spip2 .re1 {color: #CA5200;}
.spip2 .re2 {color: #e72;}
.spip2 .re10 {color: #527EE0;}
.spip2 .re11 {color: #222;}
.spip2 .re12 {color: #745E4B;}
.spip2 .re13 {color: #222;}
.spip2 .re20 {color: #527EE0;}
.spip2 .re21 {color: #222}
.spip2 .re22 {color: #745E4B;}
.spip2 .re23 {color: #222;}
.spip2 .re30 {color: #C90}
.spip2 .re31 {color: #C90}
.spip2 .re40 {color: #74B900;}
.spip2 .re50 {color: #E1861A;}
.spip2 span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;ul.actions &lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;text-align:right;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;ul.actions li&lt;span class=&quot;re40&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;display:inline; padding-right:3px; border-right:1px solid &lt;span class=&quot;re1&quot;&gt;#&lt;/span&gt;&lt;span class=&quot;re1&quot;&gt;#ENV&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;couleur_claire&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/68a298af028aae4fc39c766c7ce99a44.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;On remarquera que ce squelette re&#231;oit quelques param&#232;tres (&lt;code class='spip_code' dir='ltr'&gt;lang&lt;/code&gt;, &lt;code class='spip_code' dir='ltr'&gt;couleur_foncee&lt;/code&gt;, &lt;code class='spip_code' dir='ltr'&gt;couleur_claire&lt;/code&gt; et &lt;code class='spip_code' dir='ltr'&gt;ltr&lt;/code&gt; (direction de la langue)). Nous utilisons ici la couleur claire pour mettre une petite bordure.&lt;/p&gt; &lt;p&gt;Par contre, voir les modifications CSS dans le priv&#233; n'est pas simple du tout car d'une part les CSS sont compact&#233;es automatiquement dans l'espace priv&#233;, mais on peut d&#233;sactiver cela en ajoutant dans son fichier d'option :&lt;/p&gt;
&lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.spip2 .imp {font-weight: bold; color: red;}
.spip2 .coMULTI {color: #808080; font-style: italic;}
.spip2 .es0 {color: #000099; font-weight: bold;}
.spip2 .re0 {color: #E1861A;}
.spip2 .re1 {color: #CA5200;}
.spip2 .re2 {color: #e72;}
.spip2 .re10 {color: #527EE0;}
.spip2 .re11 {color: #222;}
.spip2 .re12 {color: #745E4B;}
.spip2 .re13 {color: #222;}
.spip2 .re20 {color: #527EE0;}
.spip2 .re21 {color: #222}
.spip2 .re22 {color: #745E4B;}
.spip2 .re23 {color: #222;}
.spip2 .re30 {color: #C90}
.spip2 .re31 {color: #C90}
.spip2 .re40 {color: #74B900;}
.spip2 .re50 {color: #E1861A;}
.spip2 span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;define&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;'_INTERDIRE_COMPACTE_HEAD_ECRIRE',true&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Et d'autre part, ce sont des CSS calcul&#233;es &#224; partir de squelettes SPIP, et les faire recalculer n'est pas simple. Le plus rapide &#233;tant de vider &#224; la fois le cache de SPIP et celui du navigateur.&lt;/p&gt; &lt;h3 class='h3 spip'&gt;Traiter les actions monter et descendre&lt;/h3&gt;
&lt;p&gt;Nous allons utiliser une fonction assez g&#233;niale de PHP pour cela : &lt;code class='spip_code' dir='ltr'&gt;array_splice()&lt;/code&gt;. Cette fonction permet d'ins&#233;rer ou de remplacer des &#233;l&#233;ments dans un tableau. Nous allons l'utiliser pour ins&#233;rer notre champ d&#233;plac&#233; au bon endroit.&lt;/p&gt; &lt;p&gt;Pour cela, on ordonne notre tableau pour avoir tous les champs d'une m&#234;me table &#224; la suite, puis il suffit de remonter ou descendre un &#233;l&#233;ment pour modifier l'ordre.&lt;/p&gt; &lt;p&gt;Commen&#231;ons par trier les champs par table :&lt;/p&gt;
&lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.php .imp {font-weight: bold; color: red;}
.php .kw1 {color: #b1b100;}
.php .kw2 {color: #000000; font-weight: bold;}
.php .kw3 {color: #990000;}
.php .kw4 {color: #009900; font-weight: bold;}
.php .co1 {color: #666666; font-style: italic;}
.php .co2 {color: #666666; font-style: italic;}
.php .co3 {color: #0000cc; font-style: italic;}
.php .co4 {color: #009933; font-style: italic;}
.php .coMULTI {color: #666666; font-style: italic;}
.php .es0 {color: #000099; font-weight: bold;}
.php .es1 {color: #000099; font-weight: bold;}
.php .es2 {color: #660099; font-weight: bold;}
.php .es3 {color: #660099; font-weight: bold;}
.php .es4 {color: #006699; font-weight: bold;}
.php .es5 {color: #006699; font-weight: bold; font-style: italic;}
.php .es6 {color: #009933; font-weight: bold;}
.php .es_h {color: #000099; font-weight: bold;}
.php .br0 {color: #009900;}
.php .sy0 {color: #339933;}
.php .sy1 {color: #000000; font-weight: bold;}
.php .st0 {color: #0000ff;}
.php .st_h {color: #0000ff;}
.php .nu0 {color: #cc66cc;}
.php .nu8 {color: #208080;}
.php .nu12 {color: #208080;}
.php .nu19 {color:#800080;}
.php .me1 {color: #004000;}
.php .me2 {color: #004000;}
.php .re0 {color: #000088;}
.php span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;div class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;co1&quot;&gt;// tableau des extras, tries par table SQL&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; iextras_get_extras_tries_par_table&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$extras&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; iextras_get_extras&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$tables&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$extras_tries&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$extras&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$e&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/isset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;isset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$tables&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$e&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;table&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$tables&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$e&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;table&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$tables&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$e&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;table&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$e&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;a href=&quot;http://www.php.net/sort&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;sort&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$tables&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$tables&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$table&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$table&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$extra&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$extras_tries&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$extra&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$extras_tries&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/2fba2ed3c65eed4e38d869294536aa49.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Ensuite, nous pouvons ajouter les actions monter et descendre :&lt;/p&gt;
&lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.php .imp {font-weight: bold; color: red;}
.php .kw1 {color: #b1b100;}
.php .kw2 {color: #000000; font-weight: bold;}
.php .kw3 {color: #990000;}
.php .kw4 {color: #009900; font-weight: bold;}
.php .co1 {color: #666666; font-style: italic;}
.php .co2 {color: #666666; font-style: italic;}
.php .co3 {color: #0000cc; font-style: italic;}
.php .co4 {color: #009933; font-style: italic;}
.php .coMULTI {color: #666666; font-style: italic;}
.php .es0 {color: #000099; font-weight: bold;}
.php .es1 {color: #000099; font-weight: bold;}
.php .es2 {color: #660099; font-weight: bold;}
.php .es3 {color: #660099; font-weight: bold;}
.php .es4 {color: #006699; font-weight: bold;}
.php .es5 {color: #006699; font-weight: bold; font-style: italic;}
.php .es6 {color: #009933; font-weight: bold;}
.php .es_h {color: #000099; font-weight: bold;}
.php .br0 {color: #009900;}
.php .sy0 {color: #339933;}
.php .sy1 {color: #000000; font-weight: bold;}
.php .st0 {color: #0000ff;}
.php .st_h {color: #0000ff;}
.php .nu0 {color: #cc66cc;}
.php .nu8 {color: #208080;}
.php .nu12 {color: #208080;}
.php .nu19 {color:#800080;}
.php .me1 {color: #004000;}
.php .me2 {color: #004000;}
.php .re0 {color: #000088;}
.php span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;div class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;co1&quot;&gt;// remonter d'un cran un champ extra&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; action_monter_champ_extra&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$id_extra&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; include_spip&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'inc/iextras'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$extras&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; iextras_get_extras_tries_par_table&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$extras&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$i&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$extra&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$extra&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;get_id&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$id_extra&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; extras_log&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&quot;Remonter le champ &lt;span class=&quot;es4&quot;&gt;$extra-&gt;table&lt;/span&gt;/&lt;span class=&quot;es4&quot;&gt;$extra-&gt;champ&lt;/span&gt; par auteur &quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$GLOBALS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'auteur_session'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'id_auteur'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$i&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!==&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;a href=&quot;http://www.php.net/unset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;unset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$extras&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$i&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;a href=&quot;http://www.php.net/array_splice&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array_splice&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$extras&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$i&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$extra&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; iextras_set_extras&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$extras&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;break&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;co1&quot;&gt;// descendre d'un cran un champ extra&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; action_descendre_champ_extra&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$id_extra&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; include_spip&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'inc/iextras'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$extras&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; iextras_get_extras_tries_par_table&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$total&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/count&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;count&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$extras&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;foreach&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$extras&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$i&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$extra&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$extra&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;-&gt;&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;get_id&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$id_extra&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; extras_log&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&quot;Descendre le champ &lt;span class=&quot;es4&quot;&gt;$extra-&gt;table&lt;/span&gt;/&lt;span class=&quot;es4&quot;&gt;$extra-&gt;champ&lt;/span&gt; par auteur &quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$GLOBALS&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'auteur_session'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'id_auteur'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$i&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;!==&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$total&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;a href=&quot;http://www.php.net/unset&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;unset&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$extras&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$i&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;a href=&quot;http://www.php.net/array_splice&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array_splice&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$extras&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$i&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$extra&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; iextras_set_extras&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$extras&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;break&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/5e43df41bd20f3c14c420dcce5ebd93d.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;R&#233;sultat des courses : &lt;a href='http://zone.spip.org/trac/spip-zone/changeset/25572' class='spip_out' rel='nofollow external'&gt;http://zone.spip.org/trac/spip-zone...&lt;/a&gt; (et petit &#171; &lt;a href='http://zone.spip.org/trac/spip-zone/changeset/25573' class='spip_out' rel='external'&gt;oups&lt;/a&gt; &#187;).&lt;/p&gt; &lt;h3 class='h3 spip'&gt;Afficher une boite d'information&lt;/h3&gt;
&lt;p&gt;Pour terminer ce plugin, nous allons ajouter des descriptions sur les pages de l'interface. Rien de transcendant, mais il existe des fonctions et pipelines d&#233;j&#224; pr&#233;vus, alors utilisons les !&lt;/p&gt; &lt;p&gt;Commen&#231;ons par cr&#233;er les chaines de langues :&lt;/p&gt;
&lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.php .imp {font-weight: bold; color: red;}
.php .kw1 {color: #b1b100;}
.php .kw2 {color: #000000; font-weight: bold;}
.php .kw3 {color: #990000;}
.php .kw4 {color: #009900; font-weight: bold;}
.php .co1 {color: #666666; font-style: italic;}
.php .co2 {color: #666666; font-style: italic;}
.php .co3 {color: #0000cc; font-style: italic;}
.php .co4 {color: #009933; font-style: italic;}
.php .coMULTI {color: #666666; font-style: italic;}
.php .es0 {color: #000099; font-weight: bold;}
.php .es1 {color: #000099; font-weight: bold;}
.php .es2 {color: #660099; font-weight: bold;}
.php .es3 {color: #660099; font-weight: bold;}
.php .es4 {color: #006699; font-weight: bold;}
.php .es5 {color: #006699; font-weight: bold; font-style: italic;}
.php .es6 {color: #009933; font-weight: bold;}
.php .es_h {color: #000099; font-weight: bold;}
.php .br0 {color: #009900;}
.php .sy0 {color: #339933;}
.php .sy1 {color: #000000; font-weight: bold;}
.php .st0 {color: #0000ff;}
.php .st_h {color: #0000ff;}
.php .nu0 {color: #cc66cc;}
.php .nu8 {color: #208080;}
.php .nu12 {color: #208080;}
.php .nu19 {color:#800080;}
.php .me1 {color: #004000;}
.php .me2 {color: #004000;}
.php .re0 {color: #000088;}
.php span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;div class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;st_h&quot;&gt;'info_description_champ_extra'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&quot;Cette page permet de g&amp;eacute;rer des champs extras, &lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;st0&quot;&gt; c'est &amp;agrave; dire des champs suppl&amp;eacute;mentaires dans les tables de SPIP,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;st0&quot;&gt; pris en compte dans les formulaires d'&amp;eacute;dition.&quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;st_h&quot;&gt;'info_description_champ_extra_creer'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&quot;Vous pouvez cr&amp;eacute;er de nouveaux champs qui s'afficheront alors&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;st0&quot;&gt; sur cette page, dans le cadre &#171;Liste des champs extras&#187;, ainsi que dans les formulaires.&quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;st_h&quot;&gt;'info_description_champ_extra_presents'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&quot;Enfin, si des champs existent d&amp;eacute;j&amp;agrave; dans votre base de donn&amp;eacute;e,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;st0&quot;&gt; mais ne sont pas d&amp;eacute;clar&amp;eacute;s (par un plugin ou un jeu de squelettes), vous&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;st0&quot;&gt; pouvez demander &amp;agrave; ce plugin de les g&amp;eacute;rer. Ces champs, s'il y en a,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;st0&quot;&gt; apparaissent dans un cadre &#171;Liste des champs pr&amp;eacute;sents non g&amp;eacute;r&amp;eacute;s&#187;.&quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/4a9328daf4588b4639ed7e3e48783205.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Puis cr&#233;ons une nouvelle fonction &lt;code class='spip_code' dir='ltr'&gt;cadre_champs_extras_infos()&lt;/code&gt; dans le fichier &lt;code class='spip_code' dir='ltr'&gt;exec/iextras.php&lt;/code&gt;. Elle contient simplement l'appel d'un pipeline &lt;code class='spip_code' dir='ltr'&gt;boite_infos&lt;/code&gt; avec un param&#232;tre &lt;code class='spip_code' dir='ltr'&gt;type&lt;/code&gt; indiquant quelle information afficher :&lt;/p&gt;
&lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.php .imp {font-weight: bold; color: red;}
.php .kw1 {color: #b1b100;}
.php .kw2 {color: #000000; font-weight: bold;}
.php .kw3 {color: #990000;}
.php .kw4 {color: #009900; font-weight: bold;}
.php .co1 {color: #666666; font-style: italic;}
.php .co2 {color: #666666; font-style: italic;}
.php .co3 {color: #0000cc; font-style: italic;}
.php .co4 {color: #009933; font-style: italic;}
.php .coMULTI {color: #666666; font-style: italic;}
.php .es0 {color: #000099; font-weight: bold;}
.php .es1 {color: #000099; font-weight: bold;}
.php .es2 {color: #660099; font-weight: bold;}
.php .es3 {color: #660099; font-weight: bold;}
.php .es4 {color: #006699; font-weight: bold;}
.php .es5 {color: #006699; font-weight: bold; font-style: italic;}
.php .es6 {color: #009933; font-weight: bold;}
.php .es_h {color: #000099; font-weight: bold;}
.php .br0 {color: #009900;}
.php .sy0 {color: #339933;}
.php .sy1 {color: #000000; font-weight: bold;}
.php .st0 {color: #0000ff;}
.php .st_h {color: #0000ff;}
.php .nu0 {color: #cc66cc;}
.php .nu8 {color: #208080;}
.php .nu12 {color: #208080;}
.php .nu19 {color:#800080;}
.php .me1 {color: #004000;}
.php .me2 {color: #004000;}
.php .re0 {color: #000088;}
.php span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;div class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;co1&quot;&gt;// afficher les informations de la page&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; cadre_champs_extras_infos&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;re0&quot;&gt;$boite&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; pipeline &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'boite_infos'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'data'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;''&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;st_h&quot;&gt;'args'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;st_h&quot;&gt;'type'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'champs_extras'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$boite&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;kw1&quot;&gt;return&lt;/span&gt; debut_boite_info&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$boite&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; fin_boite_info&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;kw4&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/617c649bcf5c2275f12c73131c123d85.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Nous appelons la fonction dans la partie gauche de la page comme ceci :&lt;/p&gt;
&lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.php .imp {font-weight: bold; color: red;}
.php .kw1 {color: #b1b100;}
.php .kw2 {color: #000000; font-weight: bold;}
.php .kw3 {color: #990000;}
.php .kw4 {color: #009900; font-weight: bold;}
.php .co1 {color: #666666; font-style: italic;}
.php .co2 {color: #666666; font-style: italic;}
.php .co3 {color: #0000cc; font-style: italic;}
.php .co4 {color: #009933; font-style: italic;}
.php .coMULTI {color: #666666; font-style: italic;}
.php .es0 {color: #000099; font-weight: bold;}
.php .es1 {color: #000099; font-weight: bold;}
.php .es2 {color: #660099; font-weight: bold;}
.php .es3 {color: #660099; font-weight: bold;}
.php .es4 {color: #006699; font-weight: bold;}
.php .es5 {color: #006699; font-weight: bold; font-style: italic;}
.php .es6 {color: #009933; font-weight: bold;}
.php .es_h {color: #000099; font-weight: bold;}
.php .br0 {color: #009900;}
.php .sy0 {color: #339933;}
.php .sy1 {color: #000000; font-weight: bold;}
.php .st0 {color: #0000ff;}
.php .st_h {color: #0000ff;}
.php .nu0 {color: #cc66cc;}
.php .nu8 {color: #208080;}
.php .nu12 {color: #208080;}
.php .nu19 {color:#800080;}
.php .me1 {color: #004000;}
.php .me2 {color: #004000;}
.php .re0 {color: #000088;}
.php span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;div class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;co1&quot;&gt;// colonne gauche&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; debut_gauche&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;''&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kw4&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; cadre_champs_extras_infos&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;echo&lt;/span&gt; pipeline&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'affiche_gauche'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'args'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt;array&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'exec'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'iextras'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'data'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;''&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/91566b6cc766fd189777b0243a1932b1.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Le pipeline &#171; boite_infos &#187; appelle automatiquement un squelette &lt;code class='spip_code' dir='ltr'&gt;prive/infos/$type&lt;/code&gt; avec les autres param&#232;tres qui lui sont transmis (ici il n'y a pas d'autre chose que &#171; type &#187;), mais pour les infos de la page auteur sont transmis l'&lt;code class='spip_code' dir='ltr'&gt;id_auteur&lt;/code&gt; ainsi que tout le contenu de l'entr&#233;e SQL de l'auteur en question (&lt;code class='spip_code' dir='ltr'&gt;row&lt;/code&gt;) :&lt;/p&gt;
&lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.php .imp {font-weight: bold; color: red;}
.php .kw1 {color: #b1b100;}
.php .kw2 {color: #000000; font-weight: bold;}
.php .kw3 {color: #990000;}
.php .kw4 {color: #009900; font-weight: bold;}
.php .co1 {color: #666666; font-style: italic;}
.php .co2 {color: #666666; font-style: italic;}
.php .co3 {color: #0000cc; font-style: italic;}
.php .co4 {color: #009933; font-style: italic;}
.php .coMULTI {color: #666666; font-style: italic;}
.php .es0 {color: #000099; font-weight: bold;}
.php .es1 {color: #000099; font-weight: bold;}
.php .es2 {color: #660099; font-weight: bold;}
.php .es3 {color: #660099; font-weight: bold;}
.php .es4 {color: #006699; font-weight: bold;}
.php .es5 {color: #006699; font-weight: bold; font-style: italic;}
.php .es6 {color: #009933; font-weight: bold;}
.php .es_h {color: #000099; font-weight: bold;}
.php .br0 {color: #009900;}
.php .sy0 {color: #339933;}
.php .sy1 {color: #000000; font-weight: bold;}
.php .st0 {color: #0000ff;}
.php .st_h {color: #0000ff;}
.php .nu0 {color: #cc66cc;}
.php .nu8 {color: #208080;}
.php .nu12 {color: #208080;}
.php .nu19 {color:#800080;}
.php .me1 {color: #004000;}
.php .me2 {color: #004000;}
.php .re0 {color: #000088;}
.php span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;div class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$boite&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; pipeline &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'boite_infos'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'data'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;''&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;st_h&quot;&gt;'args'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;st_h&quot;&gt;'type'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;'auteur'&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;st_h&quot;&gt;'id'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$id_auteur&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;st_h&quot;&gt;'row'&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&gt;&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$auteur&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class='cadre_download' style='text-align: right;'&gt; &lt;a href='http://marcimat.magraine.net/local/cache-code/a30ec55b0f877e1de3170f69cbcda6ae.txt' style='font-family: verdana, arial, sans; font-weight: bold; font-style: normal;'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Bref, il nous suffit donc, pour avoir quelque chose de fonctionnel, de cr&#233;er le squelette &lt;code class='spip_code' dir='ltr'&gt;prive/infos/champs_extras.html&lt;/code&gt; avec :&lt;/p&gt;
&lt;style type='text/css'&gt;/** * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann * (http://qbnz.com/highlighter/ and http://geshi.org/) */
.spip2 .imp {font-weight: bold; color: red;}
.spip2 .coMULTI {color: #808080; font-style: italic;}
.spip2 .es0 {color: #000099; font-weight: bold;}
.spip2 .re0 {color: #E1861A;}
.spip2 .re1 {color: #CA5200;}
.spip2 .re2 {color: #e72;}
.spip2 .re10 {color: #527EE0;}
.spip2 .re11 {color: #222;}
.spip2 .re12 {color: #745E4B;}
.spip2 .re13 {color: #222;}
.spip2 .re20 {color: #527EE0;}
.spip2 .re21 {color: #222}
.spip2 .re22 {color: #745E4B;}
.spip2 .re23 {color: #222;}
.spip2 .re30 {color: #C90}
.spip2 .re31 {color: #C90}
.spip2 .re40 {color: #74B900;}
.spip2 .re50 {color: #E1861A;}
.spip2 span.xtra { display:block; }
&lt;/style&gt;&lt;div class=&quot;coloration_code&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;div class=&quot;spip2&quot;&gt;&lt;