<?xml 
version="1.0" encoding="utf-8"?><?xml-stylesheet title="XSL formatting" type="text/xsl" href="https://programmer.spip.net/spip.php?page=backend.xslt" ?>
<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="en">
	<title>Coding with SPIP 4</title>
	<link>https://programmer.spip.net/</link>
	<description>
Documentation pour SPIP 4.x Ce site contient une documentation pour SPIP 4 qui d&#233;veloppe deux aspects : la cr&#233;ation des squelettes et leur syntaxe, avec les boucles, crit&#232;res, filtres et balises, d'une part, et le fonctionnement et l'extensibilit&#233; de SPIP d'autre part.</description>
	<language>en</language>
	<generator>SPIP - www.spip.net</generator>
	<atom:link href="https://programmer.spip.net/spip.php?page=backend" rel="self" type="application/rss+xml" />

	<image>
		<title>Coding with SPIP 4</title>
		<url>https://programmer.spip.net/local/cache-vignettes/L144xH32/siteon0-9f5ff.png?1763986613</url>
		<link>https://programmer.spip.net/</link>
		<height>32</height>
		<width>144</width>
	</image>



<item xml:lang="en">
		<title>editer_liens API to link object tables</title>
		<link>https://programmer.spip.net/editer_liens-API-to-link-object-tables</link>
		<guid isPermaLink="true">https://programmer.spip.net/editer_liens-API-to-link-object-tables</guid>
		<dc:date>2025-08-22T07:55:35Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>en</dc:language>
		<dc:creator>Jack, JLuc</dc:creator>



		<description>
&lt;p&gt;SPIP 3 introduces generic management of the link tables between an object and any other object. &lt;br class='autobr' /&gt;
Link table Links are structurally non-symmetrical: they start from a source object and go to any destination object. &lt;br class='autobr' /&gt;
To be associable as a source, an object bidibule stored in a table spip_bidibules must have a table spip_bidibules_links that will have one field id_bidibule (same name as the primary key of spip_bidibules) and two fields id_objet and objet. The table can also have other fields (&#8230;)&lt;/p&gt;


-
&lt;a href="https://programmer.spip.net/-Extending-SPIP-" rel="directory"&gt;Extending SPIP&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_texte'&gt;&lt;p&gt;&lt;strong&gt;SPIP 3 introduces generic management of the link tables between an object and any other object.&lt;/strong&gt;&lt;/p&gt;
&lt;h2 class=&#034;spip&#034;&gt;
Link table&lt;/h2&gt;
&lt;p&gt;Links are structurally non-symmetrical: they start from a source object and go to any destination object.&lt;/p&gt;
&lt;p&gt;To be associable as a source, an object &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;bidibule&lt;/code&gt; stored in a table &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;spip_bidibules&lt;/code&gt; must have a table &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;spip_bidibules_links&lt;/code&gt; that will have one field &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;id_bidibule&lt;/code&gt; (same name as the primary key of &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;spip_bidibules&lt;/code&gt;) and two fields &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;id_objet&lt;/code&gt; and &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;objet&lt;/code&gt;.&lt;br class='autobr' /&gt;
The table can also have other fields to describe the links.&lt;/p&gt;
&lt;h2 class=&#034;spip&#034;&gt;
API&lt;/h2&gt;
&lt;p&gt;The API makes it easy to manage links without directly manipulating SQL queries, and by systematically providing entry points for plug-ins enabling them to know when a link is added, removed, or modified and act accordingly.&lt;/p&gt;
&lt;p&gt;To use the API you need to include &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;action/edit_links.php&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;php&#034; class='spip_code spip_code_block language-php' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;include_spip('action/editer_liens'); &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 class=&#034;spip&#034;&gt;
objet_associable&lt;/h2&gt;
&lt;p&gt;&lt;code class='spip_code spip_code_inline' dir='ltr'&gt;objet_associable($objet)&lt;/code&gt; tests whether an object can be linked to others via its link table.&lt;/p&gt;
&lt;p&gt;If the object is not associable (it has no dedicated link table), the function returns &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;false&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If the object is associable, the function returns an array composed of the name of the primary key (common to the link table and the object table), and the name of the link table.&lt;/p&gt;
&lt;p&gt;For example (and by default in SPIP) authors, documents and keywords are associable objects because they all have a spip_xxx_links tables.&lt;/p&gt;
&lt;p&gt;On the other hand, articles are not associable because they do not have a spip_articles_links table. This means that you cannot create links from the articles to any other object, but you can create a link from a keyword, an author or a document to an article.&lt;/p&gt;
&lt;h2 class=&#034;spip&#034;&gt;
objet_associer&lt;/h2&gt;
&lt;p&gt;&lt;code class='spip_code spip_code_inline' dir='ltr'&gt;objet_associer($objets_source, $objets_lies[,$qualif])&lt;/code&gt; allows to associate the &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;$objets_lies&lt;/code&gt; to the &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;$objets_source&lt;/code&gt; via their own link table.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code class='spip_code spip_code_inline' dir='ltr'&gt;$objets_source&lt;/code&gt;&lt;/strong&gt;&lt;br class='autobr' /&gt;
The &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;$objets_source&lt;/code&gt; must all be associable in the sense of the function &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;objet_associable()&lt;/code&gt;. The source objects are therefore the pivots on which the links are based.&lt;/p&gt;
&lt;p&gt;The format of &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;$objets_source&lt;/code&gt; is common to all link manipulation functions. &lt;br class='autobr' /&gt;
It is an array of which&lt;/p&gt;
&lt;ul class=&#034;spip&#034; role=&#034;list&#034;&gt;&lt;li&gt; each key corresponds to the name of the object to be associated&lt;/li&gt;&lt;li&gt; each value describes the id(s) for each object. The values can be :
&lt;ul class=&#034;spip&#034; role=&#034;list&#034;&gt;&lt;li&gt; the wildcard &#034;*&#034; which stands for &#034;all ids already in the link table&#034; (so it has little interest in the case of adding links like here)&lt;/li&gt;&lt;li&gt; an integer denotes a specific id&lt;/li&gt;&lt;li&gt; an array refers to a list of ids (an array cannot contain the wildcard &#034;*&#034;)&lt;/li&gt;&lt;li&gt; an array of two elements beginning with the value 'NOT' indicates an exclusive condition: all the ids already in the link table except those described in the second value (which can be an integer or an array in turn)&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;&lt;code class='spip_code spip_code_inline' dir='ltr'&gt;$objets_lies&lt;/code&gt;&lt;/strong&gt;&lt;br class='autobr' /&gt;
The format of &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;$objets_lies&lt;/code&gt; is common to all link manipulation functions. &lt;br class='autobr' /&gt;
It is an array of which&lt;/p&gt;
&lt;ul class=&#034;spip&#034; role=&#034;list&#034;&gt;&lt;li&gt; each key corresponds to the name of the object to be associated. The wildcard value &#034;*&#034; indicates &#034;all objects present in the link table&#034; (of little interest in the case of adding a link).&lt;/li&gt;&lt;li&gt; each value describes the id(s) for each object. The values can be :
&lt;ul class=&#034;spip&#034; role=&#034;list&#034;&gt;&lt;li&gt; the wildcard &#034;*&#034; which stands for &#034;all ids already in the link table&#034; (so it has little interest in the case of adding links like here)&lt;/li&gt;&lt;li&gt; an integer denotes a specific id&lt;/li&gt;&lt;li&gt; an array refers to a list of ids (an array cannot contain the wildcard &#034;*&#034;)&lt;/li&gt;&lt;li&gt; an array of two elements beginning with the value 'NOT' indicates an exclusive condition: all the ids already in the link table except those described in the second value (which can be an integer or an array in turn)&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;&lt;code class='spip_code spip_code_inline' dir='ltr'&gt;$qualif&lt;/code&gt;&lt;/strong&gt;&lt;br class='autobr' /&gt;
The function &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;objet_associer&lt;/code&gt; can take an optional third argument &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;$qualif&lt;/code&gt; which is an associative array &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;field=&gt;value&lt;/code&gt; with which the added links will be modified. This can be useful if the link table has additional fields that describe the links.&lt;/p&gt;
&lt;p&gt;If multiple links are created at the same time, the same values described in &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;$qualif&lt;/code&gt; are applied to all of them.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;examples&lt;/strong&gt;&lt;br class='autobr' /&gt;
The examples below are valid:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;php&#034; class='spip_code spip_code_block language-php' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;objet_associer(array(&#034;auteur&#034;=&gt;3), array(&#034;article&#034;=&gt;5)); objet_associer(array(&#034;auteur&#034;=&gt;3), array(&#034;article&#034;=&gt;array(5,6))); objet_associer(array(&#034;auteur&#034;=&gt;array(3,4)), array(&#034;article&#034;=&gt;5)); objet_associer(array(&#034;auteur&#034;=&gt;array(3,4)), array(&#034;article&#034;=&gt;array(5,6))); objet_associer(array(&#034;document&#034;=&gt;3), array(&#034;article&#034;=&gt;5), array('vu'=&gt;'oui')); &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The function returns the number of links actually created (some links may already exist at the time of the addition attempt, which are then not counted).&lt;/p&gt;
&lt;h2 class=&#034;spip&#034;&gt;
objet_dissocier&lt;/h2&gt;
&lt;p&gt;&lt;code class='spip_code spip_code_inline' dir='ltr'&gt;objet_dissocier($objets_source,$objets_lies)&lt;/code&gt; is used to remove the links between &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;$objets_source&lt;/code&gt; and &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;$objets_lies&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code class='spip_code spip_code_inline' dir='ltr'&gt;$objets_source&lt;/code&gt;&lt;/strong&gt;&lt;br class='autobr' /&gt;
see the same format as described in &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;objet_associer&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code class='spip_code spip_code_inline' dir='ltr'&gt;$objets_lies&lt;/code&gt;&lt;/strong&gt;&lt;br class='autobr' /&gt;
see the same format as described in &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;objet_associer&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;examples&lt;/strong&gt;&lt;br class='autobr' /&gt;
The examples below are valid:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;php&#034; class='spip_code spip_code_block language-php' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;objet_dissocier(array(&#034;auteur&#034;=&gt;3), array(&#034;article&#034;=&gt;5)); /* Example for associating an author to a list of articles and only to those articles */ objet_associer(array(&#034;auteur&#034;=&gt;3), array(&#034;article&#034;=&gt;array(5,6))); objet_dissocier(array(&#034;auteur&#034;=&gt;3), array(&#034;article&#034;=&gt;array('NOT', array(5,6)))); &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The function returns the number of links actually deleted.&lt;/p&gt;
&lt;h2 class=&#034;spip&#034;&gt;
objet_qualifier_liens&lt;/h2&gt;
&lt;p&gt;&lt;code class='spip_code spip_code_inline' dir='ltr'&gt;objet_qualifier_liens($objets_source,$objets_lies,$qualif)&lt;/code&gt; allows to modify the values of the fields described in &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;$qualif&lt;/code&gt; on the links between &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;$objets_source&lt;/code&gt; and &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;$objets_lies&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code class='spip_code spip_code_inline' dir='ltr'&gt;$objets_source&lt;/code&gt;&lt;/strong&gt;&lt;br class='autobr' /&gt;
see the same format as described in &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;objet_associer&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code class='spip_code spip_code_inline' dir='ltr'&gt;$objets_lies&lt;/code&gt;&lt;/strong&gt;&lt;br class='autobr' /&gt;
see the same format as described in &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;objet_associer&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code class='spip_code spip_code_inline' dir='ltr'&gt;$qualif&lt;/code&gt;&lt;/strong&gt;&lt;br class='autobr' /&gt;
see the same format as described in &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;objet_associer&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;examples&lt;/strong&gt;&lt;br class='autobr' /&gt;
The examples below are valid:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;php&#034; class='spip_code spip_code_block language-php' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;objet_qualifier(array(&#034;document&#034;=&gt;3), array(&#034;article&#034;=&gt;5), array('vu'=&gt;'oui')); &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The function returns the number of updates in base or false in case of failure.&lt;/p&gt;
&lt;h2 class=&#034;spip&#034;&gt;
objet_trouver_liens&lt;/h2&gt;
&lt;p&gt;&lt;code class='spip_code spip_code_inline' dir='ltr'&gt;objet_trouver_liens($objets_source,$objets_lies)&lt;/code&gt; allows to retrieve all links from &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;$objets_source&lt;/code&gt; to &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;$objets_lies&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code class='spip_code spip_code_inline' dir='ltr'&gt;$objets_source&lt;/code&gt;&lt;/strong&gt;&lt;br class='autobr' /&gt;
see the same format as described in &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;objet_associer&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code class='spip_code spip_code_inline' dir='ltr'&gt;$objets_lies&lt;/code&gt;&lt;/strong&gt;&lt;br class='autobr' /&gt;
see the same format as described in &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;objet_associer&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The function returns an array consisting of an associative array for each link found. The latter contains all the fields of the link, to which is added an entry &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;objet=&gt;id&lt;/code&gt; for the source and destination of the link, to simplify processing on return (avoids having to know the primary keys for example).&lt;/p&gt;
&lt;h2 class=&#034;spip&#034;&gt;
objet_optimiser_liens&lt;/h2&gt;
&lt;p&gt;&lt;code class='spip_code spip_code_inline' dir='ltr'&gt;objet_optimiser_liens($objets_source,$objets_lies)&lt;/code&gt; clears the remaining links between &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;$objets_source&lt;/code&gt; and &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;$objets_lies&lt;/code&gt; when one of the two no longer exists (database deletion).&lt;/p&gt;
&lt;p&gt;This function is classically used in cron functions for database cleansing.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code class='spip_code spip_code_inline' dir='ltr'&gt;$objets_source&lt;/code&gt;&lt;/strong&gt;&lt;br class='autobr' /&gt;
see the same format as described in &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;objet_associer&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code class='spip_code spip_code_inline' dir='ltr'&gt;$objets_lies&lt;/code&gt;&lt;/strong&gt;&lt;br class='autobr' /&gt;
see the same format as described in &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;objet_associer&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The function returns the number of obsolete links cleaned up.&lt;/p&gt;
&lt;h2 class=&#034;spip&#034;&gt;
objet_dupliquer_liens&lt;/h2&gt;
&lt;p&gt;&lt;code class='spip_code spip_code_inline' dir='ltr'&gt;objet_dupliquer_liens($objet,$id_source,$id_cible)&lt;/code&gt; will duplicate all the links in the &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;$objet $id_source&lt;/code&gt; on the &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;$objet $id_cible&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;To do this, all the link tables of all known objects will be browsed to find links from and to the &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;$objet $id_source&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Each link found will be duplicated by substituting &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;$id_cible&lt;/code&gt; into &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;$id_source&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The function returns the number of duplicate links.&lt;/p&gt;
&lt;h2 class=&#034;spip&#034;&gt;
Editing Interface&lt;/h2&gt;
&lt;p&gt;A generic interface &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;#FORMULAIRE_EDITER_LIENS&lt;/code&gt;usable in the templates allows the edition of links.&lt;br class='autobr' /&gt;
&lt;code class='spip_code spip_code_inline' dir='ltr'&gt;#FORMULAIRE_EDITER_LIENS{auteurs,article,23}&lt;/code&gt; will install the form to associate/dissociate the authors of article N&#176;23.&lt;/p&gt;
&lt;p&gt;The links are carried by the link table of the first object passed as argument of the form (authors in the example above).&lt;/p&gt;
&lt;p&gt;This form can be used in several ways:&lt;/p&gt;
&lt;ul class=&#034;spip&#034; role=&#034;list&#034;&gt;&lt;li&gt; &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;#FORMULAIRE_EDITER_LIENS{auteurs,article,23}&lt;/code&gt; to associate authors to article N&#176;23, on the pivot table spip_auteurs_liens&lt;/li&gt;&lt;li&gt; &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;#FORMULAIRE_EDITER_LIENS{auteur,12,articles}&lt;/code&gt; to associate articles with author N&#176;12, on the pivot table spip_auteurs_liens&lt;/li&gt;&lt;li&gt; &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;#FORMULAIRE_EDITER_LIENS{mot,15,auteurs}&lt;/code&gt; to associate authors with the keyword N&#176;15, on the pivot table spip_mots_liens&lt;/li&gt;&lt;li&gt; &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;#FORMULAIRE_EDITER_LIENS{auteurs,mot,15}&lt;/code&gt; to associate authors with the keyword N&#176;15, on the pivot table spip_auteurs_liens&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;We can therefore, through the call syntax, define which objects are associated with each other, as well as the table that supports the links.&lt;/p&gt;
&lt;p&gt;Note: it is possible to filter the list of objects presented according to the value of some of their fields by passing these as the 4th argument in an associative array field=&gt;value:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;spip&#034; class='spip_code spip_code_block language-spip' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;#FORMULAIRE_EDITER_LIENS{auteurs,article,23,#ARRAY{statut,6forum}} &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Will propose only authors whose status is &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;6forum&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;To work, this form requires 2 templates corresponding to the type of associated object. For example, in order to be able to associate or dissociate authors from any other object, the templates&lt;br class='autobr' /&gt; &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;prive/objets/liste/auteurs_lies.html&lt;/code&gt; and &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;prive/objets/liste/auteurs_associer.html&lt;/code&gt; are necessary for the operation of the form. They present the list of objects already associated as well as the selection of objects to be associated.&lt;br class='autobr' /&gt;
SPIP natively includes the necessary views for authors, headings and keywords via the plug-in Mots.&lt;br class='autobr' /&gt;
Plug-ins can make this interface available for new editorial objects by defining these two templates.&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="en">
		<title>post_insertion</title>
		<link>https://programmer.spip.net/post_insertion,729</link>
		<guid isPermaLink="true">https://programmer.spip.net/post_insertion,729</guid>
		<dc:date>2010-11-10T08:09:44Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>en</dc:language>
		<dc:creator>Mark Baber</dc:creator>



		<description>&lt;p&gt;Perform an action after insertion of a new record in the database.&lt;/p&gt;

-
&lt;a href="https://programmer.spip.net/-Some-hooks-" rel="directory"&gt;Pipeline details&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_texte'&gt;&lt;p&gt;This pipeline is a trigger that runs after the insertion of new records into the database. This allows you to perform specific actions after record insertion.&lt;/p&gt;
&lt;p&gt;The pipeline passes the name of the table, the identifier of the record created and an array of the fields and values inserted:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;php&#034; class='spip_code spip_code_block language-php' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;pipeline('post_insertion', array( 'args' =&gt; array( 'table' =&gt; 'spip_articles', 'id_objet' =&gt; $id_article ), 'data' =&gt; $champs ) ); &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="en">
		<title>libelle_association_mots</title>
		<link>https://programmer.spip.net/libelle_association_mots,727</link>
		<guid isPermaLink="true">https://programmer.spip.net/libelle_association_mots,727</guid>
		<dc:date>2010-10-13T06:35:13Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>en</dc:language>
		<dc:creator>Mark Baber</dc:creator>


		<dc:subject>Mots objets</dc:subject>
		<dc:subject>libelle_association_mots</dc:subject>

		<description>&lt;p&gt;Add to the list of object names that can be linked to a keyword group.&lt;/p&gt;

-
&lt;a href="https://programmer.spip.net/-Some-hooks-" rel="directory"&gt;Pipeline details&lt;/a&gt;

/ 
&lt;a href="https://programmer.spip.net/+-Mots-objets-+" rel="tag"&gt;Mots objets&lt;/a&gt;, 
&lt;a href="https://programmer.spip.net/+-libelle_association_mots,446-+" rel="tag"&gt;libelle_association_mots&lt;/a&gt;

		</description>


 <content:encoded>&lt;div class='rss_texte'&gt;&lt;p&gt;The &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;libelle_association_mots&lt;/code&gt; pipeline is called in &lt;a href=&#034;https://git.spip.net/spip/spip/src/branch/master/ecrire/exec/mots_tous.php&#034; class=&#034;spip_glossaire&#034; title=&#034;core&#034; rel=&#034;external&#034;&gt;ecrire/exec/mots_tous.php&lt;/a&gt; to display the text description of the elements that can be linked to a given keyword group. Each object is associated with a language string identifier:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;php&#034; class='spip_code spip_code_block language-php' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;$libelles = array( 'articles'=&gt;'info_articles_2', 'breves'=&gt;'info_breves_02', 'rubriques'=&gt;'info_rubriques', 'syndic'=&gt;'icone_sites_references' ); $libelles = pipeline('libelle_association_mots', $libelles); &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;So the pipeline is passed an associative array with keys being the object names (written in the plural) and values being the names of the corresponding language string identifier.&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="en">
		<title>afficher_nombre_objets_associes_a</title>
		<link>https://programmer.spip.net/afficher_nombre_objets_associes_a,726</link>
		<guid isPermaLink="true">https://programmer.spip.net/afficher_nombre_objets_associes_a,726</guid>
		<dc:date>2010-10-13T06:28:42Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>en</dc:language>
		<dc:creator>Mark Baber</dc:creator>


		<dc:subject>Agenda</dc:subject>
		<dc:subject> afficher_nombre_objets_associes_a</dc:subject>

		<description>&lt;p&gt;Add information to the private interface about the number of elements linked to objects.&lt;/p&gt;

-
&lt;a href="https://programmer.spip.net/-Some-hooks-" rel="directory"&gt;Pipeline details&lt;/a&gt;

/ 
&lt;a href="https://programmer.spip.net/+-Agenda-+" rel="tag"&gt;Agenda&lt;/a&gt;, 
&lt;a href="https://programmer.spip.net/+-afficher_nombre_objets_associes_a,443-+" rel="tag"&gt; afficher_nombre_objets_associes_a&lt;/a&gt;

		</description>


 <content:encoded>&lt;div class='rss_texte'&gt;&lt;p&gt;The &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;afficher_nombre_objets_associes_a&lt;/code&gt; pipeline is called to display information about the number of elements linked to a given editorial object. It can therefore be used to provide the number of elements linked to a given keyword when called from the keyword groups page as shown below:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;php&#034; class='spip_code spip_code_block language-php' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;$texte_lie = pipeline( 'afficher_nombre_objets_associes_a', array( 'args'=&gt;array( 'objet'=&gt;'mot', 'id_objet'=&gt;$id_mot), 'data'=&gt;$texte_lie)); &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The object's type and identifier for which the associated links are to be counted are passed as arguments to the pipeline. The &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;data&lt;/code&gt; key is an array of values that will be comma-separated and concatenated for display purposes.&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="en">
		<title>objet_compte_enfants</title>
		<link>https://programmer.spip.net/objet_compte_enfants,725</link>
		<guid isPermaLink="true">https://programmer.spip.net/objet_compte_enfants,725</guid>
		<dc:date>2010-10-13T06:16:58Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>en</dc:language>
		<dc:creator>Mark Baber</dc:creator>


		<dc:subject>Polyhi&#233;rarchie</dc:subject>
		<dc:subject>objet_compte_enfants</dc:subject>

		<description>&lt;p&gt;Count the children of an object.&lt;/p&gt;

-
&lt;a href="https://programmer.spip.net/-Some-hooks-" rel="directory"&gt;Pipeline details&lt;/a&gt;

/ 
&lt;a href="https://programmer.spip.net/+-Polyhierarchie-+" rel="tag"&gt;Polyhi&#233;rarchie&lt;/a&gt;, 
&lt;a href="https://programmer.spip.net/+-objet_compte_enfants,442-+" rel="tag"&gt;objet_compte_enfants&lt;/a&gt;

		</description>


 <content:encoded>&lt;div class='rss_texte'&gt;&lt;p&gt;This pipeline is used to augment or modify the count of children of an object.&lt;/p&gt;
&lt;p&gt;It is called as show below in the &lt;a href=&#034;https://git.spip.net/spip/spip/src/branch/master/ecrire/inc/rubriques.php&#034; class=&#034;spip_glossaire&#034; title=&#034;core&#034; rel=&#034;external&#034;&gt;ecrire/inc/rubriques.php&lt;/a&gt; file:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;php&#034; class='spip_code spip_code_block language-php' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;// We pass the table of counts in a pipeline so that the plugins can add (or remove) children $compte = pipeline('objet_compte_enfants', array( 'args' =&gt; array( 'objet' =&gt; 'rubrique', 'id_objet' =&gt; $id_rubrique, 'statut' =&gt; 'publie', 'date' =&gt; $date ), 'data' =&gt; $compte ) ); &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;It accepts an argument which is the object for which you wish to count children using the &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;objet&lt;/code&gt; and &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;id_objet&lt;/code&gt; parameters. It can also be passed the status of the children that you want to be used to filter the count.&lt;/p&gt;
&lt;p&gt;In the call above, we requested a count of the &#034;published&#034; children in a specific section.&lt;/p&gt;
&lt;p&gt;The &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;data&lt;/code&gt; contents of the pipeline is an associative array, with the key being the type of object &lt;strong&gt;in the plural&lt;/strong&gt; (e.g. &#034;articles&#034;), and the value being an integer which matches the number of children of that type.&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="en">
		<title>Definition</title>
		<link>https://programmer.spip.net/Definition,709</link>
		<guid isPermaLink="true">https://programmer.spip.net/Definition,709</guid>
		<dc:date>2010-05-29T16:22:48Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>en</dc:language>
		<dc:creator>Mark Baber</dc:creator>


		<dc:subject>Pipelines</dc:subject>
		<dc:subject>spip_pipeline</dc:subject>
		<dc:subject>mes_options.php</dc:subject>
		<dc:subject>plugin.xml</dc:subject>

		<description>
&lt;p&gt;A pipeline is used to make one of SPIP's standard functions perform different or additional functionality by passing it custom-made functions that will be automatically triggered at the right times. &lt;br class='autobr' /&gt;
Declaration within a plugin Any plugin can use any existing pipeline. To do so, it declares it in the plugin.xml file as illustrated here below: xml header_prive cfg_pipeline.php &lt;br class='autobr' /&gt;
Nom: specifies the name of the pipeline to be used, Inclure: specifies the name of the file that (&#8230;)&lt;/p&gt;


-
&lt;a href="https://programmer.spip.net/-Hooks-" rel="directory"&gt;Pipelines&lt;/a&gt;

/ 
&lt;a href="https://programmer.spip.net/+-Pipelines-+" rel="tag"&gt;Pipelines&lt;/a&gt;, 
&lt;a href="https://programmer.spip.net/+-spip_pipeline-+" rel="tag"&gt;spip_pipeline&lt;/a&gt;, 
&lt;a href="https://programmer.spip.net/+-mes_options-php-+" rel="tag"&gt;mes_options.php&lt;/a&gt;, 
&lt;a href="https://programmer.spip.net/+-plugin-xml-+" rel="tag"&gt;plugin.xml&lt;/a&gt;

		</description>


 <content:encoded>&lt;div class='rss_texte'&gt;&lt;p&gt;A &lt;a href='https://programmer.spip.net/Pipeline,708' class=&#034;spip_in&#034;&gt;pipeline&lt;/a&gt; is used to make one of SPIP's standard functions perform different or additional functionality by passing it custom-made functions that will be automatically triggered at the right times.&lt;/p&gt;
&lt;h2 class=&#034;spip&#034;&gt;
Declaration within a plugin&lt;/h2&gt;
&lt;p&gt;Any plugin can use any existing pipeline. To do so, it declares it in the &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;plugin.xml&lt;/code&gt; file as illustrated here below:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;xml&#034; class='spip_code spip_code_block language-xml' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;&lt;pipeline&gt; &lt;nom&gt;header_prive&lt;/nom&gt; &lt;inclure&gt;cfg_pipeline.php&lt;/inclure&gt; &lt;/pipeline&gt; &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul class=&#034;spip&#034; role=&#034;list&#034;&gt;&lt;li&gt; Nom: specifies the name of the pipeline to be used,&lt;/li&gt;&lt;li&gt; Inclure: specifies the name of the file that contains the function to be executed when the pipeline is called (&lt;code class='spip_code spip_code_inline' dir='ltr'&gt;prefixPlugin_PipelineName()&lt;/code&gt;).&lt;/li&gt;&lt;/ul&gt;&lt;h2 class=&#034;spip&#034;&gt;
Declaration without using a plugin&lt;/h2&gt;
&lt;p&gt;One usage of a pipeline outside that of plugins does remain possible. In this case, it must be declared directly in the &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;config/mes_options.php&lt;/code&gt; file:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;php&#034; class='spip_code spip_code_block language-php' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;$GLOBALS['spip_pipeline']['name_of_the_pipeline'] .= &#034;|name_of_the_function&#034;; // Example of adding into the &#034;insert_head&#034; pipeline: $GLOBALS['spip_pipeline']['insert_head'] .= &#034;|name_of_the_function&#034;; function name_of_the_function($flux) { return $flux .= &#034;This text will be appended&#034;; } &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The function called must be declared already at the time that the pipeline is called, with the simplest solution being to declare it as above with a &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;name_of_the_function&lt;/code&gt; function defined in the options file.&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_ps'&gt;&lt;p&gt;Note that SPIP uses &lt;a href='https://programmer.spip.net/The-plugins-cache' class=&#034;spip_in&#034;&gt;a cache of the pipelines used&lt;/a&gt;, and that any new declaration will require this cache to be refreshed. This can be done by navigating to the &#034;Plugin management&#034; page in the private zone (&lt;code class='spip_code spip_code_inline' dir='ltr'&gt;?exec=admin_plugin&lt;/code&gt;).&lt;/p&gt;&lt;/div&gt;
		</content:encoded>


		

	</item>
<item xml:lang="en">
		<title>sql_quote</title>
		<link>https://programmer.spip.net/sql_quote,700</link>
		<guid isPermaLink="true">https://programmer.spip.net/sql_quote,700</guid>
		<dc:date>2010-05-17T14:04:52Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>en</dc:language>
		<dc:creator>Mark Baber</dc:creator>


		<dc:subject>sql_quote</dc:subject>

		<description>&lt;p&gt;Filters (or escapes) an SQL parameter&lt;/p&gt;

-
&lt;a href="https://programmer.spip.net/-The-SQL-API-" rel="directory"&gt;The SQL API&lt;/a&gt;

/ 
&lt;a href="https://programmer.spip.net/+-sql_quote,438-+" rel="tag"&gt;sql_quote&lt;/a&gt;

		</description>


 <content:encoded>&lt;div class='rss_texte'&gt;&lt;p&gt;The &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;sql_quote()&lt;/code&gt; function is used to secure or filter data content (with apostrophes) in order to avoid SQL injection attacks. This function is very important and must be used whenever content is provided by user data entry. The &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;sql_insertq&lt;/code&gt;, &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;sql_updateq&lt;/code&gt;, and &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;sql_replace&lt;/code&gt; functions automatically apply this filtering for any inserted data (but not for the other parameters like &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;$where&lt;/code&gt; which ought to be filtered nonetheless anyway).&lt;/p&gt;
&lt;p&gt;It accepts 3 parameters:&lt;/p&gt;
&lt;ol class=&#034;spip&#034; role=&#034;list&#034;&gt;&lt;li&gt; &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;$val&lt;/code&gt; is the expression to be filtered,&lt;/li&gt;&lt;li&gt; &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;$serveur&lt;/code&gt;,&lt;/li&gt;&lt;li&gt; &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;$type&lt;/code&gt; optional, is the type of value expected. This would equal &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;int&lt;/code&gt; for an integer value.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;It is used as shown below:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;php&#034; class='spip_code spip_code_block language-php' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;$charstring = sql_quote(&#034;David's car&#034;); $fieldname = sql_quote($fieldname); sql_select('column', 'table', 'titre=' . sql_quote($titre)); sql_updateq('table', array('column'=&gt;'value'), 'titre=' . sql_quote($titre)); &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Whenever a numeric identifier is expected, which is often the case for primary keys, the filtering may simply apply the PHP &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;intval()&lt;/code&gt; function (the value zero will be returned if the content passed is not numeric):&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;php&#034; class='spip_code spip_code_block language-php' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;$id_table = intval(_request('id_table')); sql_select('column', 'table', 'id_table=' . intval($id)); &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="en">
		<title>Processing without AJAX</title>
		<link>https://programmer.spip.net/Procesing-without-AJAX</link>
		<guid isPermaLink="true">https://programmer.spip.net/Procesing-without-AJAX</guid>
		<dc:date>2010-05-17T13:54:23Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>en</dc:language>
		<dc:creator>Mark Baber</dc:creator>


		<dc:subject>AJAX</dc:subject>
		<dc:subject>CVT form processing</dc:subject>
		<dc:subject>refuser_traiter_formulaire_ajax</dc:subject>

		<description>
&lt;p&gt;If a form is called using AJAX but then redirects to another page after finishing its processes, this would require Javascript tricks (managed by SPIP) to capture that redirection and effectively send the browser to another URL instead of the normal response. &lt;br class='autobr' /&gt;
Whenever a redirection is certain, it is possible to prevent AJAX for the form's processing, while still maintaining it for the verification phase. This means that the form would be reloaded in the event of an error in verifier(), but (&#8230;)&lt;/p&gt;


-
&lt;a href="https://programmer.spip.net/-PHP-processing-" rel="directory"&gt;PHP processing&lt;/a&gt;

/ 
&lt;a href="https://programmer.spip.net/+-AJAX,93-+" rel="tag"&gt;AJAX&lt;/a&gt;, 
&lt;a href="https://programmer.spip.net/+-Traiter-CVT-+" rel="tag"&gt;CVT form processing&lt;/a&gt;, 
&lt;a href="https://programmer.spip.net/+-refuser_traiter_formulaire_ajax-+" rel="tag"&gt;refuser_traiter_formulaire_ajax&lt;/a&gt;

		</description>


 <content:encoded>&lt;div class='rss_texte'&gt;&lt;p&gt;If a form is called using AJAX but then redirects to another page after finishing its processes, this would require Javascript tricks (managed by SPIP) to capture that redirection and effectively send the browser to another URL instead of the normal response.&lt;/p&gt;
&lt;p&gt;Whenever a redirection is certain, it is possible to prevent AJAX for the form's processing, while still maintaining it for the verification phase. This means that the form would be reloaded in the event of an error in &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;verifier()&lt;/code&gt;, but if the processing is executed, then the whole page will be immediately reloaded.&lt;/p&gt;
&lt;p&gt;To do this, you must call the &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;refuser_traiter_formulaire_ajax()&lt;/code&gt;function &lt;strong&gt;right at the start&lt;/strong&gt; of the processes:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;php&#034; class='spip_code spip_code_block language-php' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;function formulaires_nom_traiter(){ // Prevent AJAX processing since we know that the form will redirect elsewhere refuser_traiter_formulaire_ajax(); // Execute the processes // Return values return array( 'redirect' =&gt; 'Another URL' ); } &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="en">
		<title>Executing the processes</title>
		<link>https://programmer.spip.net/Executing-the-processes</link>
		<guid isPermaLink="true">https://programmer.spip.net/Executing-the-processes</guid>
		<dc:date>2010-05-17T13:44:16Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>en</dc:language>
		<dc:creator>Mark Baber</dc:creator>


		<dc:subject>Forms</dc:subject>
		<dc:subject>CVT form processing</dc:subject>
		<dc:subject>formulaires_xxx_traiter</dc:subject>

		<description>
&lt;p&gt;Whenever the verification function doesn't return an error, the form then moves on to the traiter() (processing) function. It is in this function that the desired operations should be performed with the data from the form (send an email, update the database, etc.). &lt;br class='autobr' /&gt;
The function must return an associative table: php function formulaires_nom_traiter() // Execute the processes // Return values return array( 'message_ok' =&gt; 'Excellent !', // or perhaps 'message_erreur' =&gt; (&#8230;)&lt;/p&gt;


-
&lt;a href="https://programmer.spip.net/-PHP-processing-" rel="directory"&gt;PHP processing&lt;/a&gt;

/ 
&lt;a href="https://programmer.spip.net/+-Formulaires-+" rel="tag"&gt;Forms&lt;/a&gt;, 
&lt;a href="https://programmer.spip.net/+-Traiter-CVT-+" rel="tag"&gt;CVT form processing&lt;/a&gt;, 
&lt;a href="https://programmer.spip.net/+-formulaires_xxx_traiter-+" rel="tag"&gt;formulaires_xxx_traiter&lt;/a&gt;

		</description>


 <content:encoded>&lt;div class='rss_texte'&gt;&lt;p&gt;Whenever the &lt;a href='https://programmer.spip.net/Checking-the-submitted-values' class=&#034;spip_in&#034;&gt;verification function&lt;/a&gt; doesn't return an error, the form then moves on to the &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;traiter()&lt;/code&gt; (processing) function. It is in this function that the desired operations should be performed with the data from the form (send an email, update the database, etc.).&lt;/p&gt;
&lt;p&gt;The function must return an associative table:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;php&#034; class='spip_code spip_code_block language-php' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;function formulaires_nom_traiter(){ // Execute the processes // Return values return array( 'message_ok' =&gt; 'Excellent !', // or perhaps 'message_erreur' =&gt; 'Sorry, an error has occurred.' ); } &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 class=&#034;spip&#034;&gt;
Important values&lt;/h2&gt;
&lt;p&gt;Here are some of the values frequently returned:&lt;/p&gt;
&lt;ul class=&#034;spip&#034; role=&#034;list&#034;&gt;&lt;li&gt; &lt;strong&gt;message_ok&lt;/strong&gt; is used to return a pleasant message to the user indicating that everything processed normally.&lt;/li&gt;&lt;li&gt; &lt;strong&gt;message_erreur&lt;/strong&gt;, on the other hand, is used to return an error message when the processing didn't work correctly.&lt;/li&gt;&lt;li&gt; &lt;strong&gt;editable&lt;/strong&gt;, as for loading, this is used to display or hide the editable portion of the form. By default it is set to &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;false&lt;/code&gt;, but you may assign it a value of &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;true&lt;/code&gt; if your form can be used several times in a row.&lt;/li&gt;&lt;li&gt; &lt;strong&gt;redirect&lt;/strong&gt; is a URL which is used to tell SPIP which page it should redirect to after processing the form. By default, the page will loop back to itself.&lt;/li&gt;&lt;/ul&gt;&lt;h2 class=&#034;spip&#034;&gt;
The formulaire_traiter (form_process) pipeline&lt;/h2&gt;
&lt;p&gt;Once the &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;formulaires_nom_traiter&lt;/code&gt; function has completed, the &lt;a href='https://programmer.spip.net/formulaire_traiter,710' class=&#034;spip_in&#034;&gt;formulaire_traiter&lt;/a&gt; pipeline is executed, thereby enabling other plugins to complete the processes for this form.&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="en">
		<title>AJAX</title>
		<link>https://programmer.spip.net/AJAX,712</link>
		<guid isPermaLink="true">https://programmer.spip.net/AJAX,712</guid>
		<dc:date>2010-05-17T13:34:39Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>en</dc:language>
		<dc:creator>Mark Baber</dc:creator>


		<dc:subject>AJAX</dc:subject>

		<description>
&lt;p&gt;The term AJAX, an acronym for &#034;Asynchronous JavaScript and XML&#034;, is used to describe a collection of technologies used to create asynchronous client-server interactions. &lt;br class='autobr' /&gt;
These constructions, which make it possible to only request a partial page update from the server (or partial element update), can significantly reduce the data volumes that need to be transmitted and often make an application appear more responsive to its users.&lt;/p&gt;


-
&lt;a href="https://programmer.spip.net/-Glossary-" rel="directory"&gt;Glossary&lt;/a&gt;

/ 
&lt;a href="https://programmer.spip.net/+-AJAX,93-+" rel="tag"&gt;AJAX&lt;/a&gt;

		</description>


 <content:encoded>&lt;div class='rss_texte'&gt;&lt;p&gt;The term &lt;a href=&#034;https://en.wikipedia.org/wiki/AJAX&#034; class=&#034;spip_glossaire&#034; rel=&#034;external&#034;&gt;AJAX&lt;/a&gt;, an acronym for &#034;&lt;i&gt;Asynchronous JavaScript and XML&lt;/i&gt;&#034;, is used to describe a collection of technologies used to create asynchronous client-server interactions.&lt;/p&gt;
&lt;p&gt;These constructions, which make it possible to only request a partial page update from the server (or partial element update), can significantly reduce the data volumes that need to be transmitted and often make an application appear more responsive to its users.&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>



</channel>

</rss>
