<?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>La graine de Marcimat</title>
	<link>http://marcimat.magraine.net/</link>
	<description>&#171; La graine de Marcimat &#187; 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" rel="self" type="application/rss+xml" />




<item xml:lang="fr">
		<title>Un crayon listant des liaisons</title>
		<link>http://marcimat.magraine.net/Un-crayon-listant-des-liaisons</link>
		<guid isPermaLink="true">http://marcimat.magraine.net/Un-crayon-listant-des-liaisons</guid>
		<dc:date>2012-11-14T18:25:33Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>Matthieu Marcillaud</dc:creator>



		<description>
&lt;p&gt;Les crayons, c'est facile d'utilisation, surtout quand on veut modifier des &#233;l&#233;ments de la table en cours de lecture. Mais lorsqu'il s'agit d'&#233;l&#233;ments li&#233;s, comme des mots cl&#233;s sur des auteurs, le parcours est plus d&#233;licat !&lt;br class='autobr' /&gt;
Cet article pr&#233;sente une solution pour obtenir cela. Le code m&#233;riterait d'&#234;tre am&#233;lior&#233;, mais il pr&#233;sente une base de travail pour ceux qui aimeraient copier :)&lt;br class='autobr' /&gt;
Tout d'abord, pr&#233;cisons que cet exemple concerne SPIP 2.1. Certaines parties m&#233;riteraient d'&#234;tre r&#233;adapt&#233;es pour SPIP 3 (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;Les crayons, c'est facile d'utilisation, surtout quand on veut modifier des &#233;l&#233;ments de la table en cours de lecture. Mais lorsqu'il s'agit d'&#233;l&#233;ments li&#233;s, comme des mots cl&#233;s sur des auteurs, le parcours est plus d&#233;licat !&lt;/p&gt; &lt;p&gt;Cet article pr&#233;sente une solution pour obtenir cela. Le code m&#233;riterait d'&#234;tre am&#233;lior&#233;, mais il pr&#233;sente une base de travail pour ceux qui aimeraient copier :)&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;p&gt;Tout d'abord, pr&#233;cisons que cet exemple concerne SPIP 2.1. Certaines parties m&#233;riteraient d'&#234;tre r&#233;adapt&#233;es pour SPIP 3 (mais devraient aussi fonctionner).&lt;/p&gt; &lt;p&gt;Nous avions besoin d'un listing d'auteurs o&#249; il serait facile de choisir des mots d'un groupe de mots donn&#233; (le num&#233;ro 40) avec un crayon. Dans notre cas le nombre de mots du groupe est limit&#233; (environ 10 mots) ce qui permet une interface assez simple : on liste tous les mots du groupe dans un s&#233;lecteur multiple.&lt;/p&gt; &lt;p&gt;Nous avons une liste d'auteurs (les lignes), et la colonne montr&#233;e indique les mots cl&#233;s attach&#233;s (des m&#233;tiers) aux auteurs. C'est eux que l'on veut &#233;diter avec un crayon.&lt;/p&gt; &lt;p&gt;&lt;span class='spip_document_338 spip_documents spip_documents_center'&gt;
&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L257xH240/sc3a9lection4ef6-2a678.png' width='257' height='240' alt=&quot;Liste d'auteurs avec les mots associ&#233;s&quot; title=&quot;Liste d'auteurs avec les mots associ&#233;s&quot; /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;Commen&#231;ons par montrer le code permettant d'amener l'icone de crayon sur la liste :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;pre class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;td class=&quot;categorie &lt;span style=&quot;color: #D05000;&quot;&gt;#EDIT&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{ctags}&lt;/span&gt;&quot;&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;BOUCLE_cat&lt;/span&gt;&lt;span style=&quot;color: #527EE0;&quot;&gt;(MOTS)&lt;/span&gt;&lt;span style=&quot;color: #984CFF;&quot;&gt;&lt;span style=&quot;&quot;&gt;{id_auteur}&lt;/span&gt;&lt;span style=&quot;&quot;&gt;{id_groupe=40}&lt;/span&gt;&lt;span style=&quot;&quot;&gt;{', '}&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#TITRE&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|supprimer_numero&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;/BOUCLE_cat&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	---&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;//B_cat&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;/td&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/27bc3bea59724b9af424d2821a84967d.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Nous sommes &#224; l'int&#233;rieur d'une boucle auteur (non pr&#233;sent&#233;e ici) et notre colonne est affich&#233;e gr&#226;ce &#224; une boucle sur les mots de m&#234;me auteur, du groupe 40. Sur la balise &lt;code class='spip_code' dir='ltr'&gt;td&lt;/code&gt; du tableau, nous appelons le crayons nomm&#233; &lt;code class='spip_code' dir='ltr'&gt;ctags&lt;/code&gt; avec &lt;code class='spip_code' dir='ltr'&gt;#EDIT{ctags}&lt;/code&gt;, comme n'importe quel crayon habituel, sauf qu'ici, la colonne &#171; ctags &#187; n'existe pas dans notre table auteurs.&lt;/p&gt; &lt;p&gt;Il va falloir indiquer &#224; crayons :&lt;/p&gt;
&lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; comment obtenir les donn&#233;es du formulaire &#224; afficher, via une fonction PHP&lt;/li&gt;&lt;li&gt; quel formulaire afficher, via un contr&#244;leur et une saisie&lt;/li&gt;&lt;li&gt; comment enregistrer les donn&#233;es saisies, via une fonction PHP&lt;/li&gt;&lt;li&gt; comment r&#233;afficher le r&#233;sultat, via une vue&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Le plugin crayons sait g&#233;rer des formulaires traitant plusieurs types de champs d'un coup ; par exemple le crayon &#171; introduction &#187; affiche 3 champs : description, chapeau et texte (de m&#233;moire) et g&#232;re leur enregistrement. Il utilise pour &#231;a 1 contr&#244;leur, qui obtient les donn&#233;es des 3 champs et affiche les 3 champs de formulaire.&lt;/p&gt; &lt;p&gt;Nous, nous avons besoin d'1 contr&#244;leur, pour obtenir 1 champ de formulaire, mais les donn&#233;es du champ sont obtenues et enregistr&#233;es en plusieurs endroits ensuite. Le fait d'avoir 1 seul champ nous dispense de devoir cr&#233;er un contr&#244;leur PHP en plus du HTML, qui serait indispensable pour d&#233;clarer les champs utilis&#233;s dans le contr&#244;leur sinon. Ici, Crayons comprend que le champ souhait&#233; porte le m&#234;me nom que le contr&#244;leur.&lt;/p&gt; &lt;p&gt;Commen&#231;ons par le plus simple.&lt;/p&gt;
&lt;h3 class=&quot;spip&quot;&gt;Le contr&#244;leur et sa saisie&lt;/h3&gt;
&lt;p&gt;Il affiche le formulaire et porte le nom indiqu&#233; dans la balise &lt;code class='spip_code' dir='ltr'&gt;#EDIT&lt;/code&gt;, soit ici &lt;code class='spip_code' dir='ltr'&gt;controleurs/ctags.html&lt;/code&gt;. Il contient :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;pre class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#CACHE&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{0}&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#SET&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{mots,&lt;span style=&quot;color: #D05000;&quot;&gt;#ARRAY&lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;BOUCLE_mots_actifs&lt;/span&gt;&lt;span style=&quot;color: #527EE0;&quot;&gt;(MOTS)&lt;/span&gt;&lt;span style=&quot;color: #984CFF;&quot;&gt;&lt;span style=&quot;&quot;&gt;{id_groupe=40}&lt;/span&gt;&lt;span style=&quot;&quot;&gt;{id_auteur}&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#SET_PUSH&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{mots,&lt;span style=&quot;color: #D05000;&quot;&gt;#ID_MOT&lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;/BOUCLE_mots_actifs&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;ul&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#SAISIE&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{ctags, content_&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;{key}_ctags, id_groupe=40, class=crayons-active, valeur=&lt;span style=&quot;color: #D05000;&quot;&gt;#GET&lt;/span&gt;{mots},&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;	label=&lt;span style=&quot;color: #C90&quot;&gt;&lt;:utilisateurs:label_categorie:&gt;&lt;/span&gt;}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/777bcd9cbc6579e6305d73b957a97769.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;La premi&#232;re partie s'amuse &#224; retrouver les mots d&#233;j&#224; associ&#233;s &#224; l'auteur et les stocke dans une variable &#171; mots &#187; qui est pass&#233;e, ensuite comme valeur de la saisie &#171; ctags &#187;. Cette saisie va lister les mots du groupe 40 et s&#233;lectionner ceux qui sont d&#233;j&#224; associ&#233;s &#224; l'auteur.&lt;/p&gt; &lt;p&gt;Il est important de noter que la saisie cr&#233;e un attribut &lt;code class='spip_code' dir='ltr'&gt;name&lt;/code&gt; de nom : &lt;code class='spip_code' dir='ltr'&gt;content_X_ctags&lt;/code&gt; o&#249; &lt;code class='spip_code' dir='ltr'&gt;X&lt;/code&gt; est un identifiant attribu&#233; par crayons.&lt;/p&gt; &lt;p&gt;La saisie &lt;code class='spip_code' dir='ltr'&gt;saisies/ctags.html&lt;/code&gt; est simple (enfin c'est relatif, mais c'est juste un copi&#233; coll&#233; adapt&#233; d'une autre saisie) :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;pre class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#REM&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt; defaut peut &#234;tre une chaine (plusieurs valeurs ou pas) qu'on sait d&#233;composer &lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#SET&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{defaut, &lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;{defaut}&lt;span style=&quot;color: #FF851D;&quot;&gt;|saisies_chaine2tableau&lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#REM&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt; valeur peut &#234;tre une chaine (plusieurs valeurs ou pas) qu'on sait d&#233;composer &lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#SET&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{valeur, &lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;{valeur}&lt;span style=&quot;color: #FF851D;&quot;&gt;|saisies_valeur2tableau&lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;select name=&quot;&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{nom}&lt;/span&gt;[]&quot; multiple=&quot;multiple&quot; class=&quot;&lt;span style=&quot;color: #D05000;&quot;&gt;#GET&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{type}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt; &lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{class}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&quot; size=&quot;&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{size,15}&lt;/span&gt;&quot; id=&quot;champ_&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{nom}&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|saisie_nom2classe&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&quot;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt; value=&quot;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{valeur_forcee,&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;{valeur}}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&quot;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt; disabled=&quot;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{disable}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&quot;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt; &lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #FF4E00;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{attributs}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{cacher_option_intro}&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|non&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;option value=&quot;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{option_intro}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/option&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;BOUCLE_mots&lt;/span&gt;&lt;span style=&quot;color: #527EE0;&quot;&gt;(MOTS)&lt;/span&gt;&lt;span style=&quot;color: #984CFF;&quot;&gt;&lt;span style=&quot;&quot;&gt;{par id_groupe, num titre, titre}&lt;/span&gt;&lt;span style=&quot;&quot;&gt;{id_groupe ?}&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;optgroup label=&quot;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#TYPE&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|unique&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|attribut_html&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&quot; /&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;option value=&quot;&lt;span style=&quot;color: #D05000;&quot;&gt;#ID_MOT&lt;/span&gt;&quot; &lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#ID_MOT&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|in_array&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;{valeur_forcee,&lt;span style=&quot;color: #D05000;&quot;&gt;#GET&lt;/span&gt;{valeur,&lt;span style=&quot;color: #D05000;&quot;&gt;#GET&lt;/span&gt;{defaut}}}}&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|oui&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt; selected=&quot;selected&quot;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#TITRE&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|supprimer_numero&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/option&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;/BOUCLE_mots&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;/select&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/9e8a9ec42f0e9ef2141f7602397048a4.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;En gros, c'est une saisie affichant une s&#233;lection multiple, bouclant sur les mots du groupe de mot demand&#233;.&lt;/p&gt; &lt;p&gt;Ajoutons un rien de CSS pour enlever le label de notre saisie (sinon le crayons est 2 fois plus large) :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_css cadre&quot;&gt;&lt;pre class=&quot;css&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #6666ff;&quot;&gt;.crayon-html&lt;/span&gt; &lt;span style=&quot;color: #6666ff;&quot;&gt;.saisie_ctags&lt;/span&gt; label &lt;span style=&quot;color: #00AA00;&quot;&gt;&#123;&lt;/span&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;display&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #993333;&quot;&gt;none&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #6666ff;&quot;&gt;.crayon-html&lt;/span&gt; &lt;span style=&quot;color: #6666ff;&quot;&gt;.saisie_ctags&lt;/span&gt; &lt;span style=&quot;color: #00AA00;&quot;&gt;&#123;&lt;/span&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;padding-left&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #933;&quot;&gt;10px&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/dd6a7ba71f8d053630b9e07b18e14386.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;D&#233;j&#224;, nous arrivons maintenant &#224; un formulaire lorsqu'on &#233;dite ressemblant &#224; cela :&lt;br class='autobr' /&gt;
&lt;span class='spip_document_339 spip_documents spip_documents_center'&gt;
&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L250xH320/sc3a9lectionb7e0-55183.png' width='250' height='320' alt=&quot;Crayon ouvert&quot; title=&quot;Crayon ouvert&quot; /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;Faisons la vue.&lt;/p&gt;
&lt;h3 class=&quot;spip&quot;&gt;La vue&lt;/h3&gt;
&lt;p&gt;La vue d'un crayon, c'est ce qui s'affiche apr&#232;s avoir modifi&#233; un &#233;l&#233;ment. Il y a des vues par d&#233;faut, mais on peut les personnaliser. Nous, nous souhaitons le m&#234;me affichage que dans notre tableau &#224; l'origine. Il nous suffit de recoller le m&#234;me code dans &lt;code class='spip_code' dir='ltr'&gt;vues/ctags.html&lt;/code&gt; :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;pre class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#CACHE&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{0}&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;BOUCLE_cat&lt;/span&gt;&lt;span style=&quot;color: #527EE0;&quot;&gt;(MOTS)&lt;/span&gt;&lt;span style=&quot;color: #984CFF;&quot;&gt;&lt;span style=&quot;&quot;&gt;{id_auteur}&lt;/span&gt;&lt;span style=&quot;&quot;&gt;{id_groupe=40}&lt;/span&gt;&lt;span style=&quot;&quot;&gt;{', '}&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#TITRE&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|supprimer_numero&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;/BOUCLE_cat&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;---&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;//B_cat&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/e5c9898c089ec76940209b08925e0ced.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Simple et efficace :)&lt;/p&gt; &lt;p&gt;Voyons maintenant comment faire pour que crayons enregistre les donn&#233;es !&lt;/p&gt;
&lt;h3 class=&quot;spip&quot;&gt;Pr&#233;paration et enregistrement des donn&#233;es&lt;/h3&gt;
&lt;p&gt;Crayons, pour savoir si une donn&#233;e a &#233;t&#233; modifi&#233;e par la personne qui valide le formulaire fait envoyer par le formulaire une signature des donn&#233;es qu'il avait calcul&#233; au moment de l'affichage dudit formulaire. Chaque champ poss&#232;de 2 signatures : une signature identifiant le champ (le &lt;code class='spip_code' dir='ltr'&gt;key&lt;/code&gt; de tout &#224; l'heure), une autre identifiant le contenu des donn&#233;es (un md5 de celles-ci).&lt;/p&gt; &lt;p&gt;Comme SPIP dans l'espace priv&#233;, Crayons n'acceptera de modifier une donn&#233;e que si sa signature envoy&#233;e par le formulaire est la m&#234;me que celle actuellement en base. Le cas contraire indique que quelqu'un d'autre a modifi&#233; les donn&#233;es entre temps. Si les signatures correspondent, il regarde si les donn&#233;es envoy&#233;es sont diff&#233;rentes &#233;galement (sinon pas la peine d'enregistrer la m&#234;me chose). Si tel est le cas l'enregistrement se fait, pour uniquement les donn&#233;es modifi&#233;es.&lt;/p&gt; &lt;p&gt;Le corollaire est que Crayons doit conna&#238;tre les donn&#233;es en cr&#233;ant le formulaire ! Comme notre champ n'est pas standard, il va falloir lui indiquer comment l'obtenir.&lt;/p&gt; &lt;p&gt;C'est ce que fait la fonction suivante (&#224; placer, par exemple dans un fichier d'option - il y a certainement mieux, mais je n'ai pas regard&#233; plus en d&#233;tail encore) :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;pre class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// obtenir la liste des identifiants de mots cl&#233;s li&#233;s &#224; notre objet...&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; valeur_champ_ctags&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$table&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$id&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$champ&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #000088;&quot;&gt;$valeurs&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; sql_allfetsel&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;m.id_mot&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;spip_mots AS m, spip_mots_&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;${table}&lt;/span&gt;s AS ma&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;m.id_groupe=40&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;m.id_mot = ma.id_mot&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;ma.id_&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;${table}&lt;/span&gt;=&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt;sql_quote&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$id&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #000088;&quot;&gt;$valeurs&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array_map&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array_map&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'array_shift'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$valeurs&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$valeurs&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/74b503f1e0e009b2613963c5567223d0.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;La fonction &lt;code class='spip_code' dir='ltr'&gt;valeur_champ_X&lt;/code&gt; o&#249; &lt;code class='spip_code' dir='ltr'&gt;X&lt;/code&gt; est le nom du champ souhait&#233; (c'est aussi personnalisable en fonction du nom de la table) re&#231;oit 3 arguments : le type de table (ici auteur), son identifiant (le num&#233;ro d'auteur), et le nom du champ d&#233;sir&#233; (le &lt;code class='spip_code' dir='ltr'&gt;X&lt;/code&gt;, soit &#171; ctags &#187; ici).&lt;/p&gt; &lt;p&gt;La fonction doit retourner la valeur du champ. Ici, on retourne un tableau de tous les identifiants de mots cl&#233;s associ&#233; &#224; l'objet et son identifiant. Une fonction d'API sp&#233;cifique en SPIP 3 pourrait obtenir ces donn&#233;es (cf &lt;a href=&quot;http://www.spip.net/fr_article5477.html&quot; class='spip_out' rel='external'&gt;API &#233;diter liens&lt;/a&gt;), mais j'&#233;tais en SPIP 2.1.&lt;/p&gt; &lt;p&gt;Ceci fait, il faut maintenant indiquer le traitement &#224; r&#233;aliser pour notre contr&#244;leur, puisque ce n'est pas un traitement automatique. Cela se passe avec la fonction &lt;code class='spip_code' dir='ltr'&gt;X_revision&lt;/code&gt; o&#249; &lt;code class='spip_code' dir='ltr'&gt;X&lt;/code&gt; est le nom du contr&#244;leur.&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;pre class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// la r&#233;vision du crayon ctags doit supprimer ou ajouter des liaisons de mots cl&#233;s&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; ctags_revision&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$id_objet&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$colonnes&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$type_objet&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// actuellement en bdd&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #000088;&quot;&gt;$old&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; valeur_champ_ctags&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$type_objet&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$id_objet&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'ctags'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// ceux qu'on veut maintenant&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #000088;&quot;&gt;$new&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/explode&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;explode&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;','&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$colonnes&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'ctags'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// les mots &#224; supprimer&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #000088;&quot;&gt;$del&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array_diff&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array_diff&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$old&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$new&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// les mots &#224; ajouter&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #000088;&quot;&gt;$add&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array_diff&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array_diff&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$new&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$old&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// actions !&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$del&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; sql_delete&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;spip_mots_&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;${type_objet}&lt;/span&gt;s&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;sql_in&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;id_mot&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$del&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;id_&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;$type_objet&lt;/span&gt;=&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;$id_objet&lt;/span&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$add&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$adds&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #b1b100;&quot;&gt;foreach&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$add&lt;/span&gt; &lt;span style=&quot;color: #b1b100;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$adds&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;id_&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;$type_objet&lt;/span&gt;&quot;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$id_objet&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;id_mot&quot;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; sql_insertq_multi&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;spip_mots_&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;${type_objet}&lt;/span&gt;s&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$adds&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #009900; font-weight: bold;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/bfa8e47c879bdf60ed0ea85ace726f90.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Ici la fonction re&#231;oit 3 arguments : l'identifiant de l'objet, les couples de donn&#233;es &#224; enregistrer, le type d'objet. Ici, SPIP 3 simplifierait aussi le code avec son API d'&#233;dition de liens.&lt;/p&gt; &lt;p&gt;Le principe est simple : on r&#233;cup&#232;re ce qu'on veut enregistrer dans la cl&#233; 'ctags' de la variable &lt;code class='spip_code' dir='ltr'&gt;$colonne&lt;/code&gt;. Elle contient la liste des identifiants de mots pour notre auteur. On fait ensuite la diff&#233;rence entre ce qui est d&#233;j&#224; stock&#233; et les nouvelles donn&#233;es pour savoir ce qu'on doit enlever et ajouter en BDD.&lt;/p&gt; &lt;p&gt;Voil&#224; :)&lt;/p&gt; &lt;p&gt;Bon, tout n'est pas tr&#232;s propre, mais c'est une belle base !&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>Esp&#233;ranto, genre et sexisme</title>
		<link>http://marcimat.magraine.net/Esperanto-genre-et-sexisme</link>
		<guid isPermaLink="true">http://marcimat.magraine.net/Esperanto-genre-et-sexisme</guid>
		<dc:date>2012-08-29T14:15:39Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>Matthieu Marcillaud</dc:creator>



		<description>
&lt;p&gt;Un des points les plus g&#233;nants actuellement j'ai l'impression pour l'esperanto (enfin c'est moins pire que le fran&#231;ais) est sa non distinction pour certains mots entre le neutre (enfin d'un sexe ind&#233;termin&#233;) et le masculin, alors que passer un mot au f&#233;minin se fait par l'usage d'un suffixe. Du coup, beaucoup de personnes s'interrogent sur comment rendre cette langue non-sexiste. Il y a beaucoup de propositions, mais pas encore de choix &#233;tabli.&lt;br class='autobr' /&gt;
Le fran&#231;ais (la langue) est dit discriminant, par exemple (...)&lt;/p&gt;


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


		</description>


 <content:encoded>&lt;div class='rss_chapo'&gt;&lt;p&gt;Un des points les plus g&#233;nants actuellement j'ai l'impression pour l'esperanto (enfin c'est moins pire que le fran&#231;ais) est sa non distinction pour certains mots entre le neutre (enfin d'un sexe ind&#233;termin&#233;) et le masculin, alors que passer un mot au f&#233;minin se fait par l'usage d'un suffixe. Du coup, beaucoup de personnes s'interrogent sur comment rendre cette langue non-sexiste. Il y a beaucoup de propositions, mais pas encore de choix &#233;tabli.&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;p&gt;Le fran&#231;ais (la langue) est dit discriminant, par exemple lorsqu'il accorde un adjectif au masculin pluriel d&#232;s qu'il y a un &#233;l&#233;ment masculin dans un groupe comme &#171; L'homme et les 99 femmes sont beaux &#187;. Une proposition de r&#233;forme du fran&#231;ais est d'accorder avec le nom le plus proche. C'est la &lt;a href=&quot;http://fr.wikipedia.org/wiki/R%C3%A8gle_de_proximit%C3%A9&quot; class='spip_out' rel='external'&gt;r&#232;gle de proximit&#233;&lt;/a&gt; (et c'&#233;tait comme &#231;a il y a quelques si&#232;cles en ancien fran&#231;ais). Ce qui donnerait &#171; L'homme et les 99 femmes sont belles &#187; ou &#171; Les 99 femmes et l'homme sont beaux &#187; selon le nom le plus proche de l'adjectif.&lt;/p&gt; &lt;p&gt;En esp&#233;ranto les noms en eux-m&#234;mes sont non-genr&#233;s (ni masculin, ni f&#233;minin) et il n'y a pas d'accord &#224; faire de ce type. &#171; La table blanche et le piano blanc &#187; peut se traduire par &#171; La tablo blanka kaj la piano blanka &#187;. Par contre ils peuvent se r&#233;f&#233;rer &#224; quelqu'un (ou un animal) qui est lui sexu&#233;, mais &#231;a ne change pas les accords. &#171; Nigra katino ronronas &#187; signifie &#171; Une chatte noire ronronne &#187;&lt;/p&gt; &lt;p&gt;En esperanto, il y a des probl&#232;mes qui ne portent pas sur l'accord de l'adjectif (qui ne marque que le pluriel et non le f&#233;minin), mais sur la question du sexe attribu&#233; &#224; un nom ou un pronom d&#233;signant une personne.&lt;/p&gt; &lt;p&gt;Prenons un nom simple : &#171; la knabo &#187;, qui signifie le gar&#231;on. En ajoutant le sufixe -in- on obtient le f&#233;minin : &#171; la knabino &#187; signifie la fille. C'est l&#224; que &#231;a devient emb&#234;tant : par le fait qu'il y ait un suffixe pour d&#233;signer le sexe f&#233;minin, on s'attend &#224; l'existence d'un suffixe pour d&#233;signer le sexe masculin, mais il n'en est rien. On peut s'attendre aussi &#224; l'existance d'un neutre, o&#249; le sexe est ind&#233;termin&#233; (j'ai l'impression que &#231;a se nomme &lt;a href=&quot;http://fr.wikipedia.org/wiki/%C3%89pic%C3%A8ne&quot; class='spip_out' rel='external'&gt;&#233;pic&#232;ne&lt;/a&gt; dans ce cas l&#224;).&lt;/p&gt; &lt;p&gt;De la m&#234;me mani&#232;re les pronoms personnels de la 3&#232; personne sont :&lt;/p&gt;
&lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; li : il (masculin ou ind&#233;termin&#233;)&lt;/li&gt;&lt;li&gt; &#349;i : elle (f&#233;minin)&lt;/li&gt;&lt;li&gt; &#285;i : il neutre pour un objet/animal tel que &#171; la hundo... &#285;i estas... &#187; (Le chien... il est...)&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;On voit aussit&#244;t que &#171; li &#187; est employ&#233; pour d&#233;signer ce qui est masculin ou ind&#233;termin&#233;. L&#224; encore &#231;a pose le probl&#232;me d'une sorte de pr&#233;dominance du masculin. Dans &#171; La kuracisto eniras. Li estas granda. &#187; (Le m&#233;decin entra. Il est grand). On ne sait normalement pas le sexe du m&#233;decin. Pourtant, &#171; li &#187; indique, ou incite &#224; penser que c'est un homme (c'est le m&#234;me probl&#232;me en fran&#231;ais d'ailleurs).&lt;/p&gt; &lt;p&gt;Pour ces raisons de nombreuses propositions d'esp&#233;rantistes visent &#224; trouver des solutions &#224; ces 2 probl&#232;mes. Aucune n'a encore &#233;t&#233; valid&#233;e et c'est peut &#234;tre &#231;a le plus emb&#234;tant : chaque solution risque de vivre sa propre vie, m&#233;lang&#233;e aux autres simplement parce qu'une n'a pas &#233;t&#233; retenue et valid&#233;e.&lt;/p&gt; &lt;p&gt;Voyons un peu les propositions faites.&lt;/p&gt; &lt;p&gt;Des explications compl&#232;tes &lt;a href=&quot;http://en.wikipedia.org/wiki/Gender_reform_in_Esperanto&quot; class='spip_out' rel='external'&gt;sont disponibles en anglais l&#224;&lt;/a&gt;&lt;/p&gt;
&lt;h3 class=&quot;spip&quot;&gt; Pour le masculin et neutre des noms &lt;/h3&gt;
&lt;p&gt;Il faut savoir qu'il existe d&#233;j&#224; un pr&#233;fixe (vir-) pour d&#233;signer le &#171; m&#226;le &#187; chez les animaux, par exemple &#171; virbovo &#187; pour taureau. Le pr&#233;fixe vir- et le suffixe -in- comme la plupart en esp&#233;ranto peuvent &#234;tre utilis&#233;s seuls : viro = de sexe masculin, ino = de sexe f&#233;minin. On voit d&#233;j&#224; encore un autre probl&#232;me : parfois il y a vir- pour sp&#233;cifier le masculin, d&#232;s fois pas (on ne dit pas &#171; virpatro &#187; ou &#171; virkuracisto &#187; pour dire le p&#232;re ou le m&#233;decin homme). Et ce n'est pas sym&#233;trique, il y a un suffixe et un pr&#233;fixe.&lt;/p&gt; &lt;p&gt;Il semble qu'il y ait un certain consensus pour proposer un suffixe en plus indiquant le sexe masculin, et &#224; rendre non sexu&#233; les mots qui le sont par d&#233;faut tel que &#171; patro &#187; (p&#232;re), &#171; knabo &#187; (gar&#231;on).&lt;/p&gt; &lt;p&gt;Les suffixes propos&#233;s sont -un-, -ol- et -i&#265;-, et c'est ce dernier le plus utilis&#233; actuellement &#224; cette fin. De la sorte, avec cette modification introduisant -i&#265;- comme suffixe de masculin, on obtiendrait :&lt;/p&gt;
&lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; patro : un parent (p&#232;re ou m&#232;re)&lt;/li&gt;&lt;li&gt; patrino : m&#232;re&lt;/li&gt;&lt;li&gt; patri&#265;o : p&#232;re&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;En fait, -i&#265;- est employ&#233; parce qu'il se rapproche du suffixe d&#233;j&#224; existant exprimant une relation tendre -&#265;j- (comme il y a -nj- pour le f&#233;minin) :&lt;/p&gt;
&lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; patrino : m&#232;re. panjo : maman&lt;/li&gt;&lt;li&gt; patro : p&#232;re. pa&#265;jo : papa&lt;/li&gt;&lt;/ul&gt;&lt;h3 class=&quot;spip&quot;&gt; Pour les pronoms &lt;/h3&gt;
&lt;p&gt;Le cas des pronoms semble poser beaucoup plus de difficult&#233;s. Certains veulent compl&#234;tement enlever le genre, par exemple en indiquant que &#171; li &#187; peut signifier soit masculin, soit f&#233;minin et en supprimant &#349;i. D'autres pr&#233;f&#232;rent ajouter un autre pronom soit pour d&#233;signer le sexe ind&#233;fini (li devenant alors masculin), soit pour d&#233;signer le masculin (li devenant alors de sexe ind&#233;fini).&lt;/p&gt; &lt;p&gt;Il n'est pas facile de faire le tri de toutes les propositions. Je retiens que &#171; ri &#187; ne va pas en tant que pronom &#224; cause de la confusion avec tous les verbes commen&#231;ant par &#171; ri &#187; tel que &#171; rigardi &#187;&lt;/p&gt; &lt;p&gt;Apr&#232;s, j'aime bien la proposition de dire que &#171; &#285;i &#187; d&#233;signe, en plus du neutre et d'un animal, quelqu'un de sexe ind&#233;termin&#233;. &#171; &#349;li &#187;, contraction de &#171; &#349;i a&#365; li &#187; (elle ou il) est aussi int&#233;ressant mais plus difficile &#224; prononcer (chli). Il y a aussi &#171; gi &#187; qui ferait tout autant l'affaire. Pas simple.&lt;/p&gt;
&lt;h3 class=&quot;spip&quot;&gt; En r&#233;sum&#233; &lt;/h3&gt;
&lt;p&gt;Disons que lorsque je saurais l'&#233;crire et le parler correctement, j'utiliserais vraissemblablement les formes suivantes :&lt;/p&gt;
&lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; &lt;strong&gt;-i&#265;-&lt;/strong&gt; pour les noms d&#233;signant des individus masculins. &#171; patro &#187; devenant un parent dont on ne pr&#233;cise pas le sexe, soit parce qu'on ne le connait pas, n'est pas important, ne veut pas le dire ou parce qu'il est d&#233;j&#224; connu dans la phrase,&lt;/li&gt;&lt;li&gt; &lt;strong&gt;gi&lt;/strong&gt; comme pronom indiquant une personne dont, de la m&#234;me mani&#232;re, on ne connait pas le sexe (ou ce n'est pas important, ou on veut pas le dire...)&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&#199;a donnerait. Avant :&lt;/p&gt;
&lt;blockquote class=&quot;spip&quot;&gt;
&lt;p&gt;&lt;br class='autobr' /&gt;
La patrino salutas min. &#348;i ridetas.&lt;br class='autobr' /&gt;
La patro iras hejmen. Li piediras.&lt;br class='autobr' /&gt;
Iu krias mian nomon. Li estas forega.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Apr&#232;s :&lt;/p&gt;
&lt;blockquote class=&quot;spip&quot;&gt;
&lt;p&gt;&lt;br class='autobr' /&gt;
La patrino salutas min. &#348;i ridetas.&lt;br class='autobr' /&gt;
La patri&#265;o iras hejmen. Li piediras.&lt;br class='autobr' /&gt;
Iu krias mian nomon. Gi estas forega.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Ce qui peut se traduire par :&lt;/p&gt;
&lt;blockquote class=&quot;spip&quot;&gt;
&lt;p&gt;&lt;br class='autobr' /&gt;
La m&#232;re me salue. Elle sourit.&lt;br class='autobr' /&gt;
Le p&#232;re se dirige chez lui. Il est &#224; pied.&lt;br class='autobr' /&gt;
Quelqu'un crie mon nom. Il est tr&#232;s loin.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Peut &#234;tre que d'ici l&#224; une petite r&#233;forme de l'esperanto aura eu lieu :)&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>Ressources pour l'apprentissage de l'esp&#233;ranto</title>
		<link>http://marcimat.magraine.net/Ressources-pour-l-apprentissage-de</link>
		<guid isPermaLink="true">http://marcimat.magraine.net/Ressources-pour-l-apprentissage-de</guid>
		<dc:date>2012-08-29T14:13:20Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>Matthieu Marcillaud</dc:creator>



		<description>
&lt;p&gt;Parce que m&#234;me s'il est plus facile que d'autres langues, l'esp&#233;ranto n&#233;cessite un apprentissage ! Et c'est relativement int&#233;ressant d'avoir quelques cours sous la main !&lt;br class='autobr' /&gt;
Commen&#231;ons d&#233;j&#224; par pr&#233;senter une boutique o&#249; il est possible d'acheter de nombreuses revues, manuels, livres d'esp&#233;ranto, par correspondance ou directement &#224; Paris : chez Esperanto-france.&lt;br class='autobr' /&gt;
En g&#233;n&#233;ral, d&#233;couvrir l'esp&#233;ranto passe par le site Lernu. Dedans il y a de quoi apprendre tout de l'esp&#233;ranto ainsi que des exercices &#224; faire. (...)&lt;/p&gt;


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


		</description>


 <content:encoded>&lt;div class='rss_chapo'&gt;&lt;p&gt;Parce que m&#234;me s'il est plus facile que d'autres langues, l'esp&#233;ranto n&#233;cessite un apprentissage ! Et c'est relativement int&#233;ressant d'avoir quelques cours sous la main !&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;p&gt;Commen&#231;ons d&#233;j&#224; par pr&#233;senter une boutique o&#249; il est possible d'acheter de nombreuses revues, manuels, livres d'esp&#233;ranto, par correspondance ou directement &#224; Paris : chez &lt;a href=&quot;http://esperanto-france.org/boutique&quot; class='spip_out' rel='external'&gt;Esperanto-france&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;En g&#233;n&#233;ral, d&#233;couvrir l'esp&#233;ranto passe par le site &lt;a href=&quot;http://fr.lernu.net/&quot; class='spip_out' rel='external'&gt;Lernu&lt;/a&gt;. Dedans il y a de quoi apprendre tout de l'esp&#233;ranto ainsi que des exercices &#224; faire. L'interface n'est pas toujours des plus agr&#233;ables &#224; regarder mais le site est tr&#232;s pratique, notamment avec le formulaire de recherche dans le dictionnaire pr&#233;sent dans la colonne qui permet &#224; tout moment de nous rem&#233;morer les mots oubli&#233;s.&lt;/p&gt; &lt;p&gt;Il y a une &lt;a href=&quot;http://esperanto-midipyrenees.org/dossiers/dossier.php?val=7_esperanto+magazino+emission+radio&quot; class='spip_out' rel='external'&gt;tr&#232;s bonne &#233;mission de radio &#224; Toulouse&lt;/a&gt; qui donne des cours d'Esp&#233;ranto. J'avais toutes leurs archives, mais ils ont (malheureusement pour nous) refait leur site et seules &lt;a href=&quot;http://www.esperanto-midipyrenees.org/download/cat.php?val=43_emissions+radio&quot; class='spip_out' rel='external'&gt;les nouvelles archives depuis la refonte sont disponibles l&#224;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Le site &lt;a href=&quot;http://tatoeba.org/fre/home&quot; class='spip_out' rel='external'&gt;Tatoeba&lt;/a&gt; permet de trouver des phrases traduites dans diff&#233;rentes langues. La diversit&#233; des phrases permet de d&#233;couvrir pas mal de vocabulaire.&lt;/p&gt; &lt;p&gt;Il est possible d'&#233;couter de la musique chez &lt;a href=&quot;http://muzaiko.info/&quot; class='spip_out' rel='external'&gt;Muzaiko&lt;/a&gt; et plus g&#233;n&#233;ralement des documents sonores en esp&#233;ranto sur &lt;a href=&quot;http://esperanto-radio.com/&quot; class='spip_out' rel='external'&gt;Esperanto Radio&lt;/a&gt; et de la m&#234;me mani&#232;re des vid&#233;os en esperanto sur &lt;a href=&quot;http://esperanto-tv.com/&quot; class='spip_out' rel='external'&gt;Esperanto TV&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Certains cours se retrouvent en vid&#233;o, par exemple avec cette pi&#232;ce de th&#233;&#226;tre expliqu&#233;e &#171; &lt;a href=&quot;http://www.youtube.com/watch?v=sVyut5BV3kE&amp;feature=relmfu&quot; class='spip_out' rel='external'&gt;La Passporto al la tuta mondo&lt;/a&gt; &#187; (16 parties je crois, 4 * 2h).&lt;/p&gt; &lt;p&gt;On trouve &#233;galement quelques jolis contes sous forme de courts m&#233;trages d'animation, traduits et sous-titr&#233;s &lt;a href=&quot;http://www.bookbox.com/catalog&quot; class='spip_out' rel='external'&gt;sur le site Bookbox&lt;/a&gt; destin&#233; &#224; l'apprentissage des langues. Il faut choisir &#171; esperanto &#187; dans le s&#233;lecteur.&lt;/p&gt; &lt;p&gt;Le site &lt;a href=&quot;http://facila.org/&quot; class='spip_out' rel='external'&gt;Facila vento&lt;/a&gt; propose des textes simples pour d&#233;buter l'esperanto, que l'on peut &#233;galement &#233;couter.&lt;/p&gt; &lt;p&gt;Enfin difficile de passer au travers des outils de Google : &lt;a href=&quot;http://www.google.com/intl/eo/&quot; class='spip_out' rel='external'&gt;la recherche en esp&#233;ranto&lt;/a&gt;, et &lt;a href=&quot;http://translate.google.fr/#fr/eo/&quot; class='spip_out' rel='external'&gt;les traductions&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Voil&#224; d&#233;j&#224; de quoi occuper la d&#233;couverte de l'esp&#233;ranto !&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>R&#233;flexions sur l'esp&#233;ranto</title>
		<link>http://marcimat.magraine.net/Reflexions-sur-l-esperanto</link>
		<guid isPermaLink="true">http://marcimat.magraine.net/Reflexions-sur-l-esperanto</guid>
		<dc:date>2012-08-29T14:10:13Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>Matthieu Marcillaud</dc:creator>



		<description>
&lt;p&gt;Cela fait quelques ann&#233;es d&#233;j&#224; que je m'int&#233;resse de pr&#232;s ou de loin &#224; l'esp&#233;ranto. Force est de constater que je n'ai pas encore pouss&#233; mon &#233;tude assez loin pour savoir suffisamment le parler. Cependant, aussi &#233;trange que cela puisse me para&#238;tre, je comprends d&#233;j&#224; mieux des textes d'esp&#233;ranto que d'anglais. Je croise pourtant l'anglais presque tous les jours de part mon activit&#233; et je l'ai normalement appris &#224; l'&#233;cole. De ce regard l&#224;, il y a comme un myst&#232;re qui &#233;mane de l'esp&#233;ranto et de sa facilit&#233;. (...)&lt;/p&gt;


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


		</description>


 <content:encoded>&lt;div class='rss_chapo'&gt;&lt;p&gt;Cela fait quelques ann&#233;es d&#233;j&#224; que je m'int&#233;resse de pr&#232;s ou de loin &#224; l'esp&#233;ranto. Force est de constater que je n'ai pas encore pouss&#233; mon &#233;tude assez loin pour savoir suffisamment le parler. Cependant, aussi &#233;trange que cela puisse me para&#238;tre, je comprends d&#233;j&#224; mieux des textes d'esp&#233;ranto que d'anglais. Je croise pourtant l'anglais presque tous les jours de part mon activit&#233; et je l'ai normalement appris &#224; l'&#233;cole. De ce regard l&#224;, il y a comme un myst&#232;re qui &#233;mane de l'esp&#233;ranto et de sa facilit&#233;. Qu'est-ce qui me motive dans l'esp&#233;ranto ? est-ce viable de l'apprendre ? peut elle r&#233;ellement devenir une langue pont, une langue de travail, auxiliaire, de compr&#233;hension entre les cultures sur une plus grande population ? sa facilit&#233; peut elle survivre aux &#233;volutions de toutes langues vivantes ? Je vais plus ou moins faire mon bilan de ces diff&#233;rentes questions que me parcourent l'&#233;chine ces jours-ci.&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;h3 class=&quot;spip&quot;&gt; Motivations &lt;/h3&gt;
&lt;p&gt;J'ai pr&#233;cis&#233;ment des difficult&#233;s &#224; observer clairement quelles sont mes motivations envers l'esp&#233;ranto. Plus clairement, je suis certain que son d&#233;veloppement pourrait faciliter beaucoup l'&#233;change de connaissances entre personnes de langues diff&#233;rentes, avec un minimum d'effort d'apprentissage des diff&#233;rentes parties. En tout cas un apprentissage bien plus rapide que l'anglais (150 heures d'esp&#233;ranto apportent l'&#233;quivalent de 2000 heures de cours d'anglais) pour une efficacit&#233; bien meilleure : la prononciation, compr&#233;hension phon&#233;tique, r&#233;gularit&#233; de l'esp&#233;ranto apportent des bases solides, fiables sur la connaissance de la langue l&#224; o&#249; avec l'anglais, m&#234;me avec beaucoup de pratique, il restera toujours difficile d'&#233;crire une phrase correcte, de prononcer des mots correctement et inversement de comprendre le bon mot lorsqu'il est prononc&#233;, tellement les subtilit&#233;s phon&#233;tiques de cette langue sont grandes.&lt;/p&gt; &lt;p&gt;Le souci est que, actuellement, ce n'est pas encore l'esp&#233;ranto qui est utilis&#233; pour travailler entre les personnes d'horizons diff&#233;rents. S'ils n'ont pas une langue commune, c'est l'anglais qui est pris. C'est particuli&#232;rement vrai dans une des activit&#233;s pour lesquelles je suis impliqu&#233; : le d&#233;veloppement d'un logiciel (&lt;a href=&quot;http://www.spip.net/&quot; class='spip_out' rel='external'&gt;SPIP&lt;/a&gt;). Dans ce cadre l&#224;, notre logiciel - enfin son code source - est d&#233;velopp&#233;, &#233;crit, exprim&#233; en fran&#231;ais (son interface d'utilisation et son usage est traduit, mais pas le code source ou ses gabarits). Nombreuses sont les remarques nous disant &#224; peu pr&#232;s, le plus naturellement du monde : &#171; Il y aurait bien plus de monde sur votre projet si vous passiez &#224; l'anglais &#187;. C'est peut &#234;tre vrai, mais dans ce cas, pourquoi juste l'anglais, ou pourquoi l'anglais uniquement ?&lt;/p&gt; &lt;p&gt;L'anglais est devenu tellement la routine que de nombreux projets ne se donnent m&#234;me plus la peine de se faire traduire. Ils restent en anglais, peut &#234;tre supposant que tout le monde comprend ou doit comprendre cette langue. C'est le cas de la plate-forme de travail collaboratif &#171; &lt;a href=&quot;https://github.com/&quot; class='spip_out' rel='external'&gt;GitHub&lt;/a&gt; &#187; permettant &#224; des d&#233;veloppeurs de logiciels de travailler ensemble.&lt;/p&gt; &lt;p&gt;Cette pr&#233;sence extr&#234;mement grande de l'anglais comme langue de travail en informatique fait que j'arrive maintenant &#224; comprendre &#224; peu pr&#232;s le sens d'&#233;crits techniques dans cette langue, au prix de beaucoup de fatigue psychique. Mais mon probl&#232;me reste entier d&#232;s que je veux m'exprimer dans cette langue. J'ai l'impression syst&#233;matique que je vais faire des erreurs et que je ne vais pas &#234;tre compris. C'est d'autant plus frustrant que je n'ai rien contre le fait de savoir l'anglais et que j'aimerais bien pouvoir m'exprimer facilement dans cette langue, mais le constat est l&#224; : c'est difficile.&lt;/p&gt; &lt;p&gt;Je me suis souvent dit que je devais &#234;tre un incomp&#233;tent en langues &#233;trang&#232;res, surtout en anglais, mais je me dis maintenant que &#231;a ne vient peut &#234;tre pas que de moi ! Particuli&#232;rement le visionnage des 10 pr&#233;sentations &#171; &lt;a href=&quot;http://www.youtube.com/watch?v=taLXSe4c498&quot; class='spip_out' rel='external'&gt;Les langues : un d&#233;fi&lt;/a&gt; &#187; de Claude Piron apporte un &#233;clairage diff&#233;rent. Malgr&#233; pour certains des &#233;tudes pouss&#233;es en anglais, des erreurs d'interpr&#233;tations, de mauvaises compr&#233;hension des mots sont pr&#233;sentes. En clair, &#231;a dit que l'anglais est mal adapt&#233; comme langue de travail internationale.&lt;/p&gt; &lt;p&gt;Et donc l'esp&#233;ranto est une solution tr&#232;s plaisante, &#224; partir du moment o&#249; suffisamment de personne s'y mettent ! C'est bien l&#224; un probl&#232;me. Certes il y a des locuteurs, assez nombreux en esp&#233;ranto, mais on les trouve lorsqu'on veut voyager ou apprendre l'esp&#233;ranto. Rarement dans la vie de tous les jours dans le cadre d'une de ses activit&#233;s ou en se promenant sur internet. Et c'est l&#224; une baisse de motivation.&lt;/p&gt; &lt;p&gt;Lorsque j'ai appris &#224; frapper au clavier avec la disposition de clavier &lt;a href=&quot;http://bepo.fr/&quot; class='spip_out' rel='external'&gt;b&#233;po&lt;/a&gt;, &#224; rouler en v&#233;lo couch&#233; ou fait des buttes de culture, la satisfaction de ces alternatives est imm&#233;diate : un grand confort d'utilisation et des am&#233;liorations aussit&#244;t visibles, pratiques.&lt;/p&gt; &lt;p&gt;C'est un peu diff&#233;rent pour l'esp&#233;ranto car c'est un changement qui implique d'autres personnes : il ne peut devenir utile quotidiennement que si suffisamment de gens s'y mettent afin que l'anglais ne soit plus consid&#233;r&#233;e comme la langue naturelle de travail international, et que les ressources soient traduites !&lt;/p&gt;
&lt;h3 class=&quot;spip&quot;&gt; Esp&#233;ranto, le choix dans les langues construites &lt;/h3&gt;
&lt;p&gt;La question peut aussi se poser du choix de l'esp&#233;ranto en lui-m&#234;me alors qu'il existe de nombreuses autres langues r&#233;guli&#232;res et &lt;a href=&quot;http://fr.wikipedia.org/wiki/Langues_construites&quot; class='spip_out' rel='external'&gt;langues construites&lt;/a&gt;, souvent plus compliqu&#233;es, mais parfois extr&#234;mement plus simple comme le r&#233;cent &lt;a href=&quot;http://fr.wikipedia.org/wiki/Toki_pona&quot; class='spip_out' rel='external'&gt;Toki pona&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;Il n'est pas &#233;vident de r&#233;pondre &#224; une telle question. On peut dire que l'esp&#233;ranto a fait ses preuves car il est r&#233;ellement une langue vivante auxiliaire pour une frange de la population mondiale et ce depuis plus d'un si&#232;cle.&lt;/p&gt; &lt;p&gt;On peut dire que le choix de l'esp&#233;ranto plut&#244;t qu'une langue appartenant &#224; un peuple comme langue de travail internationale permet une &#233;galit&#233; linguistique : chaque peuple est oblig&#233; de l'apprendre et n'a pas, d&#232;s lors, l'avantage de sa langue natale.&lt;/p&gt; &lt;p&gt;Mais qu'adviendrait-il, si l'esp&#233;ranto &#233;tait choisie comme langue auxiliaire internationale, et que plus tard, suite par exemple &#224; une guerre entre 2 &#233;tats, ces peuples choisissent l'esp&#233;ranto comme langue nationale. Cet argument de la non-langue natale n'aurait plus de sens, et l'esp&#233;ranto ne serait plus alors une langue &#171; auxiliaire &#187; pour eux. C'est emb&#234;tant car ce n'est pas le but que s'est fix&#233; l'esp&#233;ranto : servir de langue pivot, auxiliaire, de travail, mais absolument pas remplacer des langues natales.&lt;/p&gt; &lt;p&gt;Disons peut-&#234;tre deux choses en sa faveur :&lt;/p&gt;
&lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; pour le moment c'est commun&#233;ment la langue auxiliaire la plus accept&#233;e et parl&#233;e&lt;/li&gt;&lt;li&gt; apprendre l'esp&#233;ranto facilite l'apprentissage d'autres langues ensuite. En fait c'est le cas de tout apprentissage de langue &#233;trang&#232;re mais, comme le dit wikipedia : &lt;blockquote class=&quot;spip&quot;&gt;
&lt;p&gt;Lorsque l'on a d&#233;j&#224; appris une langue &#233;trang&#232;re, l'apprentissage d'une nouvelle langue &#233;trang&#232;re est plus facile, &lt;strong&gt;d'o&#249; l'int&#233;r&#234;t de commencer par une langue &#233;trang&#232;re facile&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Disons aussi que beaucoup de langues construites sont des tentatives de diff&#233;rents linguistes (le plus souvent) de cr&#233;er ou tendre vers une langue &#171; parfaite &#187;. L&#224; encore ce n'&#233;tait pas l'objectif de l'Esperanto qui dit dans son &lt;i&gt;fundamunto&lt;/i&gt; vouloir &#171; rester intangible avec ses imperfections &#187;. Cela dit, toute langue &#233;volue.&lt;/p&gt;
&lt;h3 class=&quot;spip&quot;&gt; L'esperanto comme langue vivante &lt;/h3&gt;
&lt;p&gt;De nombreux linguiste le soulignent : toute langue vivante &#233;volue avec le temps, souvent r&#233;gionalement. Est-ce que ce serait pareil pour l'esp&#233;ranto ? C'est encore une question fort int&#233;ressante.&lt;/p&gt; &lt;p&gt;On peut certainement s&#233;parer en 2 les &#233;volutions : d'une part le vocabulaire, et d'autre part la construction de la langue. Le risque avec le vocabulaire est l'entr&#233;e de mots issus du pays o&#249; le groupe esp&#233;rantiste se trouve. Par exemple l'introduction de mots fran&#231;ais chez les esp&#233;rantistes parlant fran&#231;ais. Si chacun fait cela &#224; sa sauce il risque rapidement d'y avoir soit cacophonie, soit de nouveau h&#233;g&#233;monie d'une culture sur une autre. Toujours est-il qu'au bout d'un si&#232;cle d'esp&#233;ranto je n'ai pas l'impression que de nouveaux mots l'ont entach&#233;, d'autant plus que sa nature m&#234;me de langue agglutinante permet bien plus de constructions, comme des briques, que notre fran&#231;ais ou anglais.&lt;/p&gt; &lt;p&gt;L'autre partie est sur la construction m&#234;me de la langue. Une langue &#233;volue avec la soci&#233;t&#233; et si elle reste fig&#233;e il risque d'y avoir un d&#233;calage entre les envies de la soci&#233;t&#233; et les possibilit&#233;s de la langue. C'est peut &#234;tre le point le plus difficile &#224; g&#233;rer. Effectivement les motivations politiques ne sont pas forc&#233;ment les m&#234;mes d'une r&#233;gion &#224; une autre et l&#224; o&#249; certains veulent du changement, il n'est pas certain que d'autres le veuillent aussi. Il y a d&#233;j&#224; une &#233;volution soci&#233;tale forte qui pointe son nez depuis quelques temps en esp&#233;ranto : l'envie d'avoir une langue &#171; non-sexiste &#187; (j'y reviendrais &lt;a href=&quot;http://marcimat.magraine.net/Esperanto-genre-et-sexisme&quot; class='spip_in'&gt;dans un prochain article&lt;/a&gt;). Chacun y va de sa solution et si une des propositions n'est pas accept&#233;e par la f&#233;d&#233;ration d'esp&#233;ranto, elle risque n&#233;anmoins d'&#234;tre utilis&#233;e, de fait par les locuteurs !&lt;/p&gt; &lt;p&gt;Mais m&#234;me si ces changements auront lieu, ils n'entameront pas la volont&#233; initiale de l'esp&#233;ranto qui est d'&#234;tre une langue facile, accessible au plus grand nombre, permettant de dialoguer entre diff&#233;rentes autres langues. Puis m&#234;me si la langue &#233;volue, on aura au moins fait mieux, l'espace de quelques ann&#233;es, que toutes les tentatives pr&#233;c&#233;dentes sugg&#233;rant une langue internationale compliqu&#233;e.&lt;/p&gt;
&lt;h3 class=&quot;spip&quot;&gt; La pr&#233;sence de l'esperanto &lt;/h3&gt;
&lt;p&gt;L'esp&#233;ranto a connu un regain d'int&#233;r&#234;t avec internet. Aussi on ne peut pas nier que cette langue existe et est utilis&#233;e ! Il y a de nombreuses associations de promotion de l'esp&#233;ranto de part le monde et on peut au moins citer ici 2 beaux projets o&#249; l'esp&#233;ranto est loin d'&#234;tre anecdotique :&lt;/p&gt;
&lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; &lt;a href=&quot;http://eo.wikipedia.org/&quot; class='spip_out' rel='external'&gt;Wikipedia&lt;/a&gt;, o&#249; il est la 27&#232; langue d'apr&#232;s &lt;a href=&quot;http://meta.wikimedia.org/wiki/Wikipedia_languages&quot; class='spip_out' rel='external'&gt;leurs statistiques&lt;/a&gt; avec 168 912 articles,&lt;/li&gt;&lt;li&gt; &lt;a href=&quot;http://tatoeba.org/&quot; class='spip_out' rel='external'&gt;Tatoeba&lt;/a&gt;, o&#249; il est la 2&#232; langue d'apr&#232;s &lt;a href=&quot;http://tatoeba.org/fre/stats/sentences_by_language&quot; class='spip_out' rel='external'&gt;leurs statistiques&lt;/a&gt; avec 177 367 phrases.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Le prochain article pr&#233;sente des sites de &lt;a href=&quot;http://marcimat.magraine.net/Ressources-pour-l-apprentissage-de&quot; class='spip_in'&gt;ressources pour apprendre l'esp&#233;ranto&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>SPIP 3, Documents, Mots</title>
		<link>http://marcimat.magraine.net/SPIP-3-Documents-Mots</link>
		<guid isPermaLink="true">http://marcimat.magraine.net/SPIP-3-Documents-Mots</guid>
		<dc:date>2012-06-12T10:10:51Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>Matthieu Marcillaud</dc:creator>



		<description>
&lt;p&gt;SPIP 3 permet d'attacher des mots &#224; des documents, et il permet &#233;galement de taguer des documents avec des mots cl&#233;s. Fort pratique certainement, ce qui devient plus d&#233;licat, c'est ensuite les boucles &#224; r&#233;aliser pour retrouver tout cela. Au vu des nombreuses questions sur les listes d'utilisateurs, voici un petit peu d'explication du fonctionnement.&lt;br class='autobr' /&gt;
Un &#233;ni&#232;me message d'un utilisateur de SPIP et concepteur de squelette ne comprenait pas pourquoi sa boucle documents ne retournait rien. ...&lt;br class='autobr' /&gt;
En fait il (...)&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;SPIP 3 permet d'attacher des mots &#224; des documents, et il permet &#233;galement de taguer des documents avec des mots cl&#233;s. Fort pratique certainement, ce qui devient plus d&#233;licat, c'est ensuite les boucles &#224; r&#233;aliser pour retrouver tout cela. Au vu des nombreuses questions sur les listes d'utilisateurs, voici un petit peu d'explication du fonctionnement.&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;p&gt;Un &#233;ni&#232;me message d'un utilisateur de SPIP et concepteur de squelette ne comprenait pas pourquoi sa boucle documents ne retournait rien.&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot; data-clipboard-text=&quot;...&quot;&gt;&lt;pre class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;BOUCLE_doc&lt;/span&gt;&lt;span style=&quot;color: #527EE0;&quot;&gt;(DOCUMENTS)&lt;/span&gt;&lt;span style=&quot;color: #984CFF;&quot;&gt;&lt;span style=&quot;&quot;&gt;{id_mot}&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&gt;&lt;/span&gt;...&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;En fait il s'attendait &#224; ce que la boucle retourne la liste des documents qui ont un mot cl&#233; donn&#233; (les mots cl&#233;s taguent des documents donc). C'est une compr&#233;hension fort logique, vu que c'est ce que fait la boucle :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot; data-clipboard-text=&quot;&quot;&gt;&lt;pre class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;BOUCLE_art&lt;/span&gt;&lt;span style=&quot;color: #527EE0;&quot;&gt;(ARTICLES)&lt;/span&gt;&lt;span style=&quot;color: #984CFF;&quot;&gt;&lt;span style=&quot;&quot;&gt;{id_mot}&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;h3 class=&quot;spip&quot;&gt;Les tables de liaisons&lt;/h3&gt;
&lt;p&gt;Mais ce n'est pourtant pas ce qui se passe avec la boucle documents. La diff&#233;rence est simple, il existe une table SQL &#171; spip_documents_liens &#187; qui sert de pivot (on parle souvent de table de liaison) o&#249; est stock&#233;e donc l'information disant tel document est li&#233; &#224; ceci, cela, c'est &#224; dire &#224; des objets &#233;ditoriaux (articles, rubriques, mots, tout ce que l'on veut).&lt;/p&gt; &lt;p&gt;Il existe la m&#234;me table &#171; spip_mots_liens &#187; qui sert de pivot pour indiquer que tel mot est attach&#233; &#224; tel objet &#233;ditorial, lorsqu'on tague des articles, des documents d'un mot cl&#233;.&lt;/p&gt; &lt;p&gt;Mais il n'existe pas de table &#171; spip_articles_liens &#187;.&lt;/p&gt;
&lt;h3 class=&quot;spip&quot;&gt;Cas non ambigus&lt;/h3&gt;
&lt;p&gt;Lorsqu'on &#233;crit dans une boucle &lt;code class='spip_code' dir='ltr'&gt;ARTICLES&lt;/code&gt; le crit&#232;re &lt;code class='spip_code' dir='ltr'&gt;{id_mot}&lt;/code&gt;, SPIP recherche comment il peut faire pour honorer la demande. Il cherche donc si la table SQL &lt;code class='spip_code' dir='ltr'&gt;spip_articles&lt;/code&gt; poss&#232;de un champ &#171; id_mot &#187; (ce qui n'est pas le cas), et du coup tente de trouver une construction de liaison entre tables SQL (on parle de jointure) qui permet d'obtenir ce id_mot qui est demand&#233;. SPIP remarque que &lt;code class='spip_code' dir='ltr'&gt;spip_mots_liens&lt;/code&gt; poss&#232;de un champ &#171; id_mot &#187; et va donc demander une jointure avec cette table. &lt;br class='autobr' /&gt;
Il pourrait aussi rechercher une table ayant le couple de champs &#171; objet &#187; et &#171; id_objet &#187; et faire une jointure dessus en indiquant, du coup, que &lt;code class='spip_code' dir='ltr'&gt;objet=mot&lt;/code&gt; et &lt;code class='spip_code' dir='ltr'&gt;id_objet=l'identifiant&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;Pour aller plus loin, disons simplement que s'il y a plusieurs possibilit&#233;s de jointure pour obtenir &lt;code class='spip_code' dir='ltr'&gt;id_mot&lt;/code&gt;, SPIP choisira la jointure la plus courte, c'est &#224; dire qui n&#233;cessite d'interroger le moins de tables SQL possibles.&lt;/p&gt;
&lt;h3 class=&quot;spip&quot;&gt;Cas ambigus&lt;/h3&gt;
&lt;p&gt;Indiquer un crit&#232;re &lt;code class='spip_code' dir='ltr'&gt;{id_mot}&lt;/code&gt; sur une boucle &lt;code class='spip_code' dir='ltr'&gt;DOCUMENTS&lt;/code&gt; est plus ambigu. Effectivement, SPIP peut choisir de prendre le mot soit sur la liaison &lt;code class='spip_code' dir='ltr'&gt;spip_documents_liens&lt;/code&gt;, soit sur la liaison &lt;code class='spip_code' dir='ltr'&gt;spip_mots_liens&lt;/code&gt;. Les deux &#233;tant corrects, mais ils n'ont pas la m&#234;me signification.&lt;/p&gt; &lt;p&gt;Il faut donc savoir que dans ce cas, SPIP choisit de pr&#233;f&#233;rence une liaison avec la m&#234;me table que celle de la boucle, c'est &#224; dire que comme nous sommes dans une boucle &lt;code class='spip_code' dir='ltr'&gt;DOCUMENTS&lt;/code&gt;, SPIP choisira de pr&#233;f&#233;rence la liaison avec &lt;code class='spip_code' dir='ltr'&gt;spip_documents_liens&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;Alors, pourquoi y a t'il deux tables de liaisons possibles avec les documents ou avec les mots ? et &#224; quoi servent-elles ? qu'est-ce qui les diff&#233;rencient ?&lt;/p&gt;
&lt;h3 class=&quot;spip&quot;&gt;Des mots sur des documents, des documents sur des mots&lt;/h3&gt;
&lt;p&gt;Pour expliquer ce qui se passe :&lt;/p&gt;
&lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; Les documents en SPIP 3 peuvent &#234;tre sur n'importe quel objet (y compris les mots) (des mots peuvent avoir des documents attach&#233;s)&lt;/li&gt;&lt;li&gt; Les mots en SPIP 3 peuvent &#234;tre mis sur n'importe quel objet (y compris les documents) (des documents peuvent &#234;tre tagu&#233;s par d&#233;s mots)&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;On voit bien ici que c'est d&#233;licat pour SPIP de comprendre ce que signifie &lt;code class='spip_code' dir='ltr'&gt;(DOCUMENTS){id_mot}&lt;/code&gt; : est-ce qu'on veut ?&lt;/p&gt;
&lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; les documents d'un mot cl&#233; ?&lt;/li&gt;&lt;li&gt; les documents tagu&#233;s d'un mot cl&#233; ?&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Il faut donc faire un peu d'analyse de fonctionnement de SPIP pour comprendre ce qui va se passer :&lt;/p&gt;
&lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; Lorsqu'on lie un document &#224; un objet, la liaison est stock&#233;e dans la table &lt;code class='spip_code' dir='ltr'&gt;spip_documents_liens&lt;/code&gt;&lt;/li&gt;&lt;li&gt; Lorsqu'on lie un mot &#224; un objet, la liaison est stock&#233;e dans la table &lt;code class='spip_code' dir='ltr'&gt;spip_mots_liens&lt;/code&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Ce que SPIP va d&#233;cider lorsqu'il y a ambigu&#239;t&#233;, c'est &#224; dire comme ici &lt;code class='spip_code' dir='ltr'&gt;(DOCUMENTS){id_mot}&lt;/code&gt; alors qu'il existe les 2 tables &lt;code class='spip_code' dir='ltr'&gt;spip_documents_liens&lt;/code&gt; et &lt;code class='spip_code' dir='ltr'&gt;spip_mots_liens&lt;/code&gt;, c'est qu'il va pr&#233;f&#233;rer interpr&#233;ter cela comme une liaison sur la table de lien de la boucle en cours, c'est &#224; dire sur &lt;code class='spip_code' dir='ltr'&gt;spip_documents_liens&lt;/code&gt;, ce qui signifie donc que &#231;a va retourner &#171; les documents attach&#233;s &#224; un mot cl&#233; &#187;&lt;/p&gt; &lt;p&gt;Pour lever les ambigu&#239;t&#233;s, on peut indiquer, donc, la relation du lien de plusieurs mani&#232;res, lorsqu'on veut l'autre relation :&lt;/p&gt;
&lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; Soit en l'indiquant comme table : &lt;code class='spip_code' dir='ltr'&gt;(DOCUMENTS mots_liens){id_mot}&lt;/code&gt;&lt;/li&gt;&lt;li&gt; Soit en l'indiquant dans le crit&#232;re &lt;code class='spip_code' dir='ltr'&gt;(DOCUMENTS){mots_liens.id_mot}&lt;/code&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Il faut noter que mettre simplement &lt;code class='spip_code' dir='ltr'&gt;(DOCUMENTS){mots.id_mot}&lt;/code&gt; n'est pas suffisant pour lever l'ambigu&#239;t&#233;.&lt;/p&gt; &lt;p&gt;D'autres exemples :&lt;br class='autobr' /&gt;
Liaison &lt;code class='spip_code' dir='ltr'&gt;spip_documents_liens&lt;/code&gt; (Les documents attach&#233;s &#224; un mot)&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot; data-clipboard-text=&quot;#ID_DOCUMENT&quot;&gt;&lt;pre class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;BOUCLE_1&lt;/span&gt;&lt;span style=&quot;color: #527EE0;&quot;&gt;(DOCUMENTS)&lt;/span&gt;&lt;span style=&quot;color: #984CFF;&quot;&gt;&lt;span style=&quot;&quot;&gt;{id_mot}&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#ID_DOCUMENT&lt;/span&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;/BOUCLE_1&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Liaison &lt;code class='spip_code' dir='ltr'&gt;spip_mots_liens&lt;/code&gt; (Les documents tagu&#233;s d'un mot)&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;pre class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;BOUCLE_2&lt;/span&gt;&lt;span style=&quot;color: #527EE0;&quot;&gt;(DOCUMENTS mots_liens)&lt;/span&gt;&lt;span style=&quot;color: #984CFF;&quot;&gt;&lt;span style=&quot;&quot;&gt;{id_mot}&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#ID_DOCUMENT&lt;/span&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;/BOUCLE_2&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;BOUCLE_3&lt;/span&gt;&lt;span style=&quot;color: #527EE0;&quot;&gt;(DOCUMENTS mots_liens)&lt;/span&gt;&lt;span style=&quot;color: #984CFF;&quot;&gt;&lt;span style=&quot;&quot;&gt;{mots.id_mot}&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#ID_DOCUMENT&lt;/span&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;/BOUCLE_3&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;BOUCLE_4&lt;/span&gt;&lt;span style=&quot;color: #527EE0;&quot;&gt;(DOCUMENTS)&lt;/span&gt;&lt;span style=&quot;color: #984CFF;&quot;&gt;&lt;span style=&quot;&quot;&gt;{mots_liens.id_mot}&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#ID_DOCUMENT&lt;/span&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;/BOUCLE_4&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/83ab9964c9294efe36420f007bfeca1c.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Attraper les documents tagu&#233;s avec un mot cl&#233; appartenant &#224; un certain groupe :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;pre class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;BOUCLE_doc_groupe&lt;/span&gt;&lt;span style=&quot;color: #527EE0;&quot;&gt;(DOCUMENTS mots_liens)&lt;/span&gt;&lt;span style=&quot;color: #984CFF;&quot;&gt; &lt;span style=&quot;&quot;&gt;{mots.id_groupe=1}&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#ID_DOCUMENT&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;/BOUCLE_doc_groupe&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;BOUCLE_doc_groupe_type&lt;/span&gt;&lt;span style=&quot;color: #527EE0;&quot;&gt;(DOCUMENTS mots_liens)&lt;/span&gt;&lt;span style=&quot;color: #984CFF;&quot;&gt; &lt;span style=&quot;&quot;&gt;{mots.type=Nom}&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#ID_DOCUMENT&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;/BOUCLE_doc_groupe_type&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/ef2d16c30e60bbbbbc1df4ee3f41262d.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>Int&#233;grer une table existante dans SPIP 3 avec la fabrique (suite)</title>
		<link>http://marcimat.magraine.net/Integrer-une-table-existante-dans-361</link>
		<guid isPermaLink="true">http://marcimat.magraine.net/Integrer-une-table-existante-dans-361</guid>
		<dc:date>2012-04-20T17:47:26Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>Matthieu Marcillaud</dc:creator>



		<description>
&lt;p&gt;Nous l'avons vu dans Int&#233;grer une table existante dans SPIP 3 avec la Fabrique, &#171; La Fabrique &#187; permet de cr&#233;er des bases fonctionnelles de plugins g&#233;rant des objets &#233;ditoriaux. Nous allons continuer avec une autre probl&#233;matique avec l'utilisation d'un autre objet, une table contenant des lieux.&lt;br class='autobr' /&gt;
Le principe va &#234;tre le m&#234;me et donc je ne vais pas d&#233;tailler les m&#234;mes choses. Cette table est volumineuse, et a des colonnes que nous allons &#233;galement migrer dans des liaisons.&lt;br class='autobr' /&gt;
Voici ce que nous avons &#224; migrer (...)&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 l'avons vu dans &lt;a href=&quot;http://marcimat.magraine.net/Integrer-une-table-existante-dans&quot; class='spip_in'&gt;Int&#233;grer une table existante dans SPIP 3 avec la Fabrique&lt;/a&gt;, &lt;a href=&quot;http://www.spip-contrib.net/?article4134&quot; class='spip_out' rel='external'&gt;&#171; La Fabrique &#187;&lt;/a&gt; permet de cr&#233;er des bases fonctionnelles de plugins g&#233;rant des objets &#233;ditoriaux. Nous allons continuer avec une autre probl&#233;matique avec l'utilisation d'un autre objet, une table contenant des lieux.&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;p&gt;Le principe va &#234;tre le m&#234;me et donc je ne vais pas d&#233;tailler les m&#234;mes choses. Cette table est volumineuse, et a des colonnes que nous allons &#233;galement migrer dans des liaisons.&lt;/p&gt; &lt;p&gt;Voici ce que nous avons &#224; migrer entre autres choses, qui diff&#232;rent par rapport au premier article sur le sujet :&lt;/p&gt;
&lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; 1 champ &#171; pertinence &#187; qui ira en champs extras 'pertinence' dans spip_gis&lt;/li&gt;&lt;li&gt; 1 champ &#171; pays &#187; qui contient un nom de pays, et sera migr&#233; vers un identifiant de pays&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Et ce qu'il faudra faire en plus de la migration :&lt;/p&gt;
&lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; cr&#233;er / g&#233;rer le champs extra sur spip_gis,&lt;/li&gt;&lt;li&gt; des saisies sp&#233;cifiques dans cette table comme la s&#233;lection d'une ville dans la table spip_villes du m&#234;me plugin. Ce n'est pas un lien dans ce qu'on me demande, &#231;a aide simplement &#224; retrouver certaines donn&#233;es comme l'insee de la ville, aussi stock&#233; dans cette table de lieu.&lt;/li&gt;&lt;/ul&gt;&lt;h3 class=&quot;spip&quot;&gt;D&#233;clarer l'objet dans la Fabrique&lt;/h3&gt;
&lt;p&gt;On l'a d&#233;j&#224; vu, donc nous cliquons :&lt;/p&gt;
&lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; &#171; Ajouter un objet &#233;ditorial &#187;&lt;/li&gt;&lt;li&gt; Pr&#233;-construire le contenu du formulaire avec la table que l'on d&#233;sire &lt;/li&gt;&lt;li&gt; Modifier certaines infos (ici la construction de sait pas que le singulier est &#171; lieu &#187;, il faut donc le renseigner : dans la description, ET dans la partie &#171; tables &#187; / &#171; sp&#233;cificit&#233;s des tables hors normes &#187; on l'on indique le nom de cl&#233; primaire &#171; id_lieu &#187; et le type &#171; lieu &#187;.&lt;span class=&quot;spip_note_ref&quot;&gt; [&lt;a href='#nb1' class='spip_note' rel='footnote' title='Nota, la Fabrique 1.12.0 ou SPIP 3 ne savent pas g&#233;rer parfaitement une (...)' id='nh1'&gt;1&lt;/a&gt;]&lt;/span&gt;&lt;/li&gt;&lt;li&gt; Pour chaque champs de la table, remplir plus pr&#233;cis&#233;ment les infos (noms explicites, saisies souhait&#233; pour l'&#233;dition, pond&#233;ration de recherche) et &#233;ventuellement v&#233;rifier que les d&#233;clarations SQL n'ont pas de NULL autoris&#233;s sans valeur par d&#233;faut&lt;/li&gt;&lt;li&gt; On active dans &#171; fichiers &#233;chafaud&#233;s &#187; &lt;code class='spip_code' dir='ltr'&gt;prive/squelettes/contenu/lieux.html&lt;/code&gt;, qui offre simplement en plus un petit formulaire de recherche, qui sera pratique sur notre table volumineuse&lt;/li&gt;&lt;/ul&gt;&lt;h3 class=&quot;spip&quot;&gt;Cr&#233;er le champ pertinence dans GIS&lt;/h3&gt;
&lt;p&gt;Il faut :&lt;/p&gt;
&lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; d&#233;clarer le champs extra (dans &lt;code class='spip_code' dir='ltr'&gt;paquet.xml&lt;/code&gt; et dans &lt;code class='spip_code' dir='ltr'&gt;base/prefixe.php&lt;/code&gt;)&lt;/li&gt;&lt;li&gt; ajouter les codes d'installation / d&#233;sinstallation de ce champ&lt;/li&gt;&lt;li&gt; l'ajouter sa valeur en m&#234;me temps que la migration&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Dans la Fabrique, on ajoute la ligne du pipeline dans &lt;code class='spip_code' dir='ltr'&gt;paquet &gt; codes &#224; ins&#233;rer &gt; paquet.xml&lt;/code&gt; ainsi que la d&#233;pendence au plugin Champs Extras.&lt;span class=&quot;spip_note_ref&quot;&gt; [&lt;a href='#nb2' class='spip_note' rel='footnote' title='Le plugin construit a &#233;t&#233; renomm&#233; en &#171; G&#233;oniche &#187;' id='nh2'&gt;2&lt;/a&gt;]&lt;/span&gt;&lt;span class=&quot;spip_note_ref&quot;&gt; [&lt;a href='#nb3' class='spip_note' rel='footnote' title='On pourrait tr&#232;s bien ajouter ces codes apr&#232;s la cr&#233;ation du plugin si on ne (...)' id='nh3'&gt;3&lt;/a&gt;]&lt;/span&gt;&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_xml cadre&quot;&gt;&lt;pre class=&quot;xml&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&lt;necessite&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;nom&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;cextras&quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;compatibilite&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;[3.0.0;]&quot;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&lt;pipeline&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;nom&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;declarer_champs_extras&quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;inclure&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;base/geoniche.php&quot;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/4ad08657956b1dab50e97e746bf05b29.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;On ajoute la fonction de d&#233;claration du champs dans &lt;code class='spip_code' dir='ltr'&gt;paquet &gt; codes &#224; ins&#233;rer &gt; bases &gt; prefixe.php &lt;/code&gt; :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;pre class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; geoniche_declarer_champs_extras&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$champs&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #000088;&quot;&gt;$champs&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'spip_gis'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'pertinence'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'saisie'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'input'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// Type du champs (voir plugin Saisies)&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'options'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'nom'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'pertinence'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'label'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; _T&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'geoniche:pertinence'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'sql'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;int(2) NOT NULL DEFAULT 0&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'defaut'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;''&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// Valeur par d&#233;faut&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$champs&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/1e9773916db7d6c8060e53c87d1f5668.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Ainsi que les proc&#233;dures d'installation / d&#233;sinstallation dans &lt;code class='spip_code' dir='ltr'&gt;administrations.php&lt;/code&gt; que l'on peut ajouter avant l'importation des donn&#233;es.&lt;/p&gt;
&lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; installation :
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;pre class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;include_spip&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'inc/cextras'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;include_spip&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'base/geoniche'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;cextras_api_upgrade&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;geoniche_declarer_champs_extras&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$maj&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'create'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/875c546a6efd1d0cc8e609ba8833286d.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; d&#233;installation :
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;pre class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;include_spip&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'inc/cextras'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;include_spip&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'base/geoniche'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;cextras_api_vider_tables&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;geoniche_declarer_champs_extras&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$maj&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'create'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/1e3867763648aa2beaf6db6107f97784.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Il restera, &#224; posteriori &#224; ajouter la cha&#238;ne de langue &lt;code class='spip_code' dir='ltr'&gt;geoniche:pertinence&lt;/code&gt;.&lt;/p&gt;
&lt;h3 class=&quot;spip&quot;&gt;Ajouter une saisie pour le champ INSEE&lt;/h3&gt;
&lt;p&gt;Dans la table lieux, il faut faire renseigner un champ INSEE de commune. On retrouvera une liste de ces valeurs &#224; partir du code postal choisi.&lt;/p&gt; &lt;p&gt;La saisie (&#224; placer dans &lt;code class='spip_code' dir='ltr'&gt;saisies/insee.html&lt;/code&gt;) peut ressembler &#224; cela :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;pre class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;select name=&quot;&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{nom}&lt;/span&gt;&quot; id=&quot;champ_&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{nom}&lt;/span&gt;&quot;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt; class=&quot;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{class}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&quot;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt; disabled=&quot;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{disable}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&quot;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt; readonly=&quot;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{readonly}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&quot;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt; &gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{cacher_option_intro}&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|non&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;option value=&quot;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{option_intro}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/option&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;BOUCLE_insee&lt;/span&gt;&lt;span style=&quot;color: #527EE0;&quot;&gt;(VILLES)&lt;/span&gt;&lt;span style=&quot;color: #984CFF;&quot;&gt;&lt;span style=&quot;&quot;&gt;{par nom_ville_min}&lt;/span&gt;&lt;span style=&quot;&quot;&gt;{zip}&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;option value=&quot;&lt;span style=&quot;color: #D05000;&quot;&gt;#INSEE&lt;/span&gt;&quot;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#INSEE&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|==&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;{valeur,&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;{defaut}}}&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|oui&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt; selected=&quot;selected&quot;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#NOM_VILLE_MIN&lt;/span&gt; &lt;span style=&quot;&quot;&gt;&lt;span style=&quot;color:#FF2100; font-weight:bold;&quot;&gt;\&lt;/span&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#INSEE&lt;/span&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;color:#FF2100; font-weight:bold;&quot;&gt;\&lt;/span&gt;)&lt;/span&gt;&lt;/option&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;/BOUCLE_insee&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;/select&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/4d02c99f3ec75c446c11b688edece440.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Aussi, on ajoutera un petit javascript qui rechargera la liste des INSEE possibles d&#232;s que la valeur du code postal change, dans le squelette du formulaire d'&#233;dition :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_javascript cadre&quot;&gt;&lt;pre class=&quot;javascript&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #339933;&quot;&gt;&lt;&lt;/span&gt;script type&lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #3366CC;&quot;&gt;&quot;text/javascript&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;$&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	$&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #3366CC;&quot;&gt;'.formulaire_#FORM .editer_zip input'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;change&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; val &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; $&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;.&lt;span style=&quot;color: #660066;&quot;&gt;val&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;var&lt;/span&gt; select_insee &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; $&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #3366CC;&quot;&gt;'.formulaire_#FORM .editer_insee select'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; insee &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; select_insee.&lt;span style=&quot;color: #660066;&quot;&gt;val&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; select_insee.&lt;span style=&quot;color: #660066;&quot;&gt;val&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #3366CC;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; $.&lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #3366CC;&quot;&gt;'[(#URL_PAGE{ajax-insees})]'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;zip&lt;span style=&quot;color: #339933;&quot;&gt;:&lt;/span&gt; val&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; insee&lt;span style=&quot;color: #339933;&quot;&gt;:&lt;/span&gt; insee&lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000066; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;data&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; select_insee.&lt;span style=&quot;color: #660066;&quot;&gt;html&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;data&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;jQuery&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #339933;&quot;&gt;&lt;/&lt;/span&gt;script&lt;span style=&quot;color: #339933;&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/180820fec91f6870c20ae3b9ac5f1892.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Ce squelette appelle une page &#171; ajax-insees &#187; qui peut contenir le strict minimum tel que :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;pre class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#HTTP_HEADER&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{Content-Type: text/html; charset=&lt;span style=&quot;color: #D05000;&quot;&gt;#CHARSET&lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;option value=&quot;&quot;&gt;&lt;/option&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;BOUCLE_insee&lt;/span&gt;&lt;span style=&quot;color: #527EE0;&quot;&gt;(VILLES)&lt;/span&gt;&lt;span style=&quot;color: #984CFF;&quot;&gt;&lt;span style=&quot;&quot;&gt;{par nom_ville_min}&lt;/span&gt;&lt;span style=&quot;&quot;&gt;{zip}&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;option value=&quot;&lt;span style=&quot;color: #D05000;&quot;&gt;#INSEE&lt;/span&gt;&quot;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#INSEE&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|==&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;{insee}}&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|oui&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt; selected=&quot;selected&quot;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#NOM_VILLE_MIN&lt;/span&gt; &lt;span style=&quot;&quot;&gt;&lt;span style=&quot;color:#FF2100; font-weight:bold;&quot;&gt;\&lt;/span&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#INSEE&lt;/span&gt;&lt;span style=&quot;&quot;&gt;&lt;span style=&quot;color:#FF2100; font-weight:bold;&quot;&gt;\&lt;/span&gt;)&lt;/span&gt;&lt;/option&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;/BOUCLE_insee&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/44ba14c4d6a97d79ca1b7c19b7dddf53.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;h3 class=&quot;spip&quot;&gt;Conserver une partie des informations ajout&#233;es au plugin apr&#232;s sa cr&#233;ation&lt;/h3&gt;
&lt;p&gt;Avec la version 1.12.0 de la fabrique arrive un petit utilitaire pour simplifier certaines op&#233;rations &#224; effectuer apr&#232;s la cr&#233;ation du plugin lors de l'ex&#233;cution du script post_creation. C'est une classe PHP nomm&#233;e &#171; Futilitaire &#187; et incluse dans &lt;code class='spip_code' dir='ltr'&gt;inc/futilitaire.php&lt;/code&gt; du plugin Fabrique.&lt;/p&gt; &lt;p&gt;Elle contient pour l'instant 2 fonctions utiles :&lt;/p&gt;
&lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; &lt;code class='spip_code' dir='ltr'&gt;deplacer_fichiers($liste)&lt;/code&gt; qui indique de deplacer du backup (l'ancienne cr&#233;ation) vers la nouvelle cr&#233;ation la liste des fichiers indiques. C'est donc une liste des fichiers que l'on a ajout&#233; au plugin qui est a donner.&lt;/li&gt;&lt;li&gt; &lt;code class='spip_code' dir='ltr'&gt;inserer_lignes($chemin, $start, $len, $code)&lt;/code&gt; qui permet d'ajouter des lignes de code dans un des fichiers pr&#233;sents, &#224; partir de la ligne indiqu&#233;e dans &lt;code class='spip_code' dir='ltr'&gt;$start&lt;/code&gt; (peut &#234;tre n&#233;gatif pour partir de la fin du fichier), en supprimant &lt;code class='spip_code' dir='ltr'&gt;$len&lt;/code&gt; lignes du fichier, et en ins&#233;rant le contenu de &lt;code class='spip_code' dir='ltr'&gt;$code&lt;/code&gt; &#224; cet emplacement.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Voici un exemple :&lt;/strong&gt;&lt;br class='autobr' /&gt;
Dans l'interface de la fabrique, dans &lt;code class='spip_code' dir='ltr'&gt;Paquet &gt; Scripts &#224; ex&#233;cuter &gt; post_creation&lt;/code&gt;, j'ai simplement l'inclusion d'un fichier et l'ex&#233;cution d'une fonction :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;pre class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #b1b100;&quot;&gt;include_once&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$destination_ancien_plugin&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'fabrique_geoniche_post_creation.php'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;fabrique_geoniche_post_creation&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$data&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$destination_plugin&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$destination_ancien_plugin&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/ea546134fcf89135334a1965c76675da.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Dans le plugin g&#233;n&#233;r&#233;, j'ajoute donc ce fichier &#224; la racine &lt;code class='spip_code' dir='ltr'&gt;fabrique_geoniche_post_creation.php&lt;/code&gt; (vous l'appelez comme bon vous semble) contenant :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;pre class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&lt;?php&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;include_spip&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'inc/futilitaire'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; fabrique_geoniche_post_creation&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$data&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$destination_plugin&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$destination_ancien_plugin&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// charger le Futilitaire&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #000088;&quot;&gt;$futil&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;new&lt;/span&gt; Futilitaire&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$data&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$destination_plugin&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$destination_ancien_plugin&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// deplacer les fichiers crees, dont celui-ci&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #000088;&quot;&gt;$futil&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;deplacer_fichiers&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'fabrique_geoniche_post_creation.php'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'base/importer_spip_villes.php'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'base/importer_spip_villes_donnees.gz'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'base/importer_spip_lieux.php'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'base/importer_spip_lieux_donnees.gz'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'saisies/thematique.html'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'saisies-vues/thematique.html'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'saisies/insee.html'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'saisies-vues/insee.html'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'saisies-vues/ape.html'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'saisies/ape.html'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'ajax-insees.html'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'after.txt'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// ajouter du code dans lang/geoniche.php&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$lignes&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #0000cc; font-style: italic;&quot;&gt;&lt;&lt;&lt;EOF&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #0000cc; font-style: italic;&quot;&gt;// P&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #0000cc; font-style: italic;&quot;&gt;'pertinence' =&gt; 'Pertinence',&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #0000cc; font-style: italic;&quot;&gt;EOF&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #000088;&quot;&gt;$futil&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;ajouter_lignes&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'lang/geoniche_fr.php'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; fabrique_tabulations&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$lignes&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// ajouter du code dans formulaires/editer_lieux.html&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$lignes&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #0000cc; font-style: italic;&quot;&gt;&lt;&lt;&lt;EOF&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #0000cc; font-style: italic;&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #0000cc; font-style: italic;&quot;&gt;(function($){&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #0000cc; font-style: italic;&quot;&gt;	$('.formulaire_#FORM .editer_zip input').change(function(){&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #0000cc; font-style: italic;&quot;&gt; val = $(this).val();&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #0000cc; font-style: italic;&quot;&gt; var select_insee = $('.formulaire_#FORM .editer_insee select');&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #0000cc; font-style: italic;&quot;&gt; insee = select_insee.val();&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #0000cc; font-style: italic;&quot;&gt; select_insee.val(&quot;&quot;);&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #0000cc; font-style: italic;&quot;&gt; $.get('[(#URL_PAGE{ajax-insees})]', {zip: val, insee: insee}, function(data){&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #0000cc; font-style: italic;&quot;&gt; select_insee.html(data);&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #0000cc; font-style: italic;&quot;&gt; });&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #0000cc; font-style: italic;&quot;&gt;	});&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #0000cc; font-style: italic;&quot;&gt;})(jQuery);&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #0000cc; font-style: italic;&quot;&gt;&lt;/script&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #0000cc; font-style: italic;&quot;&gt;EOF&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #000088;&quot;&gt;$futil&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;-&gt;&lt;/span&gt;&lt;span style=&quot;color: #004000;&quot;&gt;ajouter_lignes&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'formulaires/editer_lieu.html'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$lignes&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;?&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/8a563021507a7835957fd4699b9de1d8.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Du coup, &#224; chaque fois que je g&#233;n&#232;re mon plugin via la Fabrique, je ne perds pas les fichiers indiqu&#233;s et il me remet ce code l&#224; o&#249; je lui dis.&lt;/p&gt; &lt;p&gt;&#192; vrai dire, cela a peu d'utilit&#233; certainement pour vous, &#224; part le fait de se dire qu'on peut reg&#233;n&#233;rer le plugin sans perdre de modifications, pour peu qu'on ai list&#233; ici toutes les modifications que l'on a fait. Pour ma part, cela m'aide &#224; pouvoir ajouter de nouvelles fonctions dans la fabrique sans perdre de petites modifications de code d&#233;j&#224; r&#233;alis&#233;es.&lt;/p&gt;&lt;/div&gt;
		&lt;hr /&gt;
		&lt;div class='rss_notes'&gt;&lt;div id='nb1'&gt;
&lt;p&gt;&lt;span class=&quot;spip_note_ref&quot;&gt;[&lt;a href='#nh1' class='spip_note' title='Notes 1' rev='footnote'&gt;1&lt;/a&gt;] &lt;/span&gt;Nota, la Fabrique 1.12.0 ou SPIP 3 ne savent pas g&#233;rer parfaitement une table dont le pluriel est identique au singulier tel que &#171; un univers, des univers &#187; (plus pr&#233;cis&#233;ment o&#249; l'&#171; objet &#187; est identique au &#171; type &#187;), il faudra donc &#233;viter ces noms l&#224;, sinon le plugin g&#233;n&#233;r&#233; ne pourra pas lister tous les univers sur exec=univers (qui s'attend &#224; afficher la vue d'un univers) et renverra un acc&#232;s interdit. Il y a de multiples contournements possibles, mais j'ai pr&#233;f&#233;r&#233; ne pas alourdir la Fabrique avec cela pour l'instant.&lt;/p&gt;
&lt;/div&gt;&lt;div id='nb2'&gt;
&lt;p&gt;&lt;span class=&quot;spip_note_ref&quot;&gt;[&lt;a href='#nh2' class='spip_note' title='Notes 2' rev='footnote'&gt;2&lt;/a&gt;] &lt;/span&gt;Le plugin construit a &#233;t&#233; renomm&#233; en &#171; G&#233;oniche &#187;&lt;/p&gt;
&lt;/div&gt;&lt;div id='nb3'&gt;
&lt;p&gt;&lt;span class=&quot;spip_note_ref&quot;&gt;[&lt;a href='#nh3' class='spip_note' title='Notes 3' rev='footnote'&gt;3&lt;/a&gt;] &lt;/span&gt;On pourrait tr&#232;s bien ajouter ces codes apr&#232;s la cr&#233;ation du plugin si on ne compte plus utiliser la Fabrique ensuite.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>Int&#233;grer une table existante dans SPIP 3 avec la Fabrique</title>
		<link>http://marcimat.magraine.net/Integrer-une-table-existante-dans</link>
		<guid isPermaLink="true">http://marcimat.magraine.net/Integrer-une-table-existante-dans</guid>
		<dc:date>2012-04-20T17:28:22Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>Matthieu Marcillaud</dc:creator>



		<description>
&lt;p&gt;Pour un site de mode fra&#238;chement migr&#233; en SPIP 3 (toujours en d&#233;veloppement &#224; l'heure de ces lignes), et pour qu'il soit encore plus &#224; la mode, on m'a demand&#233; de pouvoir g&#233;rer des tables SQL d&#233;j&#224; pr&#233;sentes en base, depuis l'interface priv&#233;e de SPIP, et avec quelques contraintes. Ce document &#224; un objectif de transfert de connaissances et se veut p&#233;dagogique. Il est fortement recommand&#233; d'avoir lu Chats 2 - SPIP 3 avant de poursuivre.&lt;br class='autobr' /&gt;
Cet article va raconter la migration d'une table SQL nomm&#233;e &#171; villes &#187; (qui (...)&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;Pour un site de mode fra&#238;chement migr&#233; en SPIP 3 (toujours en d&#233;veloppement &#224; l'heure de ces lignes), et pour qu'il soit encore plus &#224; la mode, on m'a demand&#233; de pouvoir g&#233;rer des tables SQL d&#233;j&#224; pr&#233;sentes en base, depuis l'interface priv&#233;e de SPIP, et avec quelques contraintes. Ce document &#224; un objectif de transfert de connaissances et se veut p&#233;dagogique. Il est fortement recommand&#233; d'avoir lu &lt;a href=&quot;http://marcimat.magraine.net/Chats-2-SPIP-3&quot; class='spip_in'&gt;Chats 2 - SPIP 3&lt;/a&gt; avant de poursuivre.&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;p&gt;Cet article va raconter la migration d'une table SQL nomm&#233;e &#171; villes &#187; (qui n'a rien &#224; voir avec le plugin &#171; g&#233;ographie &#187;). Cette table devra pouvoir &#234;tre parcourue depuis l'interface priv&#233;e, mais seule une ou deux colonnes seront &#233;ditables (la table a 15 colonnes), et il ne sera pas possible de cr&#233;er de nouvelles villes.&lt;/p&gt; &lt;p&gt;Nous cr&#233;erons une premi&#232;re base du plugin gr&#226;ce &#224; un autre plugin &lt;a href=&quot;http://www.spip-contrib.net/?article4134&quot; class='spip_out' rel='external'&gt;&#171; La Fabrique &#187;&lt;/a&gt; que je d&#233;veloppe actuellement. La Fabrique g&#233;n&#232;re les fichiers d'un plugin et peut g&#233;n&#233;rer un plugin contenant des objets &#233;ditoriaux. Bien s&#251;r, le code produit n'est qu'une base de travail (certes fonctionnel) que l'on &#233;dite ensuite &#224; sa sauce.&lt;/p&gt; &lt;p&gt;Il nous faudra migrer les donn&#233;es pr&#233;sentes dans la table, pour cr&#233;er une colonne de cl&#233; primaire &lt;code class='spip_code' dir='ltr'&gt;id_ville&lt;/code&gt;, d&#233;placer les coordonn&#233;es g&#233;ographiques sur le plugin GIS 3, et charger &#224; l'installation du plugin les donn&#233;es des villes.&lt;/p&gt;
&lt;h3 class=&quot;spip&quot;&gt;Copie des tables pour une utilisation en serveur local&lt;/h3&gt;
&lt;p&gt;Tout d'abord, puisque je travaille uniquement sur un serveur local, j'ai ajout&#233; les tables SQL en question dans une base de donn&#233;es cr&#233;e sous PHPmyAdmin. Pour cela, j'avais &#224; disposition un export des tables et donn&#233;es au format SQL. En ligne de commande (sous Ubuntu) je charge les donn&#233;es dans la base en me connectant &#224; mysql :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_bash cadre&quot;&gt;&lt;pre class=&quot;bash&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;cd&lt;/span&gt; repertoire&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;ou&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;est&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;l&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;export&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&lt;/span&gt;sql&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;mysql &lt;span style=&quot;color: #660033;&quot;&gt;-u&lt;/span&gt; nom_utilisateur &lt;span style=&quot;color: #660033;&quot;&gt;-p&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;use nom_de_la_base&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #7a0874; font-weight: bold;&quot;&gt;source&lt;/span&gt; nom_du_fichier.sql&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/904216eb80f322f5f8f37e830945fc26.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Ensuite, dans un SPIP3 local, je vais d&#233;clarer ma nouvelle base sur la page &#171; Maintenance technique &#187; de sorte que je peux boucler sur ces nouvelles donn&#233;es&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;pre class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;BOUCLE_villes&lt;/span&gt;&lt;span style=&quot;color: #527EE0;&quot;&gt;(nom_connecteur:VILLES)&lt;/span&gt;&lt;span style=&quot;color: #984CFF;&quot;&gt;&lt;span style=&quot;&quot;&gt;{par insee}&lt;/span&gt;&lt;span style=&quot;&quot;&gt;{pagination 10}&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;...&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;/BOUCLE_villes&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/a4b07f4e1ae89e76afc189df72eb077a.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;h3 class=&quot;spip&quot;&gt;Fabriquer la base du plugin&lt;/h3&gt;
&lt;p&gt;Nous allons g&#233;n&#233;rer un premier jet de plugin en utilisant la Fabrique. Dans un premier temps sans trop rien de plus. Une fois le plugin activ&#233;, il faut se rendre sur Squelettes &gt; La Fabrique. Si un plugin avait &#233;t&#233; construit auparavant, il faut aller r&#233;initialiser le formulaire dans l'onglet pr&#233;vu.&lt;/p&gt; &lt;p&gt;On peut alors remplir les informations relatives au plugin. Cette premi&#232;re page (en ayant rempli la partie &#171; paquet &#187;) suffit &#224; g&#233;n&#233;rer des fichiers du plugin (bouton &#171; Cr&#233;er le plugin &#187;) mais nous allons continuer et ajouter un objet &#233;ditorial.&lt;/p&gt; &lt;p&gt;&lt;span class='spip_document_312 spip_documents spip_documents_center'&gt;
&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH438/fabrique-165d8.png' width='500' height='438' alt=&quot;&quot; /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;L'objet &#233;ditorial ajout&#233;, l'interface propose d'utiliser une table existante pour en d&#233;duire la structure des donn&#233;es notre objet &#233;ditorial. Ici, j'utilise la table &#171; villes &#187; sur le connecteur &#171; source &#187;.&lt;/p&gt; &lt;p&gt;&lt;span class='spip_document_313 spip_documents spip_documents_center'&gt;
&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH512/objet-107e5.png' width='500' height='512' alt=&quot;&quot; /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;Au retour du pr&#233;-chargement, les infos de l'objet ont &#233;t&#233; d&#233;duites si cela &#233;tait possible, et au mieux de l'information disponible. Il faudra donc apporter pour chaque partie quelques corrections ou informations suppl&#233;mentaires.&lt;/p&gt; &lt;p&gt;&lt;span class='spip_document_314 spip_documents spip_documents_center'&gt;
&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH300/objet_renseigne-42ff8.png' width='500' height='300' alt=&quot;&quot; /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;En compl&#233;tant quelques parties, on peut ajouter des logos, g&#233;rer les champs (en plus ou en moins), les d&#233;placer, leur attribuer des types de saisies. On peut trouver des logos par exemple sur &lt;a href=&quot;http://thenounproject.com/&quot; class='spip_url spip_out auto' rel='nofollow external'&gt;http://thenounproject.com&lt;/a&gt;, qui m'a servi dans cet exemple. Les cha&#238;nes de langues sont pr&#233;-remplies &#233;galement (en fran&#231;ais) et on peut lancer une premi&#232;re cr&#233;ation du plugin.&lt;/p&gt; &lt;p&gt;&lt;span class='spip_document_315 spip_documents spip_documents_center'&gt;
&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH390/plugin_cree-3800d.png' width='500' height='390' alt=&quot;&quot; /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;Une fois cr&#233;&#233;, on peut se rendre sur la page d'administration des plugins pour l'activer et le tester.&lt;/p&gt; &lt;p&gt;&lt;span class='spip_document_316 spip_documents spip_documents_center'&gt;
&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH86/plugin_activer-d30d1.png' width='500' height='86' alt=&quot;&quot; /&gt;&lt;/span&gt;&lt;br class='autobr' /&gt;
&lt;span class='spip_document_317 spip_documents spip_documents_center'&gt;
&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH98/installation-70bf5.png' width='500' height='98' alt=&quot;&quot; /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;Dans &#233;dition &gt; villes on d&#233;couvre la liste, vide, des villes. Et l'on peut alors cr&#233;er une nouvelle ville. &#201;videmment, il faut avoir ajout&#233; des saisies dans certains champs de notre objet dans la Fabrique, sinon le formulaire d'&#233;dition sera vide. Pour les tests, j'avais cr&#233;&#233; 2 champs en plus de ceux de la table d'origine : nom et description.&lt;/p&gt; &lt;p&gt;&lt;span class='spip_document_318 spip_documents spip_documents_center'&gt;
&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH181/exec_villes-01881.png' width='500' height='181' alt=&quot;&quot; /&gt;&lt;/span&gt;&lt;br class='autobr' /&gt;
&lt;span class='spip_document_319 spip_documents spip_documents_center'&gt;
&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH342/une_ville-ca57c.png' width='500' height='342' alt=&quot;&quot; /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&#192; la validation du formulaire, on obtient cependant un joli message d'erreur.&lt;/p&gt; &lt;p&gt;&lt;span class='spip_document_320 spip_documents spip_documents_center'&gt;
&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH63/echec-1a27e.png' width='500' height='63' alt=&quot;&quot; /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;Cela signifie, dans notre cas qu'il y a eu une erreur SQL au moment de l'insertion. Un tour dans les logs nous indique l'erreur :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_apache cadre&quot; data-clipboard-text=&quot;Apr 05 19:33:14 127.0.0.1 (pid 11008) :Pri:ERREUR: | 0 : 23000 | 1 : 19 | 2 : spip_villes.insee may not be NULL - INSERT INTO spip_villes (maj) VALUES (datetime(&#039;now&#039;))&quot;&gt;&lt;pre class=&quot;apache&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;Apr 05 &lt;span style=&quot;color: #ff0000;&quot;&gt;19&lt;/span&gt;:&lt;span style=&quot;color: #ff0000;&quot;&gt;33&lt;/span&gt;:&lt;span style=&quot;color: #ff0000;&quot;&gt;14&lt;/span&gt; 127.0.0.1 (pid &lt;span style=&quot;color: #ff0000;&quot;&gt;11008&lt;/span&gt;) :Pri:ERREUR: | &lt;span style=&quot;color: #ff0000;&quot;&gt;0&lt;/span&gt; : &lt;span style=&quot;color: #ff0000;&quot;&gt;23000&lt;/span&gt; | &lt;span style=&quot;color: #ff0000;&quot;&gt;1&lt;/span&gt; : &lt;span style=&quot;color: #ff0000;&quot;&gt;19&lt;/span&gt; | &lt;span style=&quot;color: #ff0000;&quot;&gt;2&lt;/span&gt; : spip_villes.insee may not be NULL - INSERT INTO spip_villes (maj) VALUES (datetime(&lt;span style=&quot;color: #7f007f;&quot;&gt;'now'&lt;/span&gt;))&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;On comprend que la description SQL des champs de la table d'origine ne correspond pas tout &#224; fait au fonctionnement de SPIP. En effet, SPIP cr&#233;e d'abord une ligne vide dans un objet et obtient ainsi un identifiant de ligne (ici un id_ville) pour ins&#233;rer ensuite les valeurs soumises par le formulaire d'&#233;dition. Or dans ce cas, des champs ne tol&#232;rent pas d'&#234;tre &#171; NULL &#187; mais n'ont pas de valeur par d&#233;faut de d&#233;finis. Il nous faut donc, pour chaque champ dans ce cas, ajouter cette valeur par d&#233;faut, ce qui revient le plus souvent &#224; ajouter &#171; DEFAULT '' &#187; dans l'expression SQL du champ&lt;/p&gt; &lt;p&gt;On retourne donc dans la fabrique pour le faire, on recr&#233;e le plugin, on d&#233;sinstalle puis r&#233;installe notre plugin dans admin plugin, puis on reteste.&lt;br class='autobr' /&gt;
Cette fois l'insertion se passe bien.&lt;/p&gt; &lt;p&gt;&lt;span class='spip_document_321 spip_documents spip_documents_center'&gt;
&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L376xH141/poitiers-95e64.png' width='376' height='141' alt=&quot;&quot; /&gt;&lt;/span&gt;&lt;br class='autobr' /&gt;
&lt;span class='spip_document_322 spip_documents spip_documents_center'&gt;
&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH218/villes-ba846.png' width='500' height='218' alt=&quot;&quot; /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 class=&quot;spip&quot;&gt;Peupler notre plugin avec les donn&#233;es de la table d'origine&lt;/h3&gt;
&lt;p&gt;Tout ceci est bien joli, mais dans notre cas, ce qui nous int&#233;resse est de peupler notre table de ville avec un contenu pr&#233;-d&#233;fini, &#224; l'installation du plugin. Le contenu se trouve actuellement dans la table source ayant servi de base de d&#233;claration de notre objet. Une fois peupl&#233;, il faut afficher les champs, mais ne mettre que la description &#233;ditable (le reste &#233;tant fig&#233;).&lt;/p&gt; &lt;p&gt;La Fabrique ne g&#232;re pas depuis le formulaire de cr&#233;ation du plugin l'insertion de ces donn&#233;es, mais propose sur la page ?exec=fabrique_peuple un outil pour se faciliter cette t&#226;che.&lt;/p&gt; &lt;p&gt;&lt;span class='spip_document_323 spip_documents spip_documents_center'&gt;
&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH493/aide_peuplement-08cb2.png' width='500' height='493' alt=&quot;&quot; /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;Cet outil cr&#233;e un ou deux fichiers qui seront &#224; placer dans le r&#233;pertoire base/ du plugin que l'on a cr&#233;&#233;. Il faut &#233;galement ajouter l'appel de la fonction d'insertion dans le fichier d'administration lors de la cr&#233;ation de la table, avec :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;pre class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$maj&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'create'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'maj_tables'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'spip_villes'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;include_spip&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'base/importer_spip_villes'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$maj&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'create'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'importer_spip_villes'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/199a4330e7d8abcda94478b909a5a0be.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Cette fonction d'import g&#232;re la reprise de l'insertion des donn&#233;es en cas de timeout (trop de temps utilis&#233; par rapport &#224; ce qui est autoris&#233; dans la configuration de PHP). Tr&#232;s utile pour ins&#233;rer ces 36000 lignes en SQLite notamment.&lt;/p&gt; &lt;p&gt;&lt;span class='spip_document_324 spip_documents spip_documents_center'&gt;
&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH222/villes-2-33833.png' width='500' height='222' alt=&quot;&quot; /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;Du coup, nous pouvons voir sur la liste des villes que le compte est bon, mais que&#8230; nous n'avons pas correctement red&#233;clar&#233; le champ servant au calcul du titre. Je l'avais d&#233;clar&#233; sur la colonne &#171; nom &#187; pour tester, colonne que j'avais cr&#233;&#233;, mais l'insertion ins&#232;re les noms de nos villes dans une autre colonne. Il nous faut donc :&lt;/p&gt;
&lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; corriger soit directement notre plugin&lt;/li&gt;&lt;li&gt; soit en passant par la Fabrique, modifier les colonnes, recr&#233;er le plugin, remettre les fichiers d'imports, d&#233;sinstaller et r&#233;installer notre plugin (r&#233;installation uniquement utile si une colonne a &#233;t&#233; ajout&#233;e ou retir&#233;e, ce qui va &#234;tre le cas car je vais supprimer la colonne &#171; nom &#187;).&lt;/li&gt;&lt;/ul&gt;&lt;dl class='spip_document_325 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH100/titre-52da8.png' width='500' height='100' alt='PNG - 8.3&#160;ko' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-325 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Mettre le bon nom de colonne de titre&lt;/strong&gt;&lt;/dt&gt;
&lt;/dl&gt;
&lt;p&gt;&lt;span class='spip_document_326 spip_documents spip_documents_center'&gt;
&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH169/villes-3-601fb.png' width='500' height='169' alt=&quot;&quot; /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;Les noms de ville s'affichent bien, mais il y a un probl&#232;me de charset. Les donn&#233;es de la table d'origine ne semblent pas au bon format. Nous allons donc modifier notre script d'import pour corriger les caract&#232;res au passage et tester sur un panel d'insertion plus petit pour aller plus vite.&lt;/p&gt; &lt;p&gt;On choisit dans la fonction &lt;code class='spip_code' dir='ltr'&gt;importer_spip_villes()&lt;/code&gt; du fichier du m&#234;me nom de ne prendre que 100 villes, gr&#226;ce &#224; la fonction &lt;code class='spip_code' dir='ltr'&gt;array_slice()&lt;/code&gt; :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;pre class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;a href=&quot;http://www.php.net/list&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;list&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$cles&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$valeurs&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; donnees_spip_villes&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #000088;&quot;&gt;$valeurs&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array_slice&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array_slice&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$valeurs&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;100&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/828bafe0823e7b2734760869982c6f0b.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Et l'on teste un &lt;code class='spip_code' dir='ltr'&gt;utf8_encode()&lt;/code&gt; un peu plus loin :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_diff cadre&quot;&gt;&lt;pre class=&quot;diff&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #991111;&quot;&gt;- $i&lt;span style=&quot;&quot;&gt;&amp;#91;&lt;/span&gt; $correspondances&lt;span style=&quot;&quot;&gt;&amp;#91;&lt;/span&gt;$cle&lt;span style=&quot;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;&quot;&gt;&amp;#93;&lt;/span&gt; = $valeur;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #00b000;&quot;&gt;+ $i&lt;span style=&quot;&quot;&gt;&amp;#91;&lt;/span&gt; $correspondances&lt;span style=&quot;&quot;&gt;&amp;#91;&lt;/span&gt;$cle&lt;span style=&quot;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;&quot;&gt;&amp;#93;&lt;/span&gt; = utf8_encode&lt;span style=&quot;&quot;&gt;&amp;#40;&lt;/span&gt;$valeur&lt;span style=&quot;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/1680134e712699933353ca030f6ebe9b.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Une fois d&#233;sinstall&#233; et r&#233;install&#233; le plugin, on obtient les bons accents (coup de bol !).&lt;/p&gt; &lt;p&gt;&lt;span class='spip_document_327 spip_documents spip_documents_center'&gt;
&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH134/villes-4-6ad4d.png' width='500' height='134' alt=&quot;&quot; /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;On peut donc enlever la limitation &#224; 100 villes, et r&#233;installer le plugin compl&#232;tement.&lt;/p&gt;
&lt;h3 class=&quot;spip&quot;&gt;Perdre le moins de modifications possibles entre chaque recr&#233;ation de notre plugin&lt;/h3&gt;
&lt;p&gt;Au fur et &#224; mesure de ces travaux, je constate qu'il est effectivement emb&#234;tant de devoir remettre les modifications apport&#233;es au plugin apr&#232;s sa cr&#233;ation, &#224; chaque fois qu'on le recr&#233;e avec la Fabrique (comme les fichiers d'import de ville et l'ajout de notre fonction dans $maj).&lt;/p&gt; &lt;p&gt;Apr&#232;s 3 jours de r&#233;flexions, j'opte pour un compromis qui me satisfait pour le moment :&lt;/p&gt;
&lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; &#224; chaque fois que l'on cr&#233;e le plugin, une copie de l'ancien est sauvegard&#233;e et la Fabrique g&#233;n&#232;re un &#171; diff &#187; entre les r&#233;pertoires. Si des fichiers manquent dans le nouveau plugin, une alerte est lev&#233;e et on affiche la liste de ces fichiers absents bien visibles apr&#232;s la cr&#233;ation. Ainsi, si c'est un oubli de les remettre dans le nouveau plugin, on peut les r&#233;cup&#233;rer dans la sauvegarde.&lt;/li&gt;&lt;li&gt; des points d'insertions sont ajout&#233;s o&#249; l'on peut int&#233;grer son propre code, rempli depuis l'interface de cr&#233;ation du plugin. &#201;videmment, il faut que ce code soit valide, la Fabrique ne peut pas le v&#233;rifier !&lt;/li&gt;&lt;li&gt; des points d'ex&#233;cution de scripts sont ajout&#233;s o&#249; l'on peut faire ex&#233;cuter du code (via eval()) que l'on rempli depuis l'interface &#233;galement. Ce code ne sera ex&#233;cut&#233; uniquement si l'on est webmestre (sinon c'est potentiellement tr&#232;s dangereux). Ainsi, on peut, apr&#232;s la cr&#233;ation du plugin, d&#233;placer des fichiers qui &#233;taient pr&#233;sents dans la sauvegarde.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Nous ajoutons donc, dans la partie insertions le code d'insertion des donn&#233;es de la ville, et dans la partie script, la recopie des fichiers allant avec :&lt;br class='autobr' /&gt;
&lt;span class='spip_document_328 spip_documents spip_documents_center'&gt;
&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L451xH142/maj-d5c01.png' width='451' height='142' alt=&quot;&quot; /&gt;&lt;/span&gt;&lt;br class='autobr' /&gt;
&lt;span class='spip_document_329 spip_documents spip_documents_center'&gt;
&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH120/post_creation-fb23c.png' width='500' height='120' alt=&quot;&quot; /&gt;&lt;/span&gt;&lt;br class='autobr' /&gt;
Le code de recopie est donc assez simple :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;pre class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #b1b100;&quot;&gt;foreach&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'base/importer_spip_villes.php'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'base/importer_spip_villes_donnees.gz'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #b1b100;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$f&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;a href=&quot;http://www.php.net/copy&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;copy&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$destination_ancien_plugin&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$f&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$destination_plugin&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$f&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/0751a7c89bf492086196192eb9c7fdbc.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;h3 class=&quot;spip&quot;&gt;Migrer &#224; l'installation les donn&#233;es g&#233;ographique des villes vers le plugin GIS&lt;/h3&gt;
&lt;p&gt;L'ancienne table de villes contient des donn&#233;es g&#233;ographiques que l'on va migrer vers des points du plugin GIS. Chaque ville sera donc li&#233;e &#224; 1 point g&#233;ographique. Il va donc nous falloir modifier le script d'import qui avait &#233;t&#233; automatiquement cr&#233;&#233;, pour g&#233;rer notre sp&#233;cificit&#233;.&lt;/p&gt; &lt;p&gt;Pour s'en sortir et tester, on remet d&#233;j&#224; une liste courte de villes, et non les 37000. En prendre 10 suffira largement. On remet donc le &lt;code class='spip_code' dir='ltr'&gt;array_slice&lt;/code&gt; sur le fichier d'import :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_php cadre&quot; data-clipboard-text=&quot;$valeurs = array_slice($valeurs, 0, 10);&quot;&gt;&lt;pre class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$valeurs&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array_slice&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array_slice&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$valeurs&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Sur le principe, il faudra :&lt;/p&gt;
&lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; cr&#233;er un point g&#233;ographique pour chaque ville (table &lt;code class='spip_code' dir='ltr'&gt;spip_gis&lt;/code&gt;) et r&#233;cup&#233;rer d'identifiant&lt;/li&gt;&lt;li&gt; cr&#233;er la ville et r&#233;cup&#233;rer son identifiant (table &lt;code class='spip_code' dir='ltr'&gt;spip_villes&lt;/code&gt;)&lt;/li&gt;&lt;li&gt; ajouter le lien entre les 2 (table &lt;code class='spip_code' dir='ltr'&gt;spip_gis_liens&lt;/code&gt;)&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Du coup, on ne peut plus utiliser la fonction d'insertions multiples (&lt;code class='spip_code' dir='ltr'&gt;sql_instertq_multi&lt;/code&gt;), puisqu'il va falloir agir ligne par ligne.&lt;/p&gt; &lt;p&gt;Commen&#231;ons pas ajouter le plugin GIS dans les d&#233;pendances du plugin.&lt;br class='autobr' /&gt;
Pour cela, on ajoute dans la Fabrique, &lt;i&gt;paquet &gt; insertions de code &gt; paquet.xml&lt;/i&gt; la ligne :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_xml cadre&quot; data-clipboard-text=&quot;&quot;&gt;&lt;pre class=&quot;xml&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&lt;necessite&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;nom&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;gis&quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;compatibilite&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;[3.2.0;]&quot;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Nous n'avons plus besoin des colonnes &#171; lon &#187; et &#171; lng &#187; de la table &#171; spip_villes &#187; que l'on supprime alors dans la Fabrique. On observe un peu les tables de GIS (dans &lt;code class='spip_code' dir='ltr'&gt;base/gis.php&lt;/code&gt; du plugin GIS). On en d&#233;duit comment doit se r&#233;aliser notre migration. On fait un premier jet de code.&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;pre class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// inserer les donnees en base.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$nb_deja_la&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; sql_countsel&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$table&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// ne pas reimporter ceux deja la (en cas de timeout)&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$inserts&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array_slice&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array_slice&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$inserts&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$nb_deja_la&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #b1b100;&quot;&gt;foreach&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$inserts&lt;/span&gt; &lt;span style=&quot;color: #b1b100;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$i&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// point gis&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$id_gis&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; sql_insertq&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;spip_gis&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'titre'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$i&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'nom_ville_min'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'lat'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$i&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'lat'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'lon'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$i&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'lng'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'ville'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$i&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'nom_ville_min'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'code_postal'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$i&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'zip'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// ville&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;a href=&quot;http://www.php.net/unset&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;unset&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$i&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'lat'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$i&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'lng'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$id_ville&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; sql_insertq&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$table&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$i&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// liaison gis / ville&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; sql_insertq&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;spip_gis_liens&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'id_gis'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$id_gis&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'objet'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'ville'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'id_objet'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$id_ville&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/time&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;time&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;&gt;=&lt;/span&gt; _TIME_OUT&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt; &lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/bb0508d628ba4f0fc99808844c5ff6ac.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;On installe d&#233;sinstalle notre plugin, ainsi que GIS s'il &#233;tait l&#224;, puis le r&#233;installe.&lt;br class='autobr' /&gt;
On va dans la configuration GIS dire qu'on a besoin de GIS sur les villes, mettre un g&#233;n&#233;rateur de carte et une position par d&#233;faut (on fera cela dans une fonction d'installation ensuite pour automatiser), et on se rend sur une ville pour voir.&lt;/p&gt; &lt;p&gt;&lt;span class='spip_document_330 spip_documents spip_documents_center'&gt;
&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH615/ville-f86e8.png' width='500' height='615' alt=&quot;&quot; /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;On voit entre autres que&#8230; la ville fran&#231;aise est plac&#233;e quelque part en Afrique. Quelque chose cloche ! Il faut comparer nos donn&#233;es en base avec la table originale pour savoir si on a bien remis les m&#234;mes valeurs.&lt;/p&gt; &lt;p&gt;Dans la table source, j'ai :&lt;/p&gt;
&lt;table class=&quot;spip&quot;&gt;
&lt;thead&gt;&lt;tr class='row_first'&gt;&lt;th id='idd857_c0'&gt;lng&lt;/th&gt;&lt;th id='idd857_c1'&gt;lat&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class='row_odd odd'&gt;
&lt;td class='numeric point' headers='idd857_c0'&gt;45.979851&lt;/td&gt;
&lt;td class='numeric point' headers='idd857_c1'&gt;5.33689&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Dans la table de GIS, j'ai :&lt;/p&gt;
&lt;table class=&quot;spip&quot;&gt;
&lt;thead&gt;&lt;tr class='row_first'&gt;&lt;th id='id0c87_c0'&gt;lon&lt;/th&gt;&lt;th id='id0c87_c1'&gt;lat&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class='row_odd odd'&gt;
&lt;td class='numeric point' headers='id0c87_c0'&gt;45.979851&lt;/td&gt;
&lt;td class='numeric point' headers='id0c87_c1'&gt;5.33689&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Manifestement, ce sont bien les m&#234;mes donn&#233;es. Le probl&#232;me est ailleurs.&lt;br class='autobr' /&gt;
Je vais donc cr&#233;er un nouveau point dans GIS pour comparer. Au hasard, je prends Grenoble, qui ne semble pas tr&#232;s loin en coordonn&#233;es.&lt;/p&gt; &lt;p&gt;Et l&#224; je lis dans ma table&lt;/p&gt;
&lt;table class=&quot;spip&quot;&gt;
&lt;thead&gt;&lt;tr class='row_first'&gt;&lt;th id='idf36d_c0'&gt;lon&lt;/th&gt;&lt;th id='idf36d_c1'&gt;lat&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class='row_odd odd'&gt;
&lt;td class='numeric point' headers='idf36d_c0'&gt;5.745458496026258&lt;/td&gt;
&lt;td class='numeric point' headers='idf36d_c1'&gt;45.17920020811579&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Soit l'inverse. Ce qui veut dire que les coordonn&#233;es sont invers&#233;es dans la table source ! Magnifique. Plut&#244;t que d'adapter notre script, on inverse les colonnes dans la table source (via phpmyadmin ou sqlite manager selon), et on la r&#233;exporte depuis la Fabrique. On remplace simplement le fichier compress&#233; de donn&#233;es ensuite et on inverse les colonnes dans le tableau $cles du fichier &lt;code class='spip_code' dir='ltr'&gt;importer_spip_villes.php&lt;/code&gt;. On retourne d&#233;sinstaller, r&#233;installer GIS et notre plugin, on reconfigure GIS, puis on va tester une ville. Aussit&#244;t, c'est bien mieux plac&#233;.&lt;/p&gt; &lt;p&gt;&lt;span class='spip_document_331 spip_documents spip_documents_center'&gt;
&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH238/ville-2-564a1.png' width='500' height='238' alt=&quot;&quot; /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 class=&quot;spip&quot;&gt;Configurer GIS au d&#233;marrage de notre plugin&lt;/h3&gt;
&lt;p&gt;Puisque notre plugin ajoute des points sur les villes, autant activer les villes sur GIS d&#232;s l'installation de notre plugin. Pour cela, on g&#233;n&#232;re un tableau de la configuration de GIS (une fois configur&#233;), en &#233;crivant dans un quelconque squelette (disons &lt;code class='spip_code' dir='ltr'&gt;test.html&lt;/code&gt; que l'on appellera ensuite par &lt;code class='spip_code' dir='ltr'&gt;?page=test&lt;/code&gt;) :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;pre class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&lt;?php&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;include_spip&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'inc/config'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;a href=&quot;http://www.php.net/var_export&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;var_export&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;lire_config&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'gis'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;?&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/421dffa4a00b36f34754406bec8594c4.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Ce qui nous donne (ici) :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;pre class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'lat'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'46.50764083069263'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'lon'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'0.32931686417954'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'zoom'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'6'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'geocoder'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;''&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'adresse'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;''&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'geolocaliser_user_html5'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;''&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'api_key_cloudmade'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;''&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'api_key_google'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;''&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'api_key_yandex'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;''&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'gis_objets'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'spip_villes'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;''&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'api'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'openlayers'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'maptype'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'ROAD'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/3f44a3235a8c10cdc440c3b962a327b1.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;On ne garde que les infos que l'on veut proposer :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;pre class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'lat'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'46.50764083069263'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'lon'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'0.32931686417954'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'zoom'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'6'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'gis_objets'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'spip_villes'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'api'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'openlayers'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/97a2800146e96cb4ad504e9e9a10e15a.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;On s'arrangera pour qu'&#224; l'installation, si GIS est d&#233;j&#224; configur&#233;, que l'on n'&#233;crase pas sa configuration, mais que l'on ajoute simplement la ville. On utilisera pour cela la fonction &lt;code class='spip_code' dir='ltr'&gt;array merge&lt;/code&gt; de PHP.&lt;/p&gt; &lt;p&gt;Et on ajoute au code ins&#233;r&#233; par la Fabrique dans l'installation notre modification de la configuration de GIS, en cr&#233;ant une fonction (qui se retrouvera l'int&#233;rieur de la fonction de mise &#224; jour, mais PHP tol&#232;re cela).&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;pre class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;include_spip&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'base/importer_spip_villes'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$maj&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'create'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'importer_spip_villes'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// configurer GIS sans toucher aux valeurs deja configurees si c'est le cas&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; configurer_gis_ville&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #000088;&quot;&gt;$conf&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; lire_config&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'gis'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #000088;&quot;&gt;$conf&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array_merge&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array_merge&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'lat'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'46.50764083069263'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'lon'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'0.32931686417954'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'zoom'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'6'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'gis_objets'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'api'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'openlayers'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$conf&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #000088;&quot;&gt;$conf&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'gis_objets'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array_merge&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array_merge&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$conf&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'gis_objets'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'spip_villes'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	ecrire_config&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'gis'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$conf&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$maj&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'create'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'configurer_gis_ville'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/4b01b23bd1625cf0546e1670b1dfaf76.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;h3 class=&quot;spip&quot;&gt;Am&#233;liorer le chargement des points&lt;/h3&gt;
&lt;p&gt;On peut maintenant am&#233;liorer un peu notre fonction de peuplement en :&lt;/p&gt;
&lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; encapsulant dans une transaction l'ensemble des requ&#234;tes si le moteur le pr&#233;f&#232;re. C'est en fait un hack pas terrible pour SQLite, qui permet de ne pas lui faire g&#233;n&#233;rer de verrous pour chaque requ&#234;te, ce qui lui prend du temps. Du coup, il en g&#233;n&#232;re un pour un groupe de requ&#234;tes coh&#233;rent.&lt;/li&gt;&lt;li&gt; en testant qu'un point GIS identique n'existe pas d&#233;j&#224; avant d'en cr&#233;er un nouveau&lt;/li&gt;&lt;li&gt; en utilisant une fonction interne de SPIP pour les liaisons entre gis et la ville.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Cela donne :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;pre class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; include_spip&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'action/editer_liens'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #b1b100;&quot;&gt;foreach&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$inserts&lt;/span&gt; &lt;span style=&quot;color: #b1b100;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$i&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// eviter des creation / suppression de verrous pour SQLite&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;sql_preferer_transaction&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; sql_demarrer_transaction&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// un point existe deja ?&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;!&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$id_gis&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; sql_getfetsel&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;id_gis&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;spip_gis&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'titre = '&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; sql_quote&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$i&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'nom_ville_min'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'lat = '&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; sql_quote&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$i&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'lat'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'lon = '&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; sql_quote&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$i&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'lng'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// sinon on le cree...&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$id_gis&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; sql_insertq&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;spip_gis&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'titre'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$i&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'nom_ville_min'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'lat'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$i&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'lat'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'lon'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$i&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'lng'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'ville'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$i&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'nom_ville_min'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'code_postal'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$i&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'zip'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// ville&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;a href=&quot;http://www.php.net/unset&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;unset&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$i&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'lat'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$i&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'lng'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$id_ville&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; sql_insertq&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$table&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$i&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// liaison gis / ville&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; objet_associer&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'gis'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$id_gis&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'ville'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$id_ville&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;sql_preferer_transaction&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; sql_terminer_transaction&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/time&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;time&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;&gt;=&lt;/span&gt; _TIME_OUT&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt; &lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/cf2d2eb545c7cec917dbc956a153e43c.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;h3 class=&quot;spip&quot;&gt;Supprimer les informations li&#233;es &#224; GIS &#224; la d&#233;sinstallation de notre plugin&lt;/h3&gt;
&lt;p&gt;Comme on l'a fait pour l'installation, il faut &#233;galement supprimer nos informations &#224; la d&#233;sinstallation :&lt;/p&gt;
&lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; la table &#171; spip_villes &#187; dans la config de GIS&lt;/li&gt;&lt;li&gt; les liaisons &#171; spip_gis_liens &#187; avec les villes&lt;/li&gt;&lt;li&gt; les points GIS qui &#233;taient li&#233;s &#224; une ville mais qui ne sont plus utilis&#233;s.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;On ins&#232;re notre code dans la partie pr&#233;vue par la Fabrique (ins&#233;rer &gt; administrations &gt; vider_table).&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;pre class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// enlever les villes de la configuration de GIS&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$conf&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; lire_config&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'gis'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$conf&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'gis_objets'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array_diff&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array_diff&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$conf&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'gis_objets'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'spip_villes'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;ecrire_config&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'gis'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$conf&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// recuperer tous les points lies a une ville&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$ids_gis&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; sql_allfetsel&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'id_gis'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'spip_gis_liens'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'objet='&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; sql_quote&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'ville'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$ids_gis&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array_map&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array_map&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'array_shift'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$ids_gis&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// supprimer les liaisons avec une ville&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;sql_delete&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'spip_gis_liens'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'objet='&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; sql_quote&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'ville'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// trouver les points encore utilises&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$ids_gis_utilises&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; sql_allfetsel&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'id_gis'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'spip_gis_liens'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; sql_in&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'id_gis'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$ids_gis&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #000088;&quot;&gt;$ids_gis_utilises&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array_map&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array_map&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'array_shift'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$ids_gis_utilises&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// les points a supprimer sont les autres !&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #000088;&quot;&gt;$ids_gis&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array_diff&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array_diff&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$ids_gis&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$ids_gis_utilises&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// on supprime les points GIS non utilises&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;sql_delete&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'spip_gis'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; sql_in&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'id_gis'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$ids_gis&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/93bd391316d22ae03dd2ef8bb54a389f.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;h3 class=&quot;spip&quot;&gt;Fin du premier &#233;pisode&lt;/h3&gt;
&lt;p&gt;Bien, nous avons avec ceci &#224; peu pr&#232;s migr&#233; correctement une table en l'int&#233;grant dans un objet &#233;ditorial g&#233;r&#233; par SPIP. Il y a eu depuis quelques petits changements dans les codes qui n'ont pas lieu d'&#234;tre comment&#233;s ici. Par exemple le script d'importation de donn&#233;es indique le nombre d'&#233;l&#233;ments qui sont ins&#233;r&#233;s s'il doit se relancer en cas de timeout.&lt;/p&gt; &lt;p&gt;Dans &lt;a href=&quot;http://marcimat.magraine.net/Integrer-une-table-existante-dans-361&quot; class='spip_in'&gt;le prochain article&lt;/a&gt; nous allons ajouter &#224; notre plugin un autre objet avec d'autres contraintes.&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>Chats 2 - SPIP 3</title>
		<link>http://marcimat.magraine.net/Chats-2-SPIP-3</link>
		<guid isPermaLink="true">http://marcimat.magraine.net/Chats-2-SPIP-3</guid>
		<dc:date>2011-09-01T18:36:26Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>Matthieu Marcillaud</dc:creator>



		<description>
&lt;p&gt;Il y a presque deux ans, j'&#233;crivais l'article Cr&#233;er un nouvel objet &#233;ditorial en mettant des f&#233;lins dans l'interface priv&#233;e. Le d&#233;veloppement de SPIP 3.0 (en alpha2 actuellement) fait des prouesses extraordinaires pour tout ce qui est la cr&#233;ation et l'utilisation de nouveaux objets &#233;ditoriaux. Je propose ici de d&#233;crire la cr&#233;ation d'une version 2.0 du plugin d'exemple Chats, en partant de rien.&lt;br class='autobr' /&gt;
SPIP 3.0 alpha 2&lt;br class='autobr' /&gt;
C'est le nom de la version en cours de d&#233;veloppement et qui externalise un certain nombre de (...)&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;Il y a presque deux ans, j'&#233;crivais l'article &lt;a href=&quot;http://marcimat.magraine.net/Creer-un-nouvel-objet-editorial&quot; class='spip_in'&gt;Cr&#233;er un nouvel objet &#233;ditorial&lt;/a&gt; en mettant des f&#233;lins dans l'interface priv&#233;e. Le d&#233;veloppement de SPIP 3.0 (en alpha2 actuellement) fait des prouesses extraordinaires pour tout ce qui est la cr&#233;ation et l'utilisation de nouveaux objets &#233;ditoriaux. Je propose ici de d&#233;crire la cr&#233;ation d'une version 2.0 du plugin d'exemple Chats, en partant de rien.&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;h3 class=&quot;spip&quot;&gt;SPIP 3.0 alpha 2&lt;/h3&gt;
&lt;p&gt;C'est le nom de la version en cours de d&#233;veloppement et qui externalise un certain nombre de fonctionnalit&#233;s de SPIP, tout en rendant g&#233;n&#233;rique un grand nombre de processus habituels (C&#233;dric a effectu&#233; l&#224; de biens beaux travaux !). Cette version se voit dot&#233;e d'un espace priv&#233; enti&#232;rement en squelettes (et donc facilement surchargeable), d&#233;coup&#233; en Z, tout en normalisant le code HTML sous-jacent qui en avait besoin. Certaines fonctions anciennement en plugin ont &#233;t&#233; int&#233;gr&#233;es : &lt;a href=&quot;http://www.spip-contrib.net/Les-Iterateurs-pour-SPIP-2-1&quot; class='spip_out' rel='external'&gt;les it&#233;rateurs&lt;/a&gt;, une partie de &lt;a href=&quot;http://www.spip-contrib.net/CFG-dans-spip-core&quot; class='spip_out' rel='external'&gt;CFG&lt;/a&gt;, une partie de &lt;a href=&quot;http://www.spip-contrib.net/SPIP-Bonux&quot; class='spip_out' rel='external'&gt;Bonux&lt;/a&gt;, &lt;a href=&quot;http://www.spip-contrib.net/Presentation-de-TextWheel&quot; class='spip_out' rel='external'&gt;Textwheel&lt;/a&gt;, &lt;a href=&quot;http://plugins.spip.net/Job-Queue&quot; class='spip_out' rel='external'&gt;Job Queue&lt;/a&gt;, et d'autres ont atterri en tant qu'extension par d&#233;faut de la distribution SPIP comme &lt;a href=&quot;http://www.spip-contrib.net/Mediatheque&quot; class='spip_out' rel='external'&gt;la m&#233;diath&#232;que&lt;/a&gt; ou le plugin de &lt;a href=&quot;http://www.spip-contrib.net/MediaBox&quot; class='spip_out' rel='external'&gt;boites modales (mediabox)&lt;/a&gt;. La liste est longue des nouveaut&#233;s et comme c'est encore loin d'&#234;tre finalis&#233; nous nous attarderons juste sur ce qui nous int&#233;resse pour notre nouvel objet &#233;ditorial.&lt;/p&gt; &lt;p&gt;Il faut noter tout de m&#234;me que dans cette nouvelle version, on peut d&#233;clarer, comme on le faisait pour d&#233;clarer des tables SQL &#224; SPIP un nouvel objet &#233;ditorial. Ceci fait, la simple pr&#233;sence d'un champ &#171; id_rubrique &#187; permet de ranger l'objet dans une rubrique. La simple pr&#233;sence de &#171; lang &#187; permet de g&#233;rer des langues... la simple pr&#233;sence de &#171; id_trad &#187; permet de g&#233;rer les traductions... la simple d&#233;claration de l'objet permet d'y lier des mots, des documents, des forums, de g&#233;rer les r&#233;visions de l'objet, d&#233;clarer des statuts permet d'afficher l'encart de changement de statut, d'acc&#233;der aux pr&#233;visualisations, ... Enfin presque !&lt;/p&gt; &lt;p&gt;Voil&#224;... SPIP 3, c'est &#231;a... mais c'est aussi que... on peut pratiquement ne rien &#233;crire, SPIP est capable de g&#233;n&#233;rer &#224; la vol&#233;e une partie des pages n&#233;cessaires &#224; l'affichage de l'objet si elles n'existent pas dans le plugin (ou en tant que surcharge ailleurs).&lt;/p&gt; &lt;p&gt;En fait, &#224; l'heure ou j'&#233;cris, il faut tout de m&#234;me &#233;crire le code HTML du formulaire, et son code PHP. Mais vous allez voir que c'est impressionnant !&lt;/p&gt;
&lt;h3 class=&quot;spip&quot;&gt;D&#233;buter le plugin&lt;/h3&gt;
&lt;p&gt;Cr&#233;ons un plugin &#171; chats &#187; dans notre dossier plugins/ avec les fichiers :&lt;/p&gt;
&lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; &lt;code class='spip_code' dir='ltr'&gt;paquet.xml&lt;/code&gt;&lt;/li&gt;&lt;li&gt; &lt;code class='spip_code' dir='ltr'&gt;prive/themes/spip/images/chat-24.png&lt;/code&gt; de m&#234;me que &lt;code class='spip_code' dir='ltr'&gt;-48&lt;/code&gt;, &lt;code class='spip_code' dir='ltr'&gt;-128&lt;/code&gt; et &lt;code class='spip_code' dir='ltr'&gt;-16&lt;/code&gt;&lt;/li&gt;&lt;li&gt; &lt;code class='spip_code' dir='ltr'&gt;base/chats.php&lt;/code&gt;&lt;/li&gt;&lt;li&gt; &lt;code class='spip_code' dir='ltr'&gt;chats_administrations.php&lt;/code&gt;&lt;/li&gt;&lt;li&gt; &lt;code class='spip_code' dir='ltr'&gt;lang/chat_fr.php&lt;/code&gt;&lt;/li&gt;&lt;li&gt; &lt;code class='spip_code' dir='ltr'&gt;lang/paquet-chats_fr.php&lt;/code&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Nous allons les remplir au fur et &#224; mesure. Tout d'abord, le &lt;code class='spip_code' dir='ltr'&gt;paquet.xml&lt;/code&gt;.&lt;/p&gt;
&lt;h3 class=&quot;spip&quot;&gt;paquet.xml&lt;/h3&gt;
&lt;p&gt;Comme on le remarque, la d&#233;claration se fait maintenant avec un fichier nomm&#233; &#171; paquet.xml &#187; en lieu et place de &#171; plugin.xml &#187; (ce dernier est toujours compris par SPIP 3.0 alpha 2). &#171; paquet.xml &#187; a une &#233;criture &lt;a href=&quot;http://blog.smellup.net/spip.php?article37&quot; class='spip_out' rel='external'&gt;plus coh&#233;rente et concise&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;Peu de choses ont chang&#233; dans les pipelines &#224; l'exception notable, d'un nouveau pipeline pour d&#233;clarer l'objet (et sa table SQL). Il se nomme &#171; declarer_tables_objets_sql &#187;.&lt;/p&gt; &lt;p&gt;Enfin, une partie des descriptions du plugin (slogan, descriptif et &#233;ventuellement le nom) passent dans les cha&#238;nes de langue (lang/paquet-chats_fr.php), et peuvent ainsi &#234;tre traduits.&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_xml cadre&quot;&gt;&lt;pre class=&quot;xml&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&lt;paquet&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;	&lt;span style=&quot;color: #000066;&quot;&gt;prefix&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;chats&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;	&lt;span style=&quot;color: #000066;&quot;&gt;categorie&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;edition&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;	&lt;span style=&quot;color: #000066;&quot;&gt;version&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;2.0.0&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;	&lt;span style=&quot;color: #000066;&quot;&gt;etat&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;stable&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;	&lt;span style=&quot;color: #000066;&quot;&gt;compatibilite&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;[3.0.0-alpha2;[&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;	&lt;span style=&quot;color: #000066;&quot;&gt;logo&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;prive/themes/spip/images/chat-128.png&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;	&lt;span style=&quot;color: #000066;&quot;&gt;schema&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;1.0.0&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;	&lt;span style=&quot;color: #000066;&quot;&gt;documentation&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;http://marcimat.magraine.net/?article356&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;	&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&lt;nom&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Chats (Plugin d'exemple)&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&lt;/nom&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;&lt;!-- Gestion des chats dans SPIP --&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&lt;auteur&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;lien&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;http://magraine.net/&quot;&lt;/span&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;Matthieu Marcillaud&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&lt;/auteur&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&lt;licence&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;GNU/GPL&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&lt;/licence&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&lt;credit&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;lien&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;http://www.yootheme.com/icons&quot;&lt;/span&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;Logo de YOOtheme&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&lt;/credit&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&lt;pipeline&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;nom&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;declarer_tables_objets_sql&quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;inclure&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;base/chats.php&quot;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;&lt;!-- facilitons les champs de formulaires --&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&lt;necessite&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;nom&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;saisies&quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;compatibilite&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;[1.14.0;]&quot;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&lt;/paquet&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/7b38d2e1501bfdbc6c5ed0d72ff4dd20.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Nous retrouvons&lt;/p&gt;
&lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; le nom, l'auteur, la version&lt;/li&gt;&lt;li&gt; l'&#233;tat (stable, test, dev)&lt;/li&gt;&lt;li&gt; le pr&#233;fixe&lt;/li&gt;&lt;li&gt; la version de la structure des tables SQL du plugin se nomme maintenant &#171; sch&#233;ma &#187;&lt;/li&gt;&lt;/ul&gt;&lt;h3 class=&quot;spip&quot;&gt;chats_administrations.php&lt;/h3&gt;
&lt;p&gt;Le fichier d'installation, simple. Il peut changer (par rapport &#224; SPIP 2.1) car on peut maintenant dans les mises &#224; jour d'un plugin utiliser la m&#234;me proc&#233;dure que celle de SPIP Core pour les d&#233;clarer. Ainsi, une fonction &#171; maj_plugin &#187; permet de passer : la version actuelle, la version future, et un tableau de la liste des actions &#224; faire. Contentons nous de la cr&#233;ation et de la suppression du plugin :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;pre class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; chats_upgrade&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$nom_meta_base_version&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$version_cible&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #000088;&quot;&gt;$maj&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #000088;&quot;&gt;$maj&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'create'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'maj_tables'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'spip_chats'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	include_spip&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'base/upgrade'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	maj_plugin&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$nom_meta_base_version&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$version_cible&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$maj&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; chats_vider_tables&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$nom_meta_base_version&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	sql_drop_table&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;spip_chats&quot;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	effacer_meta&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$nom_meta_base_version&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/13cefe65ceca28cb904301dc4fc1a632.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Dans la variable &lt;code class='spip_code' dir='ltr'&gt;$maj&lt;/code&gt; la cl&#233; &#171; create &#187; est appliqu&#233;e &#224; la premi&#232;re installation du plugin, et contient un tableau listant les fonctions &#224; appeler avec leurs param&#232;tres. Ici, on appelera donc l'&#233;quivalent de : &lt;code class='spip_code' dir='ltr'&gt;maj_tables('spip_chats');&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;Pour une mise &#224; jour, on utilise par exemple &lt;code class='spip_code' dir='ltr'&gt;$maj['num&#233;ro'] = array(...)&lt;/code&gt; tel que &lt;code class='spip_code' dir='ltr'&gt;$maj['1.1.0'] = ...&lt;/code&gt;. Nous le verrons plus loin.&lt;/p&gt;
&lt;h3 class=&quot;spip&quot;&gt;base/chats.php&lt;/h3&gt;
&lt;p&gt;Le fichier de d&#233;claration comporte les fonctions appel&#233;es par le pipeline &#171; declarer_tables_objets_sql &#187;. Voyons cela :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;pre class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; chats_declarer_tables_objets_sql&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$tables&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #000088;&quot;&gt;$tables&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'spip_chats'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'principale'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;oui&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'field'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;id_chat&quot;&lt;/span&gt;	&lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;bigint(21) NOT NULL&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;nom&quot;&lt;/span&gt;	&lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;tinytext DEFAULT '' NOT NULL&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;race&quot;&lt;/span&gt;	&lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;tinytext DEFAULT '' NOT NULL&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;date&quot;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;datetime DEFAULT '0000-00-00 00:00:00' NOT NULL&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;date_naissance&quot;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;datetime DEFAULT '0000-00-00 00:00:00' NOT NULL&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;robe&quot;&lt;/span&gt;	&lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;tinytext DEFAULT '' NOT NULL&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;infos&quot;&lt;/span&gt;	&lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;text DEFAULT '' NOT NULL&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;maj&quot;&lt;/span&gt;	&lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;TIMESTAMP&quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'key'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;PRIMARY KEY&quot;&lt;/span&gt;	&lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;id_chat&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'titre'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;nom AS titre, '' AS lang&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'date'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;date&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$tables&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/4b391aefeaa6c399fd82aa72c5d665d9.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Ce tableau de la table peut prendre de nombreux autres attributs. Ils sont optionnels et compl&#233;t&#233;s automatiquement par SPIP en absence de leur d&#233;claration pour certains. Nous en verrons quelques-uns par la suite.&lt;/p&gt; &lt;p&gt;Nous remarquons les d&#233;clarations 'field' et 'key' qui n'ont pas chang&#233;, pr&#233;sentant le nom des champs et leur description SQL pour 'field', de m&#234;me que le type de cl&#233; et le ou les champs d'application pour 'key'.&lt;/p&gt; &lt;p&gt;La cl&#233; &quot;principale&quot; indique que la table est une table qui s'auto-incr&#233;mente. Les cl&#233;s &quot;titre&quot; et &quot;date&quot; (d&#233;clar&#233;es avant dans le pipeline declarer_tables_interfaces) indiquent respectivement les colonnes servant au calculs des titres d'URLs, et aux calculs de date (si besoin).&lt;/p&gt;
&lt;h3 class=&quot;spip&quot;&gt;lang/paquet-chats.php&lt;/h3&gt;
&lt;p&gt;Mettons un peu de texte sur la signification du plugin dans le fichier &lt;code class='spip_code' dir='ltr'&gt;lang/paquet-chats.php&lt;/code&gt; , tel que :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;pre class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/defined&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;defined&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'_ECRIRE_INC_VERSION'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$GLOBALS&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$GLOBALS&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'idx_lang'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #0000ff;&quot;&gt;'chats_nom'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;Chats&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #0000ff;&quot;&gt;'chats_slogan'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;Plugin d'apprentissage&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #0000ff;&quot;&gt;'chats_description'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;Cr&#233;e un nouvel objet &#233;ditorial de fa&#231;on simple,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt; donnant un exemple de code pour les d&#233;veloppeurs.&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/ac760ddc575910ac269f23f4819bfc51.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Ces descriptions pourront ainsi &#234;tre traduites. Remarque : &lt;code class='spip_code' dir='ltr'&gt;chats_nom&lt;/code&gt; n'est pas encore pris en compte &#224; l'heure de l'&#233;criture de ces lignes, mais c'est pr&#233;vu.&lt;/p&gt;
&lt;h3 class=&quot;spip&quot;&gt;Premier test&lt;/h3&gt;
&lt;p&gt;&#192; partir de maintenant, le plugin doit pouvoir s'activer et s'installer. Il est pr&#233;sent dans la liste des plugins.&lt;/p&gt;
&lt;dl class='spip_document_286 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH179/chats_sur_plugins-e6419.png' width='500' height='179' alt='PNG - 26.2&#160;ko' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-286 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Affichage du plugin dans la liste des plugins&lt;/strong&gt;&lt;/dt&gt;
&lt;dd class='crayon document-descriptif-286 spip_doc_descriptif' style='width:350px;'&gt;En cas d'erreurs dans le fichier &lt;code class='spip_code' dir='ltr'&gt;paquet.xml&lt;/code&gt;, celles-ci seraient affich&#233;es de fa&#231;on pr&#233;cise.
&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;Une fois coch&#233;, et la configuration enregistr&#233;e, l'activation indique l'&#233;tat de l'installation. Ici, le plugin installe la version 1.0 de sa structure SQL.&lt;/p&gt;
&lt;dl class='spip_document_287 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH246/chats_activation-50f6d.png' width='500' height='246' alt='PNG - 21.2&#160;ko' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-287 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Activation du plugin chats&lt;/strong&gt;&lt;/dt&gt;
&lt;dd class='crayon document-descriptif-287 spip_doc_descriptif' style='width:350px;'&gt;La version 1.0.0 du plugin chats est install&#233;e.
&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;On peut alors aller sur l'URL priv&#233;e &lt;code class='spip_code' dir='ltr'&gt;?exec=chats&lt;/code&gt; qui affiche en clignotant (pour l'instant) cela :&lt;/p&gt;
&lt;dl class='spip_document_288 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH234/chat-titre_chats-7ea8b.png' width='500' height='234' alt='PNG - 41.5&#160;ko' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-288 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Liste des chats...&lt;/strong&gt;&lt;/dt&gt;
&lt;dd class='crayon document-descriptif-288 spip_doc_descriptif' style='width:350px;'&gt;Les cha&#238;nes de langues absentes sont affich&#233;es en rouge
&lt;/dd&gt;
&lt;/dl&gt;&lt;h3 class=&quot;spip&quot;&gt;Ajout d'un bouton d'acc&#232;s et des cha&#238;nes manquantes&lt;/h3&gt;
&lt;p&gt;Pour pourvoir acc&#233;der &#224; la page &lt;code class='spip_code' dir='ltr'&gt;?exec=chats&lt;/code&gt; facilement, nous allons cr&#233;er un bouton dans le menu, depuis la d&#233;claration de &lt;code class='spip_code' dir='ltr'&gt;paquet.xml&lt;/code&gt;. On en profitera pour ajouter dans la foul&#233;e un bouton d'ajout rapide d'un chat. Ces 2 lignes sont donc ajout&#233;es &#224; &lt;code class='spip_code' dir='ltr'&gt;paquet.xml&lt;/code&gt; :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_xml cadre&quot;&gt;&lt;pre class=&quot;xml&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&lt;menu&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;nom&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;chats&quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;titre&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;chat:titre_chats&quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;parent&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;menu_edition&quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;icone&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;images/chat-16.png&quot;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&lt;menu&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;nom&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;chat_creer&quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;titre&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;chat:icone_creer_chat&quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;parent&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;outils_rapides&quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;icone&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;images/chat-new-16.png&quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;action&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;chat_edit&quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;parametres&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;new=oui&quot;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/a22d2c8fd474e91e9b9b26c6340b8d1c.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Il faudra ajouter une image &#171; chat-new-16.png &#187; qui est la m&#234;me que &#171; chats-16.png &#187;, avec un + de dessin&#233;. Cette image (pour faciliter la cr&#233;ation) se trouve dans SPIP dans &lt;code class='spip_code' dir='ltr'&gt;prive/themes/images/add-16.png&lt;/code&gt;&lt;/p&gt; &lt;p&gt;Nous pouvons ensuite ajouter quelques cha&#238;nes de langue dans le fichier &lt;code class='spip_code' dir='ltr'&gt;lang/chat_fr.php&lt;/code&gt;. Attention dans le nom du fichier : ici, c'est l'objet d&#233;sir&#233; au singulier, alors que pour le fichier de langue du paquet, c'est le pr&#233;fixe du plugin qui est utilis&#233;.&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;pre class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$GLOBALS&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$GLOBALS&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'idx_lang'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// I&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #0000ff;&quot;&gt;'icone_creer_chat'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;Cr&#233;er un chat&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #0000ff;&quot;&gt;'info_aucun_chat'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;Aucun chat&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// T&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #0000ff;&quot;&gt;'titre_chats'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;Chats&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/bc4fabb146dcd21c740636bd19ba0aae.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Aussit&#244;t, on peut voir (en repassant sur la page d'administration des plugins pour mettre &#224; jour les informations du paquet) les ic&#244;nes et le texte :&lt;/p&gt;
&lt;dl class='spip_document_289 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH217/chats-7435b.png' width='500' height='217' alt='PNG - 41.5&#160;ko' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-289 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Icone de chat rapide, et cha&#238;nes de langues pr&#233;sentes&lt;/strong&gt;&lt;/dt&gt;
&lt;/dl&gt;
&lt;p&gt;Voil&#224; qui est maintenant plus clair. On comprend que SPIP g&#233;n&#232;re automatiquement cette page, car nous n'avons cr&#233;&#233; encore aucun squelette pour afficher quoi que ce soit. Cela pourrait &#234;tre fait, mais nous allons essayer le lui faire faire le maximum de chose sans rien toucher.&lt;/p&gt;
&lt;h3 class=&quot;spip&quot;&gt;Cr&#233;er un chat&lt;/h3&gt;
&lt;p&gt;En cliquant le bouton de cr&#233;ation d'un chat, on voit qu'il manque des choses :&lt;br class='autobr' /&gt;
une cha&#238;ne de langue... et un formulaire !&lt;/p&gt;
&lt;dl class='spip_document_290 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH209/creer_chat_1-b279a.png' width='500' height='209' alt='PNG - 42.3&#160;ko' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-290 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;&#201;dition d'un chat.&lt;/strong&gt;&lt;/dt&gt;
&lt;dd class='crayon document-descriptif-290 spip_doc_descriptif' style='width:350px;'&gt;Il manque le formulaire !
&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;La cha&#238;ne de langue va dans &lt;code class='spip_code' dir='ltr'&gt;lang/chat.php&lt;/code&gt; en ajoutant&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_php cadre&quot; data-clipboard-text=&quot;&#039;icone_modifier_chat&#039; =&gt; &quot;Modifier ce chat&quot;,&quot;&gt;&lt;pre class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'icone_modifier_chat'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;Modifier ce chat&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Par la suite, et pour simplifier, je ne parlerai plus de l'ajout des cha&#238;nes de langue dans ce fichier. Vous saurez faire de toutes fa&#231;ons :)&lt;/p&gt; &lt;p&gt;Pour le formulaire, il va falloir un peu plus de travail, en cr&#233;ant les fichiers :&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; et&lt;/li&gt;&lt;li&gt; &lt;code class='spip_code' dir='ltr'&gt;formulaires/editer_chat.php&lt;/code&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Le fichier HTML est semblable &#224; SPIP 2.1 et utilise ici le plugin &#171; saisies &#187; :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;pre class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;div class='formulaire_spip formulaire_editer formulaire_&lt;span style=&quot;color: #D05000;&quot;&gt;#FORM&lt;/span&gt; formulaire_&lt;span style=&quot;color: #D05000;&quot;&gt;#FORM&lt;/span&gt;-&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{id_chat,nouveau}&lt;/span&gt;'&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;p class=&quot;reponse_formulaire reponse_formulaire_ok&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #FF4E00;&quot;&gt;**&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{message_ok}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;/p&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;p class=&quot;reponse_formulaire reponse_formulaire_erreur&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #FF4E00;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{message_erreur}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;/p&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	[(&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{editable}&lt;/span&gt;)&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;form method='post' action='&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{action}&lt;/span&gt;'&gt;&lt;div&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #D05000;&quot;&gt;#ACTION_FORMULAIRE&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;{action}}&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;input type='hidden' name='id_chat' value='&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{id_chat}&lt;/span&gt;' /&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;ul&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#SAISIE&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{input, nom, label=&lt;span style=&quot;color: #C90&quot;&gt;&lt;:chat:label_nom:&gt;&lt;/span&gt;}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#SAISIE&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{input, race, label=&lt;span style=&quot;color: #C90&quot;&gt;&lt;:chat:label_race:&gt;&lt;/span&gt;}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#SAISIE&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{input, robe, label=&lt;span style=&quot;color: #C90&quot;&gt;&lt;:chat:label_robe:&gt;&lt;/span&gt;}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#SAISIE&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{textarea, infos, label=&lt;span style=&quot;color: #C90&quot;&gt;&lt;:chat:label_infos:&gt;&lt;/span&gt;}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/ul&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#REM&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt; ajouter les saisies supplementaires : extra et autre, a cet endroit &lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;&lt;!--extra--&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;p class=&quot;boutons&quot;&gt;&lt;input type='submit' class='submit' value='&lt;span style=&quot;color: #C90&quot;&gt;&lt;:bouton_enregistrer:&gt;&lt;/span&gt;' /&gt;&lt;/p&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;/div&gt;&lt;/form&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	]&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/b3d601da44dbcae3c698697613a386ad.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Le fichier PHP appelle des fonctions g&#233;n&#233;riques de traitement des objets :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;pre class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/defined&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;defined&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;_ECRIRE_INC_VERSION&quot;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;include_spip&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'inc/actions'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;include_spip&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'inc/editer'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; formulaires_editer_chat_charger_dist&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$id_chat&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'new'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$id_rubrique&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$retour&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;''&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$lier_trad&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$config_fonc&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;''&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$row&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$hidden&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;''&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #000088;&quot;&gt;$valeurs&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; formulaires_editer_objet_charger&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'chat'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$id_chat&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$id_rubrique&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$lier_trad&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$retour&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$config_fonc&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$row&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$hidden&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$valeurs&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009933; font-style: italic;&quot;&gt;/**&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009933; font-style: italic;&quot;&gt; * Identifier le formulaire en faisant abstraction des parametres qui ne representent pas l'objet edite&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009933; font-style: italic;&quot;&gt; */&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; formulaires_editer_chat_identifier_dist&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$id_chat&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'new'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$id_rubrique&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$retour&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;''&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$lier_trad&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$config_fonc&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;''&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$row&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$hidden&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;''&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; &lt;a href=&quot;http://www.php.net/serialize&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;serialize&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/intval&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;intval&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$id_chat&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; formulaires_editer_chat_verifier_dist&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$id_chat&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'new'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$id_rubrique&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$retour&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;''&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$lier_trad&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$config_fonc&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;''&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$row&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$hidden&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;''&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; formulaires_editer_objet_verifier&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'chat'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$id_chat&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; formulaires_editer_chat_traiter_dist&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$id_chat&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'new'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$id_rubrique&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$retour&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;''&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$lier_trad&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$config_fonc&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;''&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$row&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$hidden&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;''&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; formulaires_editer_objet_traiter&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'chat'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$id_chat&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$id_rubrique&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$lier_trad&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$retour&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$config_fonc&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$row&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$hidden&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/56b7cdd9980999026d8a846418090b0f.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Enfin, dans la d&#233;claration de l'objet (base/chats.php), il faut indiquer &#224; SPIP les champs qu'il a le droit de modifier en ajoutant la cl&#233; :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;pre class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'champs_editables'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;nom&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;race&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;robe&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;infos&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;date_naissance&quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/b9d9fef7453d927cb674a69d25a7908c.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Avec quelques cha&#238;nes de langues en plus, voici ce que l'on obtient : le formulaire est visible et fonctionne (cependant il ne r&#233;affiche pas les textes saisis apr&#232;s une cr&#233;ation).&lt;/p&gt;
&lt;dl class='spip_document_291 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH613/creer_chat2-7c9d9.png' width='500' height='613' alt='PNG - 16.4&#160;ko' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-291 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Formulaire de modification du chat&lt;/strong&gt;&lt;/dt&gt;
&lt;/dl&gt;
&lt;p&gt;La liste des chats liste les cr&#233;ations.&lt;/p&gt;
&lt;dl class='spip_document_292 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH237/chats-2-da8f9.png' width='500' height='237' alt='PNG - 35.6&#160;ko' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-292 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Liste des chats&lt;/strong&gt;&lt;/dt&gt;
&lt;/dl&gt;
&lt;p&gt;Enfin, la vue d'un chat permet de changer la date de publication et de mettre un logo. Elle n'affiche pas automatiquement autre chose que le titre.&lt;/p&gt;
&lt;dl class='spip_document_293 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH323/chat_efia-b813e.png' width='500' height='323' alt='PNG - 60.2&#160;ko' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-293 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Vue d'un chat&lt;/strong&gt;&lt;/dt&gt;
&lt;/dl&gt;&lt;h3 class=&quot;spip&quot;&gt;Lier des documents et des mots cl&#233;s&lt;/h3&gt;
&lt;p&gt;Pour lier des documents au chat il suffit de cocher les &#171; Chats &#187; dans la configuration des documents sur &lt;code class='spip_code' dir='ltr'&gt;?exec=configurer_contenu&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;Pour lier des mots cl&#233;s, il suffit de cr&#233;er un groupe de mot permettant la liaison avec des chats.&lt;/p&gt;
&lt;dl class='spip_document_294 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH393/chat_efia2-e2d79.png' width='500' height='393' alt='PNG - 74.1&#160;ko' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-294 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Mots cl&#233;s, document et logo&lt;/strong&gt;&lt;/dt&gt;
&lt;/dl&gt;&lt;h3 class=&quot;spip&quot;&gt;Versionner les modifications des chats&lt;/h3&gt;
&lt;p&gt;Pour pouvoir revenir sur des modifications effectu&#233;es sur le contenu de la table chats, il faut indiquer quels champs sont versionnables, puis activer les &#171; r&#233;visions &#187; sur l'objet Chats (?exec=configurer_revisions). On ajoute donc, dans la d&#233;claration de notre objet &#233;ditorial :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;pre class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'champs_versionnes'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;nom&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;race&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;robe&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;infos&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;date_naissance&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/303093f09ade3319b62bb47cf06a6a90.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Sur l'accueil, on peut ainsi suivre les modifications faites, puis revenir dessus &#233;ventuellement depuis la page des r&#233;visions :&lt;/p&gt;
&lt;dl class='spip_document_296 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH134/accueil_revisions-c366c.png' width='500' height='134' alt='PNG - 9.8&#160;ko' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-296 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;R&#233;visions sur l'accueil&lt;/strong&gt;&lt;/dt&gt;
&lt;/dl&gt;&lt;dl class='spip_document_295 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH306/revisions_-_-1a795.png' width='500' height='306' alt='PNG - 64.9&#160;ko' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-295 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;R&#233;vision d'un chat&lt;/strong&gt;&lt;/dt&gt;
&lt;/dl&gt;&lt;h3 class=&quot;spip&quot;&gt;Lier les chats aux rubriques&lt;/h3&gt;
&lt;p&gt;Pour pouvoir lier un chat &#224; une, et une seule rubrique, il suffit de cr&#233;er un champ &#171; id_rubrique &#187; dans la table &lt;code class='spip_code' dir='ltr'&gt;spip_chats&lt;/code&gt; et d'ajouter un s&#233;lecteur de rubrique dans le formulaire d'&#233;dition.&lt;/p&gt; &lt;p&gt;D&#233;clarons le dans &lt;code class='spip_code' dir='ltr'&gt;base/chats.php&lt;/code&gt;, avec les autres champs :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;pre class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'field'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;id_chat&quot;&lt;/span&gt;	&lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;bigint(21) NOT NULL&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;id_rubrique&quot;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;bigint(21) NOT NULL DEFAULT 0&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #339933;&quot;&gt;...&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/2a4a98c7bdf486fc524caac84a2b29f7.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Cr&#233;ons la mise &#224; jour dans &lt;code class='spip_code' dir='ltr'&gt;chats_administrations.php&lt;/code&gt; en ajoutant la version 1.1.0, qui ajoute le champs id_rubrique et un index dessus :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;pre class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$maj&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'1.1.0'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'maj_tables'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'spip_chats'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'sql_alter'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;TABLE spip_chats ADD INDEX id_rubrique(id_rubrique)&quot;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/903d8fec5c0a3c08c05530d49601368f.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Changeons le sch&#233;ma dans paquet.xml pour refl&#233;ter la mise &#224; jour :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_xml cadre&quot; data-clipboard-text=&quot; schema=&quot;1.1.0&quot;&quot;&gt;&lt;pre class=&quot;xml&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	schema=&quot;1.1.0&quot;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Enfin, ajoutons un s&#233;lecteur de rubrique sur le formulaire d'&#233;dition (repris de celui sur le formulaire d'&#233;dition d'un article) :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;pre class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;li class=&quot;editer editer_rubrique&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt; &lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #FF4E00;&quot;&gt;**&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{erreurs}&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|table_valeur&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{id_parent}&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|oui&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;erreur&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&quot;&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;label for=&quot;id_parent&quot;&gt;&lt;span style=&quot;color: #C90&quot;&gt;&lt;:titre_cadre_interieur_rubrique:&gt;&lt;/span&gt;&lt;/label&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span class='erreur_message'&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #FF4E00;&quot;&gt;**&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{erreurs}&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|table_valeur&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{id_parent}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#VAL&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|chercher_rubrique&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;{id_chat},&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;{id_parent},'chat',&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;{id_secteur},'',0,form_simple}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;/li&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/780da0c1a02fe7542d83686194d73e90.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Et regardons maintenant :&lt;/p&gt;
&lt;dl class='spip_document_297 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH291/edition_rubrique-2a155.png' width='500' height='291' alt='PNG - 15.6&#160;ko' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-297 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Choix d'une rubrique&lt;/strong&gt;&lt;/dt&gt;
&lt;/dl&gt;&lt;h3 class=&quot;spip&quot;&gt;Afficher les chats sur les rubriques&lt;/h3&gt;
&lt;p&gt;Pour aller plus loin, on va vite souhaiter pouvoir cr&#233;er et voir des chats depuis les rubriques. Pour cela, il va nous falloir d'une part se brancher sur le pipeline &#171; affiche_enfants &#187;, et d'autre part cr&#233;er un premier squelette de liste de chats, permettant de trier les chats, mais surtout de filtrer par rubrique la liste.&lt;/p&gt; &lt;p&gt;Ajoutons l'utilisation du pipeline dans &lt;code class='spip_code' dir='ltr'&gt;paquets.xml&lt;/code&gt; :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_xml cadre&quot; data-clipboard-text=&quot;&quot;&gt;&lt;pre class=&quot;xml&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&lt;pipeline&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;nom&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;affiche_enfants&quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;inclure&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;chats_pipelines.php&quot;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Ajoutons dans le pipeline, l'appel &#224; notre future nouvelle liste d'&#233;l&#233;ments, ainsi que le bouton pour ajouter de nouveaux chats si l'on peut. Avec la fonction &lt;code class='spip_code' dir='ltr'&gt;trouver_objet_exec()&lt;/code&gt; qui retourne des informations utiles sur la page en cours de lecture dans l'espace priv&#233;, on peut filtrer l'affichage sur le type d'objet, et le fait qu'il soit ou non en &#233;dition.&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;pre class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; chats_affiche_enfants&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$flux&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$e&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; trouver_objet_exec&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$flux&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'args'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'exec'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; AND &lt;span style=&quot;color: #000088;&quot;&gt;$e&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'type'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'rubrique'&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; AND &lt;span style=&quot;color: #000088;&quot;&gt;$e&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'edition'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #009900; font-weight: bold;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$id_rubrique&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$flux&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'args'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'id_rubrique'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$bouton&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;''&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;autoriser&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'creerchatdans'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'rubrique'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$id_rubrique&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$bouton&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;.=&lt;/span&gt; icone_verticale&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;_T&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'chat:icone_creer_chat'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; generer_url_ecrire&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'chat_edit'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;id_rubrique=&lt;span style=&quot;color: #006699; font-weight: bold;&quot;&gt;$id_rubrique&lt;/span&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;chat-24.png&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;new&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'right'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #339933;&quot;&gt;.&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;&lt;br class='nettoyeur' /&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$lister_objets&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; charger_fonction&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'lister_objets'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'inc'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;	&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$flux&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'data'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;.=&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$lister_objets&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'chats'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'titre'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt;_T&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'chat:titre_chats_rubrique'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'id_rubrique'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$id_rubrique&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'par'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'nom'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$flux&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'data'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;.=&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$bouton&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$flux&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/83713320cd8d04c7313aebcd4edd7546.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;La fonction &lt;code class='spip_code' dir='ltr'&gt;lister_objet&lt;/code&gt; permet d'appeler un squelette affichant une liste de l'objet souhait&#233;. Il est stock&#233; dans &lt;code class='spip_code' dir='ltr'&gt;prive/objets/liste/chats.html&lt;/code&gt;. Son code peut ressembler &#224; &#231;a :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;pre class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#SET&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{defaut_tri,&lt;span style=&quot;color: #D05000;&quot;&gt;#ARRAY&lt;/span&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;	nom,1,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;	date,&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;{date_sens,-1},&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;	id_chat,1&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;}}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;B_liste_chats&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#ANCRE_PAGINATION&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;div class=&quot;liste-objets chats&quot;&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;table class='spip liste'&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;caption&gt;&lt;strong class=&quot;caption&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #FF4E00;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{titre,&lt;span style=&quot;color: #D05000;&quot;&gt;#GRAND_TOTAL&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|singulier_ou_pluriel&lt;/span&gt;{chat:info_1_chat,chat:info_nb_chats}}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;/strong&gt;&lt;/caption&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;thead&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;tr class='first_row'&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;th class='picto' scope='col'&gt;&lt;/th&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;th class='nom' scope='col'&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#TRI&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{nom,&lt;span style=&quot;color: #C90&quot;&gt;&lt;:chat:label_nom:&gt;&lt;/span&gt;,ajax}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/th&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;th class='langue' scope='col'&gt;&lt;/th&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;th class='date' scope='col'&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#TRI&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{date,&lt;span style=&quot;color: #C90&quot;&gt;&lt;:date:&gt;&lt;/span&gt;,ajax}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/th&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;th class='id' scope='col'&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#TRI&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{id_chat,&lt;span style=&quot;color: #C90&quot;&gt;&lt;:info_numero_abbreviation:&gt;&lt;/span&gt;,ajax}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/th&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/tr&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;/thead&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;tbody&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;BOUCLE_liste_chats&lt;/span&gt;&lt;span style=&quot;color: #527EE0;&quot;&gt;(CHATS)&lt;/span&gt;&lt;span style=&quot;color: #984CFF;&quot;&gt;&lt;span style=&quot;&quot;&gt;{id_rubrique?}&lt;/span&gt;&lt;span style=&quot;&quot;&gt;{id_mot?}&lt;/span&gt;&lt;span style=&quot;&quot;&gt;{id_auteur?}&lt;/span&gt;&lt;span style=&quot;&quot;&gt;{where?}&lt;/span&gt;&lt;span style=&quot;&quot;&gt;{statut?}&lt;/span&gt;&lt;span style=&quot;&quot;&gt;{recherche?}&lt;/span&gt;&lt;span style=&quot;&quot;&gt;{tri &lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{par,num nom}&lt;/span&gt;,&lt;span style=&quot;color: #D05000;&quot;&gt;#GET&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{defaut_tri}&lt;/span&gt;}&lt;/span&gt;&lt;span style=&quot;&quot;&gt;{pagination &lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{nb,10}&lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;tr class=&quot;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#COMPTEUR_BOUCLE&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|alterner&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{row_odd,row_even}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&quot;&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;td class='picto'&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#CHEMIN_IMAGE&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{chat-16.png}&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|balise_img&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/td&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;td class='nom principale'&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#LOGO_CHAT&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|image_reduire&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{20,26}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;a href=&quot;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#ID_CHAT&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|generer_url_entite&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{chat}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&quot; title=&quot;&lt;span style=&quot;color: #C90&quot;&gt;&lt;:info_numero_abbreviation&lt;span style=&quot;color: #FF851D;&quot;&gt;|attribut_html&lt;/span&gt;:&gt;&lt;/span&gt; &lt;span style=&quot;color: #D05000;&quot;&gt;#ID_RUBRIQUE&lt;/span&gt;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#RANG&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;. &lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#NOM&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;td class='langue'&gt;&lt;/td&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;td class='date secondaire'&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#DATE&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|affdate_jourcourt&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/td&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;td class='id'&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#AUTORISER&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{modifier,chat,&lt;span style=&quot;color: #D05000;&quot;&gt;#ID_CHAT&lt;/span&gt;}&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|?&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #74B900;&quot;&gt; &lt;a href=&quot;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#URL_ECRIRE&lt;/span&gt;{chats_edit,id_chat=&lt;span style=&quot;color: #D05000;&quot;&gt;#ID_CHAT&lt;/span&gt;}&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#ID_CHAT&lt;/span&gt;&lt;/a&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #74B900;&quot;&gt; &lt;span style=&quot;color: #D05000;&quot;&gt;#ID_CHAT&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #74B900;&quot;&gt; }&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/td&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/tr&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;/BOUCLE_liste_chats&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;/tbody&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;/table&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;p class='pagination'&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#PAGINATION&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{prive}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;/p&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;/B_liste_chats&gt;&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;div class=&quot;liste-objets chats caption-wrap&quot;&gt;&lt;strong class=&quot;caption&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #FF4E00;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{sinon,''}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;//B_liste_chats&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/79af56013ac7f40667d32702abe16f8f.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;On peut ainsi voir la liste des chats appartenant &#224; une rubrique, dans la vue de la rubrique :&lt;/p&gt;
&lt;dl class='spip_document_298 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH283/dossiers_chats-1daf2.png' width='500' height='283' alt='PNG - 35.3&#160;ko' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-298 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Chats dans une rubrique&lt;/strong&gt;&lt;/dt&gt;
&lt;/dl&gt;&lt;h3 class=&quot;spip&quot;&gt;Donner sa langue au chat&lt;/h3&gt;
&lt;p&gt;La pr&#233;sence des champs &quot;lang&quot; et &quot;langue_choisie&quot; dans la table SQL des chats suffit &#224; faire afficher un formulaire de changement de langue de l'objet. Ajoutons les.&lt;/p&gt; &lt;p&gt;Dans &lt;code class='spip_code' dir='ltr'&gt;base/chats.php&lt;/code&gt; ajouter :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;pre class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;lang&quot;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;VARCHAR(10) DEFAULT '' NOT NULL&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;langue_choisie&quot;&lt;/span&gt;	&lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;VARCHAR(3) DEFAULT 'non'&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/db9b0f666c680b921ee3f9bb030816e6.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Dans &lt;code class='spip_code' dir='ltr'&gt;base/chats_administrations.php&lt;/code&gt; ajouter :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_php cadre&quot; data-clipboard-text=&quot;$maj[&#039;1.3.0&#039;] = array(array(&#039;maj_tables&#039;, array(&#039;spip_chats&#039;)));&quot;&gt;&lt;pre class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$maj&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'1.3.0'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'maj_tables'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'spip_chats'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Enfin, changer la version du sch&#233;ma dans &lt;code class='spip_code' dir='ltr'&gt;paquet.xml&lt;/code&gt; :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_xml cadre&quot; data-clipboard-text=&quot;schema=&quot;1.3.0&quot;&quot;&gt;&lt;pre class=&quot;xml&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;schema=&quot;1.3.0&quot;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Apr&#232;s un passage sur la page d'administration des plugins pour effectuer la mise &#224; jour, sur la page de configuration de multilinguisme, on peut cocher la pr&#233;sence du formulaire de langue sur les Chats :&lt;/p&gt;
&lt;dl class='spip_document_299 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH499/_langues_du_site-7c9c9.png' width='500' height='499' alt='PNG - 36.1&#160;ko' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-299 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Configuration du multilinguisme&lt;/strong&gt;&lt;/dt&gt;
&lt;/dl&gt;
&lt;p&gt;Ainsi, pour tout nouveau chat cr&#233;&#233;, le formulaire de langue s'affiche et on peut modifier la langue (pour peu qu'il y ait au moins 2 langues possibles dans la configuration du multilinguisme). Pour les anciens chats, il faudrait faire une mise &#224; jour de la base en leur d&#233;finissant une langue par d&#233;faut, sinon, le bouton [changer] n'appara&#238;t pas.&lt;/p&gt;
&lt;dl class='spip_document_300 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH453/langue_au_chat-10665.png' width='500' height='453' alt='PNG - 26.3&#160;ko' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-300 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Langue au chat&lt;/strong&gt;&lt;/dt&gt;
&lt;/dl&gt;&lt;h3 class=&quot;spip&quot;&gt;Traductions de chats&lt;/h3&gt;
&lt;p&gt;Sur le m&#234;me principe que pr&#233;c&#233;demment, on ajoute le champ &#171; id_trad &#187; tel que :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_php cadre&quot; data-clipboard-text=&quot;&quot;id_trad&quot; =&gt; &quot;bigint(21) DEFAULT &#039;0&#039; NOT NULL&quot;,&quot;&gt;&lt;pre class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;id_trad&quot;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;bigint(21) DEFAULT '0' NOT NULL&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Sur la page de configuration du multilinguisme, il faut cocher la gestion des traductions sur les chats :&lt;/p&gt;
&lt;dl class='spip_document_301 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH142/langues_du_site_traduction-95c10.png' width='500' height='142' alt='PNG - 6.9&#160;ko' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-301 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Gestion des traductions sur les chats&lt;/strong&gt;&lt;/dt&gt;
&lt;/dl&gt;
&lt;p&gt;Il faut aussi appeler des fonctions qui vont peupler le formulaire de cr&#233;ation d'un chat, traduction d'un autre, par les textes de la traductions. Pour cela, il faut cr&#233;er le fichier &lt;code class='spip_code' dir='ltr'&gt;inc/precharger_chat.php&lt;/code&gt; contenant au moins la premi&#232;re fonction (la seconde &#233;tant facultative si on ne change pas le code qui est pr&#233;sent&#233; ici) :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;pre class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;include_spip&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'inc/precharger_objet'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; inc_precharger_chat_dist&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$id_chat&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$id_rubrique&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$lier_trad&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; precharger_objet&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'chat'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$id_chat&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$id_rubrique&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$lier_trad&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'nom'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;// fonction facultative si pas de changement dans les traitements&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; inc_precharger_traduction_chat_dist&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$id_chat&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$id_rubrique&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$lier_trad&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; precharger_traduction_objet&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'chat'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$id_chat&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$id_rubrique&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$lier_trad&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'nom'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/6eaed035977969ec33af80e96e8a6dd9.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;On peut ainsi traduire un chat :&lt;/p&gt;
&lt;dl class='spip_document_303 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH425/chat_traduit-1c52a.png' width='500' height='425' alt='PNG - 35.4&#160;ko' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-303 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Formulaire de traduction d'un chat&lt;/strong&gt;&lt;/dt&gt;
&lt;/dl&gt;&lt;dl class='spip_document_302 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH287/chat_traduit_prerempli-8a3a6.png' width='500' height='287' alt='PNG - 18.7&#160;ko' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-302 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Traduction pr&#233;remplie du texte d'origine&lt;/strong&gt;&lt;/dt&gt;
&lt;/dl&gt;&lt;h3 class=&quot;spip&quot;&gt;Lier des auteurs aux chats&lt;/h3&gt;
&lt;p&gt;On pourrait cr&#233;er le squelette qui affiche le contenu de notre chat, qui afficherait le formulaire de liaison entre auteurs et chat dedans, ainsi que les autres formulaires souhait&#233;s.&lt;/p&gt; &lt;p&gt;Nous pouvons aussi continuer d'utiliser le squelette cr&#233;&#233; automatiquement par SPIP et se brancher sur le pipeline &#171; affiche_milieu &#187; pour ajouter le formulaire d'auteurs sur les chats. C'est ce que nous allons voir ici. Dans &lt;code class='spip_code' dir='ltr'&gt;paquet.xml&lt;/code&gt;, on ajoute l'appel au pipeline :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_xml cadre&quot; data-clipboard-text=&quot;&quot;&gt;&lt;pre class=&quot;xml&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;&lt;pipeline&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;nom&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;affiche_milieu&quot;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;inclure&lt;/span&gt;=&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;chats_pipelines.php&quot;&lt;/span&gt; &lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Son utilisation appelle l'inclusion de SPIP &lt;code class='spip_code' dir='ltr'&gt;prive/objets/editer/liens&lt;/code&gt;, qui elle-m&#234;me appelle le formulaire &#233;diter liens, permettant de lier 2 objets entre eux et d'afficher les liaisons existantes. Il suffit d'indiquer la source (les auteurs) et la cible, et le tour est jou&#233; :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;pre class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; chats_affiche_milieu&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$flux&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$e&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; trouver_objet_exec&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$flux&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'args'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'exec'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; AND &lt;span style=&quot;color: #000088;&quot;&gt;$e&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'type'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'chat'&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; AND &lt;span style=&quot;color: #000088;&quot;&gt;$e&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'edition'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #009900; font-weight: bold;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$texte&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; recuperer_fond&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'prive/objets/editer/liens'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'table_source'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'auteurs'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'objet'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$e&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'type'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'id_objet'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$e&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'id_objet'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #666666; font-style: italic;&quot;&gt;#'editable'=&gt;autoriser('associerauteurs', $e['type'], $e['id_objet']) ? 'oui' : 'non'&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$p&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;a href=&quot;http://www.php.net/strpos&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;strpos&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$flux&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'data'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;&lt;!--affiche_milieu--&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$flux&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'data'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/substr_replace&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;substr_replace&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$flux&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'data'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$texte&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$p&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #b1b100;&quot;&gt;else&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$flux&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'data'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;.=&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$texte&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$flux&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/3e18198ef78347c284baa20281aadb15.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;dl class='spip_document_304 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH194/auteurs_chats-df6a6.png' width='500' height='194' alt='PNG - 16&#160;ko' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-304 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Auteurs li&#233;s &#224; un chat&lt;/strong&gt;&lt;/dt&gt;
&lt;/dl&gt;&lt;h3 class=&quot;spip&quot;&gt;Mettre des statuts sur les chats&lt;/h3&gt;
&lt;p&gt;Pour mettre des statuts de publication sur les chats, il faut un champ &#171; statut &#187; sur la table SQL, quelques d&#233;clarations et des cha&#238;nes de langues, &#233;ventuellement quelques autorisations.&lt;/p&gt; &lt;p&gt;Sur le principe habituel, on ajoute le champ statut dans la d&#233;claration de &lt;code class='spip_code' dir='ltr'&gt;base/chats.php&lt;/code&gt; (il faudra faire une mise &#224; jour dans &lt;code class='spip_code' dir='ltr'&gt;chats_administrations.php&lt;/code&gt;).&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_php cadre&quot; data-clipboard-text=&quot;&quot;statut&quot; =&gt; &quot;varchar(255) DEFAULT &#039;0&#039; NOT NULL&quot;,&quot;&gt;&lt;pre class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;statut&quot;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;varchar(255) DEFAULT '0' NOT NULL&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Le code de la mise &#224; jour ajoute aussi la valeur &quot;publie&quot; a tous les chats d&#233;j&#224; existants :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;pre class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$maj&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'1.5.0'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'maj_tables'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'spip_chats'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'sql_updateq'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'spip_chats'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'statut'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'publie'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/9525ca289e1ef6cc29a2933af5e5937e.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;On ajoutera aussi une d&#233;claration des statuts pr&#233;vus, toujours dans la d&#233;claration de l'objet, ainsi qu'une description des crit&#232;res limitant l'affichage d'une boucle CHATS en fonction du statut du chat :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;pre class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'statut_textes_instituer'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #0000ff;&quot;&gt;'prepa'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'texte_statut_en_cours_redaction'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #0000ff;&quot;&gt;'prop'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'texte_statut_propose_evaluation'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #0000ff;&quot;&gt;'publie'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'texte_statut_publie'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #0000ff;&quot;&gt;'refuse'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'texte_statut_refuse'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #0000ff;&quot;&gt;'poubelle'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'texte_statut_poubelle'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'statut'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'champ'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'statut'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'publie'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'publie'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'previsu'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'publie,prop,prepa'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'post_date'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'date'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;	&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'exception'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'statut'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'tout'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/50760ee755f1d33de9d2967da09577a9.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;La cl&#233; &lt;code class='spip_code' dir='ltr'&gt;statut_textes_instituer&lt;/code&gt; indique la liste des statuts de notre objet &#233;ditorial ainsi que le nom des cha&#238;nes de langue correspondantes.&lt;/p&gt; &lt;p&gt;La cl&#233; &lt;code class='spip_code' dir='ltr'&gt;statut&lt;/code&gt; dit &#224; peu pr&#232;s : que restreint-on d'afficher en fonction de tel champ ? La restriction porte sur quel champ SQL ? Quel est la valeur de ce champ lorsqu'un chat est publi&#233;, lorsqu'il peut &#234;tre pr&#233;visualis&#233;. Y a t'il une date &#224; prendre en compte pour ne pas publier les chats avant une certaine date (post_date) ? et quels crit&#232;res de boucles annulent la prise en compte de cette restriction : ici &lt;code class='spip_code' dir='ltr'&gt;{statut}&lt;/code&gt; et &lt;code class='spip_code' dir='ltr'&gt;{tout}&lt;/code&gt;.&lt;/p&gt;
&lt;dl class='spip_document_305 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L403xH233/chats_statuts-eb2b2.png' width='403' height='233' alt='PNG - 5.6&#160;ko' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-305 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Statuts sur les chats&lt;/strong&gt;&lt;/dt&gt;
&lt;/dl&gt;&lt;h3 class=&quot;spip&quot;&gt;Lier des chats &#224; des articles&lt;/h3&gt;
&lt;p&gt;Voici la plus grosse partie des squelettes et codes PHP &#224; produire d&#232;s lors que l'on veut lier notre objet &#224; 0 ou plusieurs autres objets, depuis la page de ceux-ci, par exemple lier des chats &#224; des articles, depuis la page d'un article.&lt;/p&gt; &lt;p&gt;Pour installer un formulaire de liaison de chats sur les articles, un peu comme pour les auteurs pr&#233;c&#233;demment, il va falloir ins&#233;rer le formulaire sur les articles, en utilisant le m&#234;me pipeline &lt;code class='spip_code' dir='ltr'&gt;affiche_milieu&lt;/code&gt;. Il faut avant tout qu'il existe une table &lt;code class='spip_code' dir='ltr'&gt;spip_chats_liens&lt;/code&gt; pour pouvoir lier des chats. Cr&#233;ons tout &#231;a.&lt;/p&gt; &lt;p&gt;Dans &lt;code class='spip_code' dir='ltr'&gt;paquet.xml&lt;/code&gt;, on change le sch&#233;ma, et on ajoute le pipeline &lt;code class='spip_code' dir='ltr'&gt;declarer_table_auxiliaires&lt;/code&gt; :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_php cadre&quot; data-clipboard-text=&quot;&quot;&gt;&lt;pre class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #339933;&quot;&gt;&lt;&lt;/span&gt;pipeline nom&lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;declarer_tables_auxiliaires&quot;&lt;/span&gt; inclure&lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;base/chats.php&quot;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;/&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;On d&#233;clare dans ce pipeline notre table de liaison :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;pre class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000000; font-weight: bold;&quot;&gt;function&lt;/span&gt; chats_declarer_tables_auxiliaires&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$tables&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&#123;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #000088;&quot;&gt;$tables&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'spip_chats_liens'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'field'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;id_chat&quot;&lt;/span&gt;	&lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;bigint(21) DEFAULT '0' NOT NULL&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;id_objet&quot;&lt;/span&gt;	&lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;bigint(21) DEFAULT '0' NOT NULL&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;objet&quot;&lt;/span&gt;	&lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;VARCHAR (25) DEFAULT '' NOT NULL&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;vu&quot;&lt;/span&gt;	&lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;VARCHAR(6) DEFAULT 'non' NOT NULL&quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'key'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;PRIMARY KEY&quot;&lt;/span&gt;	&lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;id_chat,id_objet,objet&quot;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;KEY id_chat&quot;&lt;/span&gt;	&lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;&quot;id_chat&quot;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #b1b100;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #000088;&quot;&gt;$tables&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&#125;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/4d44e5746d2552d992ce502fadef0fa0.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;On cr&#233;e la mise &#224; jour dans &lt;code class='spip_code' dir='ltr'&gt;chats_administrations.php&lt;/code&gt; :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_php cadre&quot; data-clipboard-text=&quot;$maj[&#039;1.6.0&#039;] = array(array(&#039;maj_tables&#039;, array(&#039;spip_chats_liens&#039;)));&quot;&gt;&lt;pre class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #000088;&quot;&gt;$maj&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'1.6.0'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'maj_tables'&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'spip_chats_liens'&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Ceci fait, il va nous falloir cr&#233;er plusieurs squelettes de liste. Le premier &lt;code class='spip_code' dir='ltr'&gt;prive/objets/liste/chats_lie.html&lt;/code&gt; est une liste affich&#233;e lorsque des chats sont li&#233;s &#224; un objet.&lt;/p&gt; &lt;p&gt;Il peut &#234;tre (inspir&#233; de celui des mots-cl&#233;s) :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;pre class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#SET&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{defaut_tri,&lt;span style=&quot;color: #D05000;&quot;&gt;#ARRAY&lt;/span&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;	num nom,1,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;	nom,1,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;	race,1,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;	id_chat,1&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;}}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;input type=&quot;hidden&quot; name=&quot;debutchatl&quot; value='&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{debutchatl,&lt;span style=&quot;color: #D05000;&quot;&gt;#EVAL&lt;/span&gt;{_request(&quot;debutchatl&quot;);}}&lt;/span&gt;' /&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;B_liste_chat&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#ANCRE_PAGINATION&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;div class=&quot;liste-objets liste-objets-lies chats&quot;&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;table class='spip liste'&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;caption&gt;&lt;strong class=&quot;caption&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #FF4E00;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{titre,&lt;span style=&quot;color: #D05000;&quot;&gt;#GRAND_TOTAL&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|singulier_ou_pluriel&lt;/span&gt;{chat:info_1_chat,chat:info_nb_chats}}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;/strong&gt;&lt;/caption&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;thead&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;tr class='first_row'&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;th class='picto' scope='col'&gt;&lt;/th&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;th class='nom' scope='col'&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#TRI&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{nom,&lt;span style=&quot;color: #C90&quot;&gt;&lt;:chat:label_nom:&gt;&lt;/span&gt;,ajax}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/th&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;th class='race' scope='col'&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#TRI&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{race,&lt;span style=&quot;color: #C90&quot;&gt;&lt;:chat:label_race:&gt;&lt;/span&gt;,ajax}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/th&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;th class='action' scope='col'&gt; &lt;/th&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/tr&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;/thead&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;tbody&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;BOUCLE_liste_chat&lt;/span&gt;&lt;span style=&quot;color: #527EE0;&quot;&gt;(CHATS)&lt;/span&gt;&lt;span style=&quot;color: #984CFF;&quot;&gt;&lt;span style=&quot;&quot;&gt;{statut==.*}&lt;/span&gt;&lt;span style=&quot;&quot;&gt;{id_chat?}&lt;/span&gt;&lt;span style=&quot;&quot;&gt;{id_rubrique?}&lt;/span&gt;&lt;span style=&quot;&quot;&gt;{id_objet?}&lt;/span&gt;&lt;span style=&quot;&quot;&gt;{objet}&lt;/span&gt;&lt;span style=&quot;&quot;&gt;{where?}&lt;/span&gt;&lt;span style=&quot;&quot;&gt;{tri &lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{par,nom}&lt;/span&gt;,&lt;span style=&quot;color: #D05000;&quot;&gt;#GET&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{defaut_tri}&lt;/span&gt;}&lt;/span&gt;&lt;span style=&quot;&quot;&gt;{par num nom,nom}&lt;/span&gt;&lt;span style=&quot;&quot;&gt;{pagination &lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{nb,10}&lt;/span&gt; chatl}&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;tr class=&quot;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#COMPTEUR_BOUCLE&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|alterner&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{row_odd,row_even}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#ID_CHAT&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|==&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;{id_lien_ajoute}}&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|oui&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;append&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&quot;&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;td class='picto'&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#CHEMIN_IMAGE&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{chat-16.png}&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|balise_img&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/td&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;td class='nom principale'&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#LOGO_CHAT&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|image_reduire&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{20,20}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;a href=&quot;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#ID_CHAT&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|generer_url_entite&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{chat}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&quot; title=&quot;&lt;span style=&quot;color: #C90&quot;&gt;&lt;:info_numero_abbreviation&lt;span style=&quot;color: #FF851D;&quot;&gt;|attribut_html&lt;/span&gt;:&gt;&lt;/span&gt; &lt;span style=&quot;color: #D05000;&quot;&gt;#ID_CHAT&lt;/span&gt;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#RANG&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;. &lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#NOM&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;td class='race secondaire'&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#RACE&lt;/span&gt;&lt;/td&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;td class='action'&gt;&lt;button class=&quot;button link delete&quot; name=&quot;supprimer_lien[chat-&lt;span style=&quot;color: #D05000;&quot;&gt;#ID_CHAT&lt;/span&gt;-&lt;span style=&quot;color: #D05000;&quot;&gt;#OBJET&lt;/span&gt;-&lt;span style=&quot;color: #D05000;&quot;&gt;#ID_OBJET&lt;/span&gt;]&quot; value=&quot;X&quot;&gt;&lt;span style=&quot;color: #C90&quot;&gt;&lt;:chat:lien_retirer_chat:&gt;&lt;/span&gt; &lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#CHEMIN_IMAGE&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{supprimer-12.png}&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|balise_img&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{'X'}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/button&gt;&lt;/td&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/tr&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;/BOUCLE_liste_chat&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;/tbody&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;/table&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;p class='pagination'&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#PAGINATION&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{prive}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;/p&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#GRAND_TOTAL&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|&gt;&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{3}&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|oui&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;div class=&quot;action&quot;&gt;&lt;button class=&quot;button link&quot; name=&quot;supprimer_lien&lt;span style=&quot;color: #D05000;&quot;&gt;#EVAL&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{chr(91)}&lt;/span&gt;chat-*-&lt;span style=&quot;color: #D05000;&quot;&gt;#OBJET&lt;/span&gt;-&lt;span style=&quot;color: #D05000;&quot;&gt;#ID_OBJET&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#EVAL&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{chr(93)}&lt;/span&gt;&quot; value=&quot;X&quot;&gt;&lt;span style=&quot;color: #C90&quot;&gt;&lt;:chat:lien_retirer_chats:&gt;&lt;/span&gt; &lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#CHEMIN_IMAGE&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{supprimer-12.png}&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|balise_img&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{'X'}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/button&gt;&lt;/div&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;/B_liste_chat&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;div class=&quot;liste-objets liste-objets-lies chats caption-wrap&quot;&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;strong class=&quot;caption&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #FF4E00;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{titre,&lt;span style=&quot;color: #C90&quot;&gt;&lt;:chat:info_aucun_chat:&gt;&lt;/span&gt;}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;//B_liste_chat&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/bb30a5333da74e205725a9410a185475.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;La seconde liste est utilis&#233;e pour rechercher des chats &#224; lier, et doit se cr&#233;er dans &lt;code class='spip_code' dir='ltr'&gt;prive/objets/liste/chats_associer.html&lt;/code&gt;. Il peut &#234;tre ainsi, et fait appel &#224; un troisi&#232;me squelette s'il y a un trop grand nombre de chats :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;pre class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#SET&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{defaut_tri,&lt;span style=&quot;color: #D05000;&quot;&gt;#ARRAY&lt;/span&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;	statut,1,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;	multi nom,1,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;}}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#SET&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{_MAX_CHATS_LISTE,&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#VAL&lt;/span&gt;{_MAX_CHATS_LISTE}&lt;span style=&quot;color: #FF851D;&quot;&gt;|defined&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|?&lt;/span&gt;{&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#VAL&lt;/span&gt;{_MAX_CHATS_LISTE}&lt;span style=&quot;color: #FF851D;&quot;&gt;|constant&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;,50}&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;BOUCLE_exclus&lt;/span&gt;&lt;span style=&quot;color: #527EE0;&quot;&gt;(CHATS)&lt;/span&gt;&lt;span style=&quot;color: #984CFF;&quot;&gt;&lt;span style=&quot;&quot;&gt;{tout}&lt;/span&gt;&lt;span style=&quot;&quot;&gt;{id_objet}&lt;/span&gt;&lt;span style=&quot;&quot;&gt;{objet}&lt;/span&gt;&lt;span style=&quot;&quot;&gt;{doublons 1}&lt;/span&gt;&lt;span style=&quot;&quot;&gt;{doublons 2}&lt;/span&gt; &lt;/span&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;/&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;BOUCLE_nb_chats&lt;/span&gt;&lt;span style=&quot;color: #527EE0;&quot;&gt;(CHATS)&lt;/span&gt;&lt;span style=&quot;color: #984CFF;&quot;&gt;&lt;span style=&quot;&quot;&gt;{tout}&lt;/span&gt;&lt;span style=&quot;&quot;&gt;{doublons 1}&lt;/span&gt; &lt;/span&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;/&gt;&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#SET&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{total,&lt;span style=&quot;color: #D05000;&quot;&gt;#TOTAL_BOUCLE&lt;/span&gt;}&lt;/span&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;//B_nb_chats&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;BOUCLE_nombreux&lt;/span&gt;&lt;span style=&quot;color: #527EE0;&quot;&gt;(CONDITION)&lt;/span&gt;&lt;span style=&quot;color: #984CFF;&quot;&gt;&lt;span style=&quot;&quot;&gt;{si &lt;span style=&quot;color: #D05000;&quot;&gt;#GET&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{total}&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|&gt;&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{&lt;span style=&quot;color: #D05000;&quot;&gt;#GET&lt;/span&gt;{_MAX_CHATS_LISTE}}&lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#INCLURE&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{fond=prive/objets/liste/chats_associer-recherche,env,doublons}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;/BOUCLE_nombreux&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#REM&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt; Pas beaucoup de chat &lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;B_chats&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#ANCRE_PAGINATION&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;div class=&quot;liste-objets liste-objets-associer chats&quot;&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;table class='spip liste'&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;caption&gt;&lt;strong class=&quot;caption&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #FF4E00;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{titre,&lt;span style=&quot;color: #D05000;&quot;&gt;#GRAND_TOTAL&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|singulier_ou_pluriel&lt;/span&gt;{chat:info_1_chat,chat:info_nb_chats}}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;/strong&gt;&lt;/caption&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;thead&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;tr class='first_row'&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;th class='picto' scope='col'&gt;&lt;/th&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;th class='titre' scope='col'&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#TRI&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{nom,&lt;span style=&quot;color: #C90&quot;&gt;&lt;:chat:label_nom:&gt;&lt;/span&gt;,ajax}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/th&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;th class='action' scope='col'&gt; &lt;/th&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/tr&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;/thead&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;tbody&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;BOUCLE_chats&lt;/span&gt;&lt;span style=&quot;color: #527EE0;&quot;&gt;(CHATS)&lt;/span&gt;&lt;span style=&quot;color: #984CFF;&quot;&gt;&lt;span style=&quot;&quot;&gt;{doublons 2}&lt;/span&gt;&lt;span style=&quot;&quot;&gt;{tri &lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{par,nom}&lt;/span&gt;,&lt;span style=&quot;color: #D05000;&quot;&gt;#GET&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{defaut_tri}&lt;/span&gt;}&lt;/span&gt;&lt;span style=&quot;&quot;&gt;{par num nom, nom}&lt;/span&gt;&lt;span style=&quot;&quot;&gt;{pagination 10}&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;tr class=&quot;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#COMPTEUR_BOUCLE&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|alterner&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{row_odd,row_even}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&quot;&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;td class='picto'&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#CHEMIN_IMAGE&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{chat-16.png}&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|balise_img&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/td&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;td class='nom principale'&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#LOGO_CHAT&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|image_reduire&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{20,20}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;a href=&quot;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#ID_CHAT&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|generer_url_entite&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{chat}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&quot; title=&quot;&lt;span style=&quot;color: #C90&quot;&gt;&lt;:info_numero_abbreviation&lt;span style=&quot;color: #FF851D;&quot;&gt;|attribut_html&lt;/span&gt;:&gt;&lt;/span&gt; &lt;span style=&quot;color: #D05000;&quot;&gt;#ID_CHAT&lt;/span&gt;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#RANG&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;. &lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#NOM&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;td class='action'&gt;&lt;button class=&quot;button link&quot; name=&quot;ajouter_lien[chat-&lt;span style=&quot;color: #D05000;&quot;&gt;#ID_CHAT&lt;/span&gt;-&lt;span style=&quot;color: #D05000;&quot;&gt;#OBJET&lt;/span&gt;-&lt;span style=&quot;color: #D05000;&quot;&gt;#ID_OBJET&lt;/span&gt;]&quot; value=&quot;+&quot;&gt;&lt;span style=&quot;color: #C90&quot;&gt;&lt;:chat:lien_ajouter_chat:&gt;&lt;/span&gt; &lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#CHEMIN_IMAGE&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{ajouter-12.png}&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|balise_img&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{'+'}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/button&gt;&lt;/td&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/tr&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;/BOUCLE_chats&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;/tbody&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;/table&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;p class='pagination'&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#PAGINATION&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{prive}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;/p&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;/B_chats&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;div class=&quot;liste-objets liste-objets-associer chats caption-wrap&quot;&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;strong class=&quot;caption&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #FF4E00;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{titre,&lt;span style=&quot;color: #C90&quot;&gt;&lt;:chat:info_aucun_chat:&gt;&lt;/span&gt;}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;//B_chats&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;//B_nombreux&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/0695299762838774beb9bf3903c135ed.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Lorsqu'il y a trop de r&#233;sultats &#224; afficher, c'est un autre squelette qui est appel&#233;, &lt;code class='spip_code' dir='ltr'&gt;prive/objets/liste/chats_associer-recherche.html&lt;/code&gt; qui offre un champ de saisie pour rechercher parmi les chats afin de restreindre les r&#233;sultats. Il peut &#234;tre :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_spip2 cadre&quot;&gt;&lt;pre class=&quot;spip2&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;input type=&quot;text&quot; class=&quot;text&quot; name=&quot;recherche&quot; value=&quot;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #FF4E00;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{recherche}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&quot; /&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;input type=&quot;submit&quot; class=&quot;submit&quot; name=&quot;rechercheb&quot; value=&quot;&lt;span style=&quot;color: #C90&quot;&gt;&lt;:info_rechercher:&gt;&lt;/span&gt;&quot; /&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;input type=&quot;hidden&quot; name=&quot;debutchata&quot; value='&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{debutchata,&lt;span style=&quot;color: #D05000;&quot;&gt;#VAL&lt;/span&gt;{debutchatachata}&lt;span style=&quot;color: #FF851D;&quot;&gt;|_request&lt;/span&gt;}&lt;/span&gt;' /&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#SET&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{recherche,&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #FF4E00;&quot;&gt;*&lt;/span&gt;{recherche}}&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#GET&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{recherche}&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|non&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|et&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #FF4E00;&quot;&gt;*&lt;/span&gt;{rechercheb}}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #D05000;&quot;&gt;#SET&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{recherche,'/./'}&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;input type=&quot;hidden&quot; name=&quot;rechercheb&quot; value='x' /&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;B_liste_chat&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#ANCRE_PAGINATION&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;div class=&quot;liste-objets liste-objets-associer chats&quot;&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;table class='spip liste'&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;caption&gt;&lt;strong class=&quot;caption&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #FF4E00;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{titre,&lt;span style=&quot;color: #D05000;&quot;&gt;#GRAND_TOTAL&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|singulier_ou_pluriel&lt;/span&gt;{chat:info_1_chat,chat:info_nb_chats}}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;/strong&gt;&lt;/caption&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;thead&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;tr class='first_row'&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;th class='picto' scope='col'&gt;&lt;/th&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;th class='nom' scope='col'&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#TRI&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{nom,&lt;span style=&quot;color: #C90&quot;&gt;&lt;:chat:label_nom:&gt;&lt;/span&gt;,ajax}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/th&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;th class='race' scope='col'&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#TRI&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{race,&lt;span style=&quot;color: #C90&quot;&gt;&lt;:chat:label_race:&gt;&lt;/span&gt;,ajax}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/th&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;th class='action' scope='col'&gt; &lt;/th&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/tr&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;/thead&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;tbody&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;BOUCLE_liste_chat&lt;/span&gt;&lt;span style=&quot;color: #527EE0;&quot;&gt;(CHATS)&lt;/span&gt;&lt;span style=&quot;color: #984CFF;&quot;&gt;&lt;span style=&quot;&quot;&gt;{doublons 2}&lt;/span&gt;&lt;span style=&quot;&quot;&gt;{recherche &lt;span style=&quot;color: #D05000;&quot;&gt;#GET&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{recherche}&lt;/span&gt;}&lt;/span&gt;&lt;span style=&quot;&quot;&gt;{tri &lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{par,nom}&lt;/span&gt;,&lt;span style=&quot;color: #D05000;&quot;&gt;#GET&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{defaut_tri}&lt;/span&gt;}&lt;/span&gt;&lt;span style=&quot;&quot;&gt;{par num nom}&lt;/span&gt;&lt;span style=&quot;&quot;&gt;{pagination 10 chata}&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;tr class=&quot;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#COMPTEUR_BOUCLE&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|alterner&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{row_odd,row_even}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&quot;&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;td class='picto'&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#CHEMIN_IMAGE&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{chat-16.png}&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|balise_img&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/td&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;td class='nom principale'&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#LOGO_CHAT&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|image_reduire&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{20,20}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;a href=&quot;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#ID_CHAT&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|generer_url_entite&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{chat}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&quot; title=&quot;&lt;span style=&quot;color: #C90&quot;&gt;&lt;:info_numero_abbreviation&lt;span style=&quot;color: #FF851D;&quot;&gt;|attribut_html&lt;/span&gt;:&gt;&lt;/span&gt; &lt;span style=&quot;color: #D05000;&quot;&gt;#ID_CHAT&lt;/span&gt;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#RANG&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;. &lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#NOM&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;td class='race'&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#RACE&lt;/span&gt;&lt;/td&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;td class='action'&gt;&lt;button class=&quot;button link&quot; name=&quot;ajouter_lien[chat-&lt;span style=&quot;color: #D05000;&quot;&gt;#ID_CHAT&lt;/span&gt;-&lt;span style=&quot;color: #D05000;&quot;&gt;#OBJET&lt;/span&gt;-&lt;span style=&quot;color: #D05000;&quot;&gt;#ID_OBJET&lt;/span&gt;]&quot; value=&quot;+&quot;&gt;&lt;span style=&quot;color: #C90&quot;&gt;&lt;:chat:lien_ajouter_chat:&gt;&lt;/span&gt; &lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#CHEMIN_IMAGE&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{ajouter-12.png}&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|balise_img&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{'+'}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/button&gt;&lt;/td&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt; &lt;/tr&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;/BOUCLE_liste_chat&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;/tbody&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;/table&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;p class='pagination'&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#PAGINATION&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{prive}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;/p&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;/B_liste_chat&gt;&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #FF4E00;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{recherche}&lt;/span&gt;&lt;span style=&quot;color: #FF851D;&quot;&gt;|oui&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;div class=&quot;liste-objets liste-objets-associer chats caption-wrap&quot;&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;strong class=&quot;caption&quot;&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;#ENV&lt;/span&gt;&lt;span style=&quot;color: #FF4E00;&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;color: #74B900;&quot;&gt;{titre,&lt;span style=&quot;color: #C90&quot;&gt;&lt;:chat:info_aucun_chat:&gt;&lt;/span&gt;}&lt;/span&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;/div&gt;&lt;span style=&quot;color: #D05000;&quot;&gt;]&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #1DA3DD;&quot;&gt;&lt;//B_liste_chat&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/d9f68bc6f2cda8d87a5d24945bd6234f.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Note : Il y a certainement moyen de regrouper ces 2 derniers squelettes en un seul, mais je n'ai pas pris le temps de le faire.&lt;/p&gt; &lt;p&gt;On obtient donc, sur la page d'un article :&lt;/p&gt;
&lt;dl class='spip_document_307 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH400/chats_articles-dc45d.png' width='500' height='400' alt='PNG - 54.6&#160;ko' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-307 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Des chats sur les articles&lt;/strong&gt;&lt;/dt&gt;
&lt;/dl&gt;&lt;h3 class=&quot;spip&quot;&gt;Permettre de chercher des chats&lt;/h3&gt;
&lt;p&gt;Pour permettre la recherche de chat dans l'espace priv&#233; ou via le crit&#232;re &lt;code class='spip_code' dir='ltr'&gt;{recherche}&lt;/code&gt; sur une boucle chat, il faut le d&#233;clarer dans la description de l'objet, en ajoutant dedans :&lt;/p&gt;
&lt;div class=&quot;coloration_code cadre&quot;&gt;&lt;div class=&quot;spip_php cadre&quot;&gt;&lt;pre class=&quot;php&quot;&gt;&lt;ol&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;'rechercher_champs'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;a href=&quot;http://www.php.net/array&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;	&lt;span style=&quot;color: #0000ff;&quot;&gt;'nom'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;8&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'race'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'robe'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;'infos'&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&gt;&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;2&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;font-weight: normal; vertical-align:top;&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class='download cadre_download'&gt;&lt;a href='http://marcimat.magraine.net/local/cache-code/5dd3ff8ca45c519b8687e2add23b1cf2.txt'&gt;T&#233;l&#233;charger&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;dl class='spip_document_306 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH370/recherche_chat-f8d6e.png' width='500' height='370' alt='PNG - 33.8&#160;ko' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-306 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Recherche parmi les chats&lt;/strong&gt;&lt;/dt&gt;
&lt;/dl&gt;&lt;h3 class=&quot;spip&quot;&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;Voil&#224; une petite d&#233;monstration prometteuse donc, pour ce qui concerne les objets &#233;ditoriaux. L'espace priv&#233; utilisant Zpip permet d'adapter facilement les pages que cr&#233;&#233;e SPIP, ce qui n'est pas montr&#233; ici. Une prochaine fois peut &#234;tre :)&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


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

	</item>
<item xml:lang="fr">
		<title>Culture sur butte</title>
		<link>http://marcimat.magraine.net/Culture-sur-butte</link>
		<guid isPermaLink="true">http://marcimat.magraine.net/Culture-sur-butte</guid>
		<dc:date>2011-08-16T13:17:46Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>Matthieu Marcillaud</dc:creator>



		<description>
&lt;p&gt;Puisque nous avons un jardin devant la maison que nous louons, nous en profitons pour tester et mettre en pratique des m&#233;thodes de cultures, et notamment le jardinage sur buttes de cultures permanentes. Une fois construites, la p&#233;nibilit&#233; que peut repr&#233;senter le jardinage, &#224; se baisser constamment au sol, et &#224; y travailler la terre, dispara&#238;t. Les plantations se font &#224; hauteur de genoux, les r&#233;coltes aussi, ce qui est bien moins ruinant pour le dos. L'organisation des plantations, &#224; la fois espac&#233;es (...)&lt;/p&gt;


-
&lt;a href="http://marcimat.magraine.net/-Libertes-agricoles-" rel="directory"&gt;Libert&#233;s agricoles&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_chapo'&gt;&lt;p&gt;Puisque nous avons un jardin devant la maison que nous louons, nous en profitons pour tester et mettre en pratique des m&#233;thodes de cultures, et notamment le jardinage sur &lt;a href=&quot;http://fr.ekopedia.org/Culture_sur_buttes&quot; class='spip_out' rel='external'&gt;buttes de cultures permanentes&lt;/a&gt;. Une fois construites, la p&#233;nibilit&#233; que peut repr&#233;senter le jardinage, &#224; se baisser constamment au sol, et &#224; y travailler la terre, dispara&#238;t. Les plantations se font &#224; hauteur de genoux, les r&#233;coltes aussi, ce qui est bien moins ruinant pour le dos. L'organisation des plantations, &#224; la fois espac&#233;es et m&#233;lang&#233;es, permettent d'&#234;tre plus r&#233;sistant aux &#233;ventuelles maladies et pr&#233;dateurs tout en favorisant des associations b&#233;n&#233;fiques. Un couvert ou paillage v&#233;g&#233;tal permet de limiter l'envahissement des herbes tout en apportant abri et nourriture pour la microfaune du sol. Voici donc quelques photos de nos premi&#232;res buttes, inspir&#233;es des travaux de &lt;a href=&quot;http://aupetitcolibri.free.fr/&quot; class='spip_out' rel='external'&gt;Richard Wallner&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;h3 class=&quot;spip&quot;&gt;Construction&lt;/h3&gt;
&lt;p&gt;Nous sommes partis sur la cr&#233;ation de 2 buttes de 1m70 de large, et de 8m de long. 3 all&#233;es de 60cm le large et 40cm de profondeur sont n&#233;cessaires, que nous compl&#233;tons avec 2 petites buttes (80cm et 60cm de large), ce qui donne, de fa&#231;on tr&#232;s sch&#233;matique, ceci :&lt;/p&gt;
&lt;dl class='spip_document_269 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH274/buttes_3d-6b244.png' width='500' height='274' alt='PNG - 130.3&#160;ko' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-269 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Sch&#233;ma en perspective des buttes.&lt;/strong&gt;&lt;/dt&gt;
&lt;/dl&gt;
&lt;p&gt;Nous avons choisi, comme mat&#233;riaux pour retenir la terre des buttes dans les all&#233;es des demi-rondins de ch&#226;taigniers, ainsi que des piquets de vigne en ch&#226;taigniers aussi pour les maintenir.&lt;/p&gt; &lt;p&gt;La construction commen&#231;a d&#233;but mai et fut finie d&#233;but juillet (on s'y consacrait de temps en temps 1h, ce qui n'avan&#231;ait pas vite, le sol &#233;tait extr&#234;mement sec... sans parler des rochers !).&lt;/p&gt; &lt;p&gt;Les &#233;tapes consistent &#224; :&lt;/p&gt;
&lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; d&#233;sherber la partie qui recevra les buttes et conserver les herbes, qui serviront de paillage dans les all&#233;es&lt;/li&gt;&lt;li&gt; enlever 3 &#224; 5 cm de terre sur la surface, la plus riche biologiquement, et la conserver. Elle sera remise sur les buttes une fois r&#233;alis&#233;es.&lt;/li&gt;&lt;li&gt; creuser les all&#233;es. La terre &#233;vacu&#233;e des all&#233;es va sur l'emplacement des buttes, qui se forment alors.&lt;/li&gt;&lt;li&gt; installer les planches ou demi-rondins qui retiennent la terre des all&#233;es&lt;/li&gt;&lt;li&gt; modeler la butte&lt;/li&gt;&lt;li&gt; installer un syst&#232;me d'arrosage goutte &#224; goutte&lt;/li&gt;&lt;li&gt; pailler&lt;/li&gt;&lt;li&gt; planter :)&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Voici quelques photos des buttes et de la construction :&lt;/p&gt;
&lt;dl class='spip_document_270 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH375/photo0068-0cc53.jpg' width='500' height='375' alt='JPEG - 699.7&#160;ko' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-270 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Le d&#233;serbage&lt;/strong&gt;&lt;/dt&gt;
&lt;dd class='crayon document-descriptif-270 spip_doc_descriptif' style='width:350px;'&gt;Les herbes sont enlev&#233;es et mises en tas
&lt;/dd&gt;
&lt;/dl&gt;&lt;dl class='spip_document_271 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH375/photo0069-4db37.jpg' width='500' height='375' alt='JPEG - 703.8&#160;ko' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-271 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Herbes en tas&lt;/strong&gt;&lt;/dt&gt;
&lt;dd class='crayon document-descriptif-271 spip_doc_descriptif' style='width:350px;'&gt;Toutes les herbes ont &#233;t&#233;s enlev&#233;es
&lt;/dd&gt;
&lt;/dl&gt;&lt;dl class='spip_document_272 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH375/photo0070-2eb34.jpg' width='500' height='375' alt='JPEG - 781.1&#160;ko' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-272 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;3 &#224; 5cm de terre mis de c&#244;t&#233;&lt;/strong&gt;&lt;/dt&gt;
&lt;dd class='crayon document-descriptif-272 spip_doc_descriptif' style='width:350px;'&gt;La terre de surface est mise de c&#244;t&#233;.
&lt;/dd&gt;
&lt;/dl&gt;&lt;dl class='spip_document_273 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH375/photo0071-e146b.jpg' width='500' height='375' alt='JPEG - 645.5&#160;ko' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-273 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Retenir la terre&lt;/strong&gt;&lt;/dt&gt;
&lt;dd class='crayon document-descriptif-273 spip_doc_descriptif' style='width:350px;'&gt;La terre qui sera pellet&#233;e des all&#233;es sera retenue dans un premiers temps, &#224; l'emplacement des buttes, par des planches (ici des demi-rondins de ch&#226;taigniers).
&lt;/dd&gt;
&lt;/dl&gt;&lt;dl class='spip_document_274 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH375/photo0072-9f7c9.jpg' width='500' height='375' alt='JPEG - 779.4&#160;ko' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-274 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Creuser une all&#233;e&lt;/strong&gt;&lt;/dt&gt;
&lt;dd class='crayon document-descriptif-274 spip_doc_descriptif' style='width:350px;'&gt;La terre est donc creus&#233;e de 40cm, dans notre cas, &#224; la grelinette (50cm de large) et &#224; la fourche. Surprise... &#224; 40cm... on trouve du &#171; platin &#187; : plein de petits et gros cailloux calcaires, voire parfois des rochers.
&lt;/dd&gt;
&lt;/dl&gt;&lt;dl class='spip_document_275 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH375/photo0075-5413f.jpg' width='500' height='375' alt='JPEG - 717.6&#160;ko' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-275 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;D&#233;but de l'all&#233;e&lt;/strong&gt;&lt;/dt&gt;
&lt;dd class='crayon document-descriptif-275 spip_doc_descriptif' style='width:350px;'&gt;Au fur et &#224; mesure de l'avancement, on installe les demi-rondins pour retenir la terre.
&lt;/dd&gt;
&lt;/dl&gt;&lt;dl class='spip_document_276 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH375/photo0087-5c26c.jpg' width='500' height='375' alt='JPEG - 693.1&#160;ko' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-276 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Seconde all&#233;e&lt;/strong&gt;&lt;/dt&gt;
&lt;dd class='crayon document-descriptif-276 spip_doc_descriptif' style='width:350px;'&gt;L'exp&#233;rience de la premi&#232;re butte &#224; montr&#233; qu'il vallait mieux 2 rondins pour retenir temporairement la terre (&#231;a permet d'en mettre plus sur une plus petite largeur).
&lt;/dd&gt;
&lt;/dl&gt;&lt;dl class='spip_document_277 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH375/photo0098-6a4ab.jpg' width='500' height='375' alt='JPEG - 670.3&#160;ko' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-277 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Trois phases&lt;/strong&gt;&lt;/dt&gt;
&lt;dd class='crayon document-descriptif-277 spip_doc_descriptif' style='width:350px;'&gt;La troisi&#232;me all&#233;e se creuse. Sur la premi&#232;re butte, la terre mis de c&#244;t&#233; et en peu de compost du jardin ont &#233;t&#233; mis, ainsi que les tuyaux de gouttes &#224; gouttes (r&#233;cup&#233;r&#233;s chez un mara&#238;cher). Sur la mini-butte &#224; gauche, l'arrosage et un paillage en copeau de ch&#226;taigniers est mis, avec quelques plantations.
&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;Puis est arriv&#233; &#171; le drame &#187; :) Un violent orage. Et les buttes se sont inclin&#233;es. En fait, comme le sol &#224; 40 cm &#233;tait en pierre, il avait &#233;t&#233; difficile de bien enfoncer les piquets. Ils sont du coup tomb&#233;s :&lt;/p&gt;
&lt;dl class='spip_document_278 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH375/photo0105-506da.jpg' width='500' height='375' alt='JPEG - 1.1&#160;Mo' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-278 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Un violent orage, et c'est la cata !&lt;/strong&gt;&lt;/dt&gt;
&lt;/dl&gt;
&lt;p&gt;Nous avons du employer les grands moyens pour corriger &#231;a : une perceuse &#224; percussion, une m&#232;che &#224; pierre de 3cm de diam&#232;tre, des trous dans les cailloux, la barre &#224; mine, la masse, et les piquets sont tout de suite bien mieux enfonc&#233;s. Depuis, rien n'a boug&#233;.&lt;/p&gt;
&lt;h3 class=&quot;spip&quot;&gt;Plantations&lt;/h3&gt;
&lt;p&gt;Quelques photos des buttes. Au 14 juillet :&lt;/p&gt;
&lt;dl class='spip_document_279 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH375/dscn5922.resized-00eda.jpg' width='500' height='375' alt='JPEG - 326.8&#160;ko' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-279 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Buttes (le 14 juillet)&lt;/strong&gt;&lt;/dt&gt;
&lt;dd class='crayon document-descriptif-279 spip_doc_descriptif' style='width:350px;'&gt;La butte de droite, qui avait eu moins de paillage commence &#224; voir pousser de nombreuses herbes. Elles restent limit&#233;es sur celle de gauche, qui a eu en plus de nombreuses plantations.
&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;Au 4 ao&#251;t, la butte ressemblait &#224; cela. Dessous, le sch&#233;ma d'implantation des diff&#233;rentes plantes pr&#233;sentes, relev&#233; ce jour l&#224; pour m&#233;moire.&lt;/p&gt;
&lt;dl class='spip_document_280 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH375/dscn6039-68823.jpg' width='500' height='375' alt='JPEG - 704.4&#160;ko' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-280 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Buttes (4 ao&#251;t)&lt;/strong&gt;&lt;/dt&gt;
&lt;dd class='crayon document-descriptif-280 spip_doc_descriptif' style='width:350px;'&gt;Toutes les plantations ont bien pris. Une petite exception pour les pieds d'aubergines qui restent de petite taille.
&lt;/dd&gt;
&lt;/dl&gt;&lt;dl class='spip_document_285 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH363/4_aout_2011-petit-3e586.jpg' width='500' height='363' alt='JPEG - 138.4&#160;ko' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-285 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Sch&#233;ma implantation (4 aout)&lt;/strong&gt;&lt;/dt&gt;
&lt;/dl&gt;
&lt;p&gt;Aujourd'hui, 16 ao&#251;t, avec quelques gros plans :&lt;/p&gt;
&lt;dl class='spip_document_281 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH375/dscn6178-e06f5.jpg' width='500' height='375' alt='JPEG - 744.7&#160;ko' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-281 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Buttes (16 ao&#251;t)&lt;/strong&gt;&lt;/dt&gt;
&lt;/dl&gt;&lt;dl class='spip_document_284 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH667/dscn6179-18330.jpg' width='500' height='667' alt='JPEG - 681.4&#160;ko' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-284 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Bourrache&lt;/strong&gt;&lt;/dt&gt;
&lt;dd class='crayon document-descriptif-284 spip_doc_descriptif' style='width:350px;'&gt;Ce plant de bourrache, &#224; l'extr&#233;mit&#233; chaude de la butte se pla&#238;t merveilleusement bien. Il offre de jolis fleurs pour d&#233;corer les salades et attire les pollinisateurs.
&lt;/dd&gt;
&lt;/dl&gt;&lt;dl class='spip_document_282 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH667/dscn6183-0f33c.jpg' width='500' height='667' alt='JPEG - 621.3&#160;ko' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-282 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Long concombre&lt;/strong&gt;&lt;/dt&gt;
&lt;dd class='crayon document-descriptif-282 spip_doc_descriptif' style='width:350px;'&gt;Sous les haricots et les &#339;illets, un concombre.
&lt;/dd&gt;
&lt;/dl&gt;&lt;dl class='spip_document_283 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH375/dscn6180-4fafb.jpg' width='500' height='375' alt='JPEG - 681.5&#160;ko' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-283 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Consoude et luzerne&lt;/strong&gt;&lt;/dt&gt;
&lt;dd class='crayon document-descriptif-283 spip_doc_descriptif' style='width:350px;'&gt;La consoude (en bas &#224; gauche) et la luzerne, encore jeunes ici, servent d'engrais vert, et seront utilis&#233;s comme paillage l'ann&#233;e prochaine, en plus de la vesce qui sera sem&#233;e sur certaines parties des buttes en septembre.
&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;Affaire &#224; suivre...&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>BREFT (d&#233;coupe)</title>
		<link>http://marcimat.magraine.net/BREFT-decoupe</link>
		<guid isPermaLink="true">http://marcimat.magraine.net/BREFT-decoupe</guid>
		<dc:date>2011-04-21T18:29:24Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>Matthieu Marcillaud</dc:creator>



		<description>
&lt;p&gt;Petit mot pour dire que le BREFT (Bois Ram&#233;al En Fins Tron&#231;ons) pr&#233;sent&#233; dans l'article pr&#233;c&#233;dent se &#171; fabrique &#187; bien mieux avec une petite scie &#233;go&#239;ne.&lt;br class='autobr' /&gt;
Le magasin de bricolage/jardinage nous a tr&#232;s bien conseill&#233; sur ce coup l&#224;. Nous nous retrouvons donc &#224; d&#233;couper du BREFT bien plus rapidement avec une petite scie &#233;go&#239;ne (18&#8364;) et dans une moindre mesure, avec un nouveau s&#233;cateur (10&#8364;). Petite scie &#233;go&#239;ne Id&#233;ale pour couper ces petites branches d'1 cm de diam&#232;tre maximum. &lt;br class='autobr' /&gt;
Du coup, nous pouvons placer (...)&lt;/p&gt;


-
&lt;a href="http://marcimat.magraine.net/-Libertes-agricoles-" rel="directory"&gt;Libert&#233;s agricoles&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_chapo'&gt;&lt;p&gt;Petit mot pour dire que le BREFT (Bois Ram&#233;al En Fins Tron&#231;ons) pr&#233;sent&#233; dans l'&lt;a href=&quot;http://marcimat.magraine.net/BREFT&quot; class='spip_in'&gt;article pr&#233;c&#233;dent&lt;/a&gt; se &#171; fabrique &#187; bien mieux avec une petite scie &#233;go&#239;ne.&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;p&gt;Le magasin de bricolage/jardinage nous a tr&#232;s bien conseill&#233; sur ce coup l&#224;. Nous nous retrouvons donc &#224; d&#233;couper du BREFT bien plus rapidement avec une petite scie &#233;go&#239;ne (18&#8364;) et dans une moindre mesure, avec un nouveau s&#233;cateur (10&#8364;).&lt;/p&gt;
&lt;dl class='spip_document_266 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH375/photo0059.resized-831e2.jpg' width='500' height='375' alt='JPEG - 300.6&#160;ko' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-266 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Petite scie &#233;go&#239;ne&lt;/strong&gt;&lt;/dt&gt;
&lt;dd class='crayon document-descriptif-266 spip_doc_descriptif' style='width:350px;'&gt;Id&#233;ale pour couper ces petites branches d'1 cm de diam&#232;tre maximum.
&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;Du coup, nous pouvons placer une plus grande quantit&#233; de branchages sur la ch&#232;vre et n'avons plus besoin d'utiliser de b&#251;che pour appuyer dessus. Tout le travail de d&#233;coupe en est donc facilit&#233;.&lt;/p&gt;
&lt;dl class='spip_document_267 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH375/photo0058.resized-75ebb.jpg' width='500' height='375' alt='JPEG - 250.7&#160;ko' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-267 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;D&#233;coupe de BREFT avec scie &#233;go&#239;ne&lt;/strong&gt;&lt;/dt&gt;
&lt;dd class='crayon document-descriptif-267 spip_doc_descriptif' style='width:350px;'&gt;Il manque une main sur cette vue : celle qui appuie sur les branches &#224; droite de la scie, mais elle prenait une photo :) . On r&#233;ceptionne donc les branches dans l'espace en V de la ch&#232;vre en maintenant ces branches d'une main. Un op&#233;rateur tient l'autre cot&#233; des branches pendant que la coupe se fait.
&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;L'inconv&#233;nient des feuilles de cette &#233;poque est qu'&#224; un moment, le volume d&#233;passe largement la hauteur du tr&#233;teau et qu'il faut donc maintenir ce fagot pour ne pas qu'il chute.&lt;/p&gt;
&lt;dl class='spip_document_264 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH375/photo0064.resized-fc07b.jpg' width='500' height='375' alt='JPEG - 263.4&#160;ko' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-264 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;D&#233;bordement de verdure !&lt;/strong&gt;&lt;/dt&gt;
&lt;dd class='crayon document-descriptif-264 spip_doc_descriptif' style='width:350px;'&gt;Lorsque l'on met de nombreuses tiges, le volume des feuilles est difficile &#224; g&#233;rer sur une partie car il d&#233;borde de la ch&#232;vre.
&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;Nous avons ainsi r&#233;colt&#233; en 2h environ 2 fois ce qu'on avait r&#233;colt&#233; hier en 1h30, soit 1,5 fois plus pour une m&#234;me dur&#233;e, sans se presser. Comme quoi, avoir un bon outil adapt&#233; est plus agr&#233;able &#224; utiliser et plus efficace.&lt;/p&gt;
&lt;dl class='spip_document_268 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://marcimat.magraine.net/local/cache-vignettes/L500xH375/photo0065.resized-b11bb.jpg' width='500' height='375' alt='JPEG - 267.1&#160;ko' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-268 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;R&#233;colte de BREFT&lt;/strong&gt;&lt;/dt&gt;
&lt;dd class='crayon document-descriptif-268 spip_doc_descriptif' style='width:350px;'&gt;Voil&#224; donc ce qu'on a produit en 2h (&#224; deux personnes).
&lt;/dd&gt;
&lt;/dl&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>



</channel>

</rss>
