<?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/"
>

<channel xml:lang="fr">
	<title>SPIP</title>
	<link>http://www.spip.net/</link>
	<description>Syst&#232;me de Publication pour Internet</description>
	<language>fr</language>
	<generator>SPIP - www.spip.net</generator>

	<image>
		<title>SPIP</title>
		<url>http://www.spip.net/local/cache-vignettes/L144xH49/siteon0-56029.jpg</url>
		<link>http://www.spip.net/</link>
		<height>49</height>
		<width>144</width>
	</image>



<item xml:lang="ca">
		<title>Estructura general d'SPIP</title>
		<link>http://www.spip.net/ca_article5242.html</link>
		<guid isPermaLink="true">http://www.spip.net/ca_article5242.html</guid>
		<dc:date>2010-08-31T21:31:38Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>ca</dc:language>
		<dc:creator>merce</dc:creator>



		<description>SPIP &#233;s un CMS &#250;nic en el seu g&#232;nere. M&#233;s enll&#224; del seu funcionament que es pot qualificar de &#171; data driven &#187;, &#233;s a dir &#171; pilotat per les dades &#187; (els famosos BUCLES), ha proporcionat sempre en primera l&#237;nia els mitjans de &#171; personalitzar &#187;, adaptar ell seu funcionament i la seva presentaci&#243; al gust i a les necessitats pr&#242;pies del lloc. Primerament era la possibilitat de proporcionar els seus propis esquelets (plantilles), d'adjuntar-hi fragments de PHP espec&#237;fics i sobrecarregar les funcions de base (...)

-
&lt;a href="http://www.spip.net/rubrique487.html" rel="directory"&gt;Presentaci&#243;&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_texte'&gt;&lt;p&gt;SPIP &#233;s un CMS &#250;nic en el seu g&#232;nere.&lt;/p&gt; &lt;p&gt;M&#233;s enll&#224; del seu funcionament que es pot qualificar de &#171; &lt;i&gt;data driven&lt;/i&gt; &#187;, &#233;s a dir &#171; &lt;i&gt;pilotat per les dades&lt;/i&gt; &#187; (els famosos BUCLES), ha proporcionat sempre en primera l&#237;nia els mitjans de &#171; &lt;i&gt;personalitzar&lt;/i&gt; &#187;, adaptar ell seu funcionament i la seva presentaci&#243; al gust i a les necessitats pr&#242;pies del lloc.&lt;/p&gt; &lt;p&gt;Primerament era la possibilitat de proporcionar els seus propis &lt;strong&gt;esquelets&lt;/strong&gt; (plantilles), d'adjuntar-hi fragments de PHP espec&#237;fics i sobrecarregar les funcions de base del &#171; &lt;i&gt;core&lt;/i&gt; &#187; (les &lt;code class='spip_code' dir='ltr'&gt;function xxx_dist()&lt;/code&gt; que veurem m&#233;s endavant).&lt;/p&gt; &lt;p&gt;La versi&#243; 1.9 introdueix un mecanisme complementari, &lt;strong&gt;els connectors o plugins&lt;/strong&gt;. Han sorgit de la voluntat d'obrir SPIP a funcionalitats suplement&#224;ries sense fer que el seu nucli (el &#171; &lt;i&gt;core&lt;/i&gt; &#187; sigui m&#233;s feixuc). La tend&#232;ncia actual &#233;s tanmateix la d'alleugerir aquest &lt;i&gt;core&lt;/i&gt; transferint les funcionalitats opcionals als connectors. &lt;br /&gt;SPIP 2.0 s'hauria d'haver redu&#239;t i lliurar amb una col&#183;lecci&#243; de connectors &lt;i&gt;de base&lt;/i&gt; que l'usuari activar&#224; segons els utilitzi realment o no. Per exemple, &#233;s tracta que les breus no estiguin m&#233;s a dins del &lt;i&gt;core&lt;/i&gt; sin&#243; que estiguin en un connector opcional. En efecte, nom&#233;s una part de les instal&#183;lacions les utilitza i &#233;s preferible no alentir el sistema de base per aquells que no en tenen necessitat.&lt;/p&gt; &lt;p&gt;Per&#242; ja, SPIP 1,9 ha renovat completament els directoris que el constitueixen per tal de separar els elements en funci&#243; de la seva vida, del fet que siguin modificables i de la seva pertinen&#231;a al que &#233;s propi o espec&#237;fic al lloc o al codi de base. Un dels altres objectius apuntats aqu&#237; &#233;s la possibilitat de compartir el nucli : que diversos llocs puguin compartir una base de codi com&#250;.&lt;/p&gt; &lt;p&gt;Estudiem primer aquesta nova organitzaci&#243; de directoris, d'all&#242; que pertany a SPIP del que &#233;s propi del lloc, d'all&#242; que queda constant del que es mou.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;&lt;span style=&quot;font-size:large;&quot;&gt;Distribuci&#243;&lt;/span&gt;&lt;/h3&gt;
&lt;h3 class=&quot;spip&quot;&gt;arrel del lloc&lt;/h3&gt;
&lt;p&gt;L'arrel, que ha estat completament buidada i no cont&#233; pr&#224;cticament m&#233;s que &lt;i&gt;index.php&lt;/i&gt; que redirigeix cap a &lt;i&gt;spip.php&lt;/i&gt;, &#233;s actualment l'&#250;nic punt d'entrada de la part p&#250;blica del lloc.&lt;/p&gt; &lt;p&gt;&lt;i&gt;inc-public.php3&lt;/i&gt; &#233;s un fitxer fantasma per assegurar la compatibilitat ascendent.&lt;/p&gt; &lt;p&gt;&lt;i&gt;.htaccess&lt;/i&gt; opcional per l'url rewriting essencialment.&lt;/p&gt; &lt;p&gt;&lt;i&gt;win_png.htc&lt;/i&gt; [&lt;a href='#nb1' class='spip_note' rel='footnote' title='suprimit a partir de la versi&#243; SPIP 2.0' id='nh1'&gt;1&lt;/a&gt;] i &lt;i&gt;rien.gif&lt;/i&gt; per assegurar la transpar&#232;ncia png amb MSIE&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;ecrire/&lt;/h3&gt;
&lt;p&gt;Aquesta carpeta cont&#233; actualment el conjunt de fitxers interpretables pel cant&#243; del servidor (PHP i MySQL) i aquest, tant per la visualitzaci&#243; &lt;i&gt;p&#250;blica&lt;/i&gt; (subcarpeta &lt;i&gt;public/&lt;/i&gt;) com per la visualitzaci&#243; &lt;i&gt;privada&lt;/i&gt;.&lt;/p&gt; &lt;p&gt;El nom d'aquesta carpeta &#233;s hist&#242;ric, &#233;s all&#224; on antigament s'hi trobava el codi que permetia modificar el contingut del lloc. Paradoxalment, actualment &#233;s una carpeta no modificable i mai hi escriurem a dins. En una instal&#183;laci&#243; normal, cont&#233; nom&#233;s els scripts lliurats per la distribuci&#243; i &#233;s gaireb&#233; imperatiu no fer-hi cap tipus de modificaci&#243;.&lt;/p&gt; &lt;p&gt;El seu script &lt;i&gt;index.php&lt;/i&gt; &#233;s el punt d'entrada d'&lt;i&gt;ecrire/&lt;/i&gt;, la part privada del lloc.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;dist/ [&lt;a href='#nb2' class='spip_note' rel='footnote' title='A partir de la versi&#243; d'SPIP 2.0, aquesta carpeta ha estat reanomenada com a (...)' id='nh2'&gt;2&lt;/a&gt;]&lt;/h3&gt;
&lt;p&gt;Cont&#233; tots els arxius lliurats als client (HTML, Javascript, fulls d'estil, imatges de diferents formats) i tamb&#233; els patrons de disseny anomenats &lt;i&gt;esquelets&lt;/i&gt;. Aquests esquelets s&#243;n interpretats al cant&#243; del servidor per tal d'enviar al client un text purament MIME (la majoria de les vegades HTML, per&#242; tamb&#233; RSS, SVG... veure JS).&lt;/p&gt; &lt;p&gt;S&#243;n els models est&#224;ndard lliurats amb SPIP, i tampoc aquest s'han de modificar per&#242; si que es poden &lt;i&gt;substituir&lt;/i&gt; copiant-los a dins de &lt;i&gt;squelettes/&lt;/i&gt;&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;oo/ [&lt;a href='#nb3' class='spip_note' rel='footnote' title='suprimit a partir de la versi&#243; SPIP 2.0' id='nh3'&gt;3&lt;/a&gt;]&lt;/h3&gt;
&lt;p&gt;Aquesta carpeta proporciona el mode &#171; &lt;i&gt;accessibilitat&lt;/i&gt; &#187; d'SPIP (en mode text). Cont&#233;, essencialment, un &#237;ndex que envia de nou al sistema est&#224;ndard.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;&lt;span style=&quot;font-size:large;&quot;&gt;Adaptaci&#243;&lt;/span&gt;&lt;/h3&gt;
&lt;h3 class=&quot;spip&quot;&gt;config/&lt;/h3&gt;
&lt;p&gt;Aquesta carpeta, creada en el moment de la instal&#183;laci&#243;, cont&#233; l'script de connexi&#243; a la base de dades : &lt;code class='spip_code' dir='ltr'&gt;connect.php&lt;/code&gt; i l'script que fixa el tipus dels arxius creats pel servidor : &lt;code class='spip_code' dir='ltr'&gt;chmod.php&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;&#201;s tamb&#233; aqu&#237; on es posarem les opcions universals del lloc, en un fitxer (a crear) : &lt;code class='spip_code' dir='ltr'&gt;mes_options.php&lt;/code&gt; [&lt;a href='#nb4' class='spip_note' rel='footnote' title='Llegiu : El fitxer mes_options.php' id='nh4'&gt;4&lt;/a&gt;]&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;IMG/&lt;/h3&gt;
&lt;p&gt;Cont&#233; tots els documents originals (mida real) del lloc. Est&#224; subdividit en subcarpetes per tipus de documents.
&lt;br /&gt;En el moment de la instal&#183;laci&#243;, cont&#233; nom&#233;s document de prova per la fabricaci&#243; d'imatges.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;squelettes/&lt;/h3&gt;
&lt;p&gt;&#201;s aqu&#237; on posarem tots els arxius : scripts, imatges, formularis..., propis del lloc, seguint la mateixa estructura que &lt;code class='spip_code' dir='ltr'&gt;ecrire/&lt;/code&gt; o &lt;code class='spip_code' dir='ltr'&gt;dist/&lt;/code&gt;. Per exemple, per tornar a definir el &lt;i&gt;resum&lt;/i&gt; del lloc, copiem/adaptem l'arxiu &lt;code class='spip_code' dir='ltr'&gt;sommaire.html&lt;/code&gt; del directori &lt;code class='spip_code' dir='ltr'&gt;dist/&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;Posem aqu&#237;, sobretot, l'script &lt;code class='spip_code' dir='ltr'&gt;mes_fonctions.php&lt;/code&gt; (a crear) que es carregada cada cop que es torna a calcular la p&#224;gina. Fixem-nos que &#233;s possible fer un &lt;code class='spip_code' dir='ltr'&gt;xxx_fonctions.php&lt;/code&gt; que ser&#224; carregat nom&#233;s quan ser&#224; demanada la p&#224;gina &lt;code class='spip_code' dir='ltr'&gt;xxx&lt;/code&gt; (per exemple : &lt;code class='spip_code' dir='ltr'&gt;sommaire_fonctions.php&lt;/code&gt;).&lt;/p&gt; &lt;p&gt;En el moment de la instal&#183;laci&#243;, aquesta carpeta no existeix, l'hem de crear.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;plugins/&lt;/h3&gt;
&lt;p&gt;Aquesta carpeta (que tamb&#233; s'ha de crear) rep les subcarpetes de cada connector (plugin). Per exemple, el connector &lt;i&gt;crayons&lt;/i&gt; es troba situat a &lt;code class='spip_code' dir='ltr'&gt;plugins/crayons/&lt;/code&gt;.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;&lt;span style=&quot;font-size:large;&quot;&gt;Temporal&lt;/span&gt;&lt;/h3&gt;
&lt;h3 class=&quot;spip&quot;&gt;local/&lt;/h3&gt;
&lt;p&gt;Cont&#233; tots els fitxers (re-)calculables a partir dels documents i dades del lloc.&lt;/p&gt; &lt;p&gt;Es tracta b&#224;sicament de &lt;i&gt;caches&lt;/i&gt; d'imatges redu&#239;des. Hi trobem tamb&#233; les caches calculades per certs plugins com &#171; &lt;i&gt;coloration_code&lt;/i&gt; &#187;.&lt;/p&gt; &lt;p&gt;Aquesta carpeta es pot buidar, no tindr&#224; cap m&#233;s cost que el seu nou c&#224;lcul.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;tmp/&lt;/h3&gt;
&lt;p&gt;Aqu&#237; hi ha emmagatzemats tots els arxius temporals com les &quot;caches&quot; d'esquelets, les sessions, els logotips etc.&lt;/p&gt; &lt;p&gt;Cont&#233; tamb&#233; el subdirectori &lt;code class='spip_code' dir='ltr'&gt;dump/&lt;/code&gt; on hi ha arxivades les c&#242;pies de seguretat de les dades.&lt;/p&gt; &lt;p&gt;Aquesta carpeta pot estar sempre buida.&lt;/p&gt;&lt;/div&gt;
		&lt;hr /&gt;
		&lt;div class='rss_notes'&gt;&lt;p&gt;[&lt;a href='#nh1' id='nb1' class='spip_note' title='Notes 1' rev='footnote'&gt;1&lt;/a&gt;] suprimit a partir de la versi&#243; &lt;a href=&quot;http://www.spip.net/ca_article3838.html&quot; class='spip_in'&gt;&lt;span style='color: #273494;'&gt;SPIP 2.0&lt;/span&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;[&lt;a href='#nh2' id='nb2' class='spip_note' title='Notes 2' rev='footnote'&gt;2&lt;/a&gt;] A partir de la versi&#243; d'&lt;a href=&quot;http://www.spip.net/ca_article3838.html&quot; class='spip_in'&gt;&lt;span style='color: #273494;'&gt;SPIP 2.0&lt;/span&gt;&lt;/a&gt;, aquesta carpeta ha estat reanomenada com a &lt;code class='spip_code' dir='ltr'&gt;squelettes-dist/&lt;/code&gt;.
&lt;br /&gt;Llegiu : &lt;a href=&quot;http://www.spip.net/ca_article4154.html&quot; class='spip_in' hreflang='ca'&gt;Actualitzaci&#243; de la versi&#243; 1 .9 .x a la 2 .0 .x&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;[&lt;a href='#nh3' id='nb3' class='spip_note' title='Notes 3' rev='footnote'&gt;3&lt;/a&gt;] suprimit a partir de la versi&#243; &lt;a href=&quot;http://www.spip.net/ca_article3838.html&quot; class='spip_in'&gt;&lt;span style='color: #273494;'&gt;SPIP 2.0&lt;/span&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;[&lt;a href='#nh4' id='nb4' class='spip_note' title='Notes 4' rev='footnote'&gt;4&lt;/a&gt;] Llegiu : &lt;a href=&quot;http://www.spip.net/ca_article4842.html&quot; class='spip_in' hreflang='ca'&gt;El fitxer mes_options.php&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_ps'&gt;&lt;p&gt;Vegeu tamb&#233; : &lt;a href=&quot;http://www.spip.net/ca_article3615.html&quot; class='spip_out'&gt;Ampliar SPIP&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
		</content:encoded>


		

	</item>
<item xml:lang="ca">
		<title>|singulier_ou_pluriel{ xxx:cha&#238;ne_un, xxx:cha&#238;ne_plusieurs}</title>
		<link>http://www.spip.net/ca_article5247.html</link>
		<guid isPermaLink="true">http://www.spip.net/ca_article5247.html</guid>
		<dc:date>2010-08-31T20:35:01Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>ca</dc:language>
		<dc:creator>merce</dc:creator>


		<dc:subject>SPIP 2.0</dc:subject>
		<dc:subject>singulier_ou_pluriel</dc:subject>

		<description>El filtre |singulier_ou_pluriel permet fer variar una visualitzaci&#243; en funci&#243; del valor num&#232;ric retornat per l'etiqueta a la que s'ha aplicat. El filtre |singulier_ou_pluriel s'utilitza la majoria de les vegades per concordar (singular o plural) les cadenes de llengua en funci&#243; del retorn d'una etiqueta. Exemple En el nostre fitxer local_xx.php, declarem: 'nombre_truc_un' =&gt; 'hi ha 1 retorn en aquest bucle.', 'nombre_truc_plus' =&gt; 'hi ha @nb@ retorns en aquest bucle.' Despr&#233;s escrivim en el (...)

-
&lt;a href="http://www.spip.net/rubrique594.html" rel="directory"&gt;filtres&lt;/a&gt;

/ 
&lt;a href="http://www.spip.net/@spip20" rel="tag"&gt;SPIP 2.0&lt;/a&gt;, 
&lt;a href="http://www.spip.net/@singulier_ou_pluriel" rel="tag"&gt;singulier_ou_pluriel&lt;/a&gt;

		</description>


 <content:encoded>&lt;div class='rss_chapo'&gt;&lt;p&gt;El filtre &lt;code class='spip_code' dir='ltr'&gt;|singulier_ou_pluriel&lt;/code&gt; permet fer variar una visualitzaci&#243; en funci&#243; del valor num&#232;ric retornat per l'etiqueta a la que s'ha aplicat.&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;p&gt;El filtre &lt;code class='spip_code' dir='ltr'&gt;|singulier_ou_pluriel&lt;/code&gt; s'utilitza la majoria de les vegades per concordar (singular o plural) les cadenes de llengua en funci&#243; del retorn d'una etiqueta.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Exemple&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;En el nostre fitxer &lt;i&gt;local_xx.php&lt;/i&gt;, declarem:&lt;/p&gt;
&lt;div style='text-align: left;' class='spip_code' dir='ltr'&gt;&lt;code&gt;'nombre_truc_un' =&gt; 'hi ha 1 retorn en aquest bucle.',&lt;br /&gt; 'nombre_truc_plus' =&gt; 'hi ha @nb@ retorns en aquest bucle.'&lt;/code&gt;&lt;/div&gt;
&lt;p&gt;Despr&#233;s escrivim en el nostre bucle:&lt;/p&gt;
&lt;div style='text-align: left;' class='spip_code' dir='ltr'&gt;&lt;code&gt;&lt;BOUCLE_a(ARTICLES) {crit&#232;re...}&gt;&lt;br /&gt; ...&lt;br /&gt; &lt;/BOUCLE_a&gt;&lt;br /&gt; [(#TOTAL_BOUCLE|singulier_ou_pluriel{local:nombre_truc_un, local:nombre_truc_plus, nb})]&lt;br /&gt; &lt;/B_a&gt;&lt;/code&gt;&lt;/div&gt;
&lt;p&gt;- Si el bucle nom&#233;s retorna un enregistrament, mostrar&#224;: &lt;i&gt;&lt;/p&gt;
&lt;div style='text-align: left;' class='spip_code' dir='ltr'&gt;&lt;code&gt;hi ha 1 retorn en aquest bucle. &lt;/code&gt;&lt;/div&gt;
&lt;p&gt;&lt;/i&gt;&lt;/p&gt; &lt;p&gt;- Si el bucle retourna 36 enregistraments (per exemple), mostrar&#224;:
&lt;i&gt;&lt;/p&gt;
&lt;div style='text-align: left;' class='spip_code' dir='ltr'&gt;&lt;code&gt;hi ha 36 retorns en aquest bucle. &lt;/code&gt;&lt;/div&gt;
&lt;p&gt;&lt;/i&gt;&lt;/p&gt; &lt;p&gt;Fixeu-vos que es pot passar un 3r. argument a aquest filtre: &lt;code class='spip_code' dir='ltr'&gt;nb&lt;/code&gt; que permet integrar a la cadena el valor num&#232;ric retornat per l'etiqueta.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Atenci&#243;&lt;/strong&gt;:
&lt;br /&gt;Aquest filtre espera expl&#237;citament &lt;i&gt;&#237;tems&lt;/i&gt; de llengua com arguments. Caldr&#224;, per tant, que no li passem &lt;i&gt;etiquetes&lt;/i&gt; de llengua:
&lt;br /&gt;&lt;code class='spip_code' dir='ltr'&gt;|singulier_ou_pluriel{module:item_un, module:item_plus}&lt;/code&gt;
&lt;br /&gt;&#233;s l'escriptura correcta;
&lt;br /&gt;&lt;code class='spip_code' dir='ltr'&gt;|singulier_ou_pluriel{&lt;:module:item_un:&gt;, &lt;:module:item_plus:&gt;}&lt;/code&gt;
&lt;br /&gt;&#233;s una escriptura &lt;strong&gt;dolenta&lt;/strong&gt;.&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="ca">
		<title>{fusion champ_sql}</title>
		<link>http://www.spip.net/ca_article5246.html</link>
		<guid isPermaLink="true">http://www.spip.net/ca_article5246.html</guid>
		<dc:date>2010-08-29T14:24:31Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>ca</dc:language>
		<dc:creator>merce</dc:creator>


		<dc:subject>fusion</dc:subject>

		<description>El criteri fusion permet reagrupar els resultats d'un bucle SPIP segons els diferents valors d'un camp. Si el bucle sense el criteri fusion champ_sql porta diversos registres que tenen el mateix valor de champ_sql, llavors, el bucle amb el criteri fusion champ_sql nom&#233;s en presentar&#224; un d'aquests. Per aix&#242;, la petici&#243; SQL generada integra una instrucci&#243; GROUP BY. Exemple 'pedag&#242;gic' El seg&#252;ent bucle mostrar&#224; els t&#237;tols de tots els articles del lloc: #TITRE El bucle seg&#252;ent, amb un criteri fusion (...)

-
&lt;a href="http://www.spip.net/rubrique549.html" rel="directory"&gt;criteris&lt;/a&gt;

/ 
&lt;a href="http://www.spip.net/@fusion" rel="tag"&gt;fusion&lt;/a&gt;

		</description>


 <content:encoded>&lt;div class='rss_texte'&gt;&lt;p&gt;El criteri &lt;code class='spip_code' dir='ltr'&gt;fusion&lt;/code&gt; permet reagrupar els resultats d'un bucle SPIP segons els diferents valors d'un camp.&lt;/p&gt; &lt;p&gt;Si el bucle sense el criteri &lt;code class='spip_code' dir='ltr'&gt;{fusion champ_sql}&lt;/code&gt; porta diversos registres que tenen el mateix valor de &lt;code class='spip_code' dir='ltr'&gt;champ_sql&lt;/code&gt;, llavors, el bucle amb el criteri &lt;code class='spip_code' dir='ltr'&gt;{fusion champ_sql}&lt;/code&gt; nom&#233;s en presentar&#224; un d'aquests.&lt;/p&gt; &lt;p&gt;Per aix&#242;, la petici&#243; SQL generada integra una instrucci&#243; &lt;code class='spip_code' dir='ltr'&gt;GROUP BY&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Exemple 'pedag&#242;gic'&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;El seg&#252;ent bucle mostrar&#224; els t&#237;tols de tots els articles del lloc:&lt;/p&gt; &lt;form action='' method='get'&gt;&lt;div&gt;
&lt;input type='hidden' name='exec' value='' /&gt;
&lt;textarea readonly='readonly' cols='40' rows='3' class='spip_cadre' dir='ltr'&gt;&lt;BOUCLE_tous(ARTICLES)&gt; #TITRE &lt;/BOUCLE_tous&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;/form&gt; &lt;p&gt;El bucle seg&#252;ent, amb un criteri &lt;code class='spip_code' dir='ltr'&gt;fusion&lt;/code&gt; que porti a la secci&#243;, partir&#224; igualment de tots els articles, per&#242; els reagrupar&#224; per id_rubrique id&#232;ntica, i presentar&#224; al final nom&#233;s un &#250;nic article per secci&#243;.&lt;/p&gt; &lt;form action='' method='get'&gt;&lt;div&gt;
&lt;input type='hidden' name='exec' value='' /&gt;
&lt;textarea readonly='readonly' cols='40' rows='3' class='spip_cadre' dir='ltr'&gt;&lt;BOUCLE_extrait(ARTICLES){fusion id_rubrique}&gt; #TITRE &lt;/BOUCLE_extrait&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;/form&gt; &lt;p&gt;&lt;strong&gt;Exemple 'aplicat'&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;El seg&#252;ent bucle mostra els 10 missatges m&#233;s recents del f&#242;rum, escollits per data i procedents d'una IP diferent:&lt;/p&gt; &lt;form action='' method='get'&gt;&lt;div&gt;
&lt;input type='hidden' name='exec' value='' /&gt;
&lt;textarea readonly='readonly' cols='40' rows='5' class='spip_cadre' dir='ltr'&gt;&lt;BOUCLE_comment(FORUMS){plat}{par date}{inverse}{0,10}{fusion ip}&gt; &lt;INCLURE{fond=inc/intro_commentaire}{id_forum}&gt; &lt;/BOUCLE_comment&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;/form&gt; &lt;p&gt;&lt;strong&gt;Atenci&#243;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Un criteri de classificaci&#243; &lt;code class='spip_code' dir='ltr'&gt;{par xxx}&lt;/code&gt; combinat amb el criteri &lt;code class='spip_code' dir='ltr'&gt;{fusion champ_sql}&lt;/code&gt; no ens retornar&#224; necess&#224;riament els resultats esperats.&lt;/p&gt; &lt;p&gt;- &lt;code class='spip_code' dir='ltr'&gt;&lt;BOUCLE_a1(ARTICLES){tout}{par id_article}&gt;&lt;/code&gt;
torna els articles classificats per id_article (de l'1 al 10000 per exemple).&lt;/p&gt; &lt;p&gt;- &lt;code class='spip_code' dir='ltr'&gt;&lt;BOUCLE_a2(ARTICLES){par id_article}{fusion id_rubrique}&gt;&lt;/code&gt;
torna els articles, classificats per id_article despr&#233;s d'agrupar-los per id_rubrique, per&#242; aquests reagrupaments estan fets desordenadament i, a priori, sense cap classificaci&#243; especial!&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Vegeu tamb&#233;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;- el criteri &lt;a href=&quot;http://www.spip.net/ca_article4714.html&quot; class='spip_in'&gt;&lt;code class='spip_code' dir='ltr'&gt;{doublons}&lt;/code&gt;&lt;/a&gt;
&lt;br /&gt;- el filtre &lt;a href=&quot;http://www.spip.net/ca_article4684.html&quot; class='spip_in'&gt;&lt;code class='spip_code' dir='ltr'&gt;|unique&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="en">
		<title>Add your own style!</title>
		<link>http://www.spip.net/en_article5245.html</link>
		<guid isPermaLink="true">http://www.spip.net/en_article5245.html</guid>
		<dc:date>2010-08-23T16:00:10Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>en</dc:language>
		<dc:creator>Mark</dc:creator>



		<description>You are able to modify the style rules supplied with SPIP and add in your own by creating your own style sheet. Details below... If you already know the CSS language (otherwise first read this article: &quot;Introduction aux feuilles de style&quot;), you can very easily modify the appearance of your site without even having to know anything about SPIP's internal language of loops and tags. Creating your own stylesheet When you first install SPIP, the squelette templates are distributed with several (...)

-
&lt;a href="http://www.spip.net/rubrique293.html" rel="directory"&gt;Changing the layout and graphics&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_chapo'&gt;&lt;p&gt;You are able to modify the style rules supplied with SPIP and add in your own by creating your own style sheet. Details below...&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;p&gt;&lt;strong&gt;If you already know the CSS language&lt;/strong&gt; (otherwise first read this article: &quot;&lt;a href=&quot;http://www.spip.net/en_article2462.html&quot; class='spip_in' hreflang='en'&gt;Introduction to style sheets&lt;/a&gt;&quot;), you can very easily modify the appearance of your site without even having to know anything about SPIP's internal language of loops and tags.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;Creating your own stylesheet&lt;/h3&gt;
&lt;p&gt;When you first install SPIP, the squelette templates are distributed with several &quot;external stylesheets&quot; which combine together the rules used to generate the graphical mark-up of your site. You can modify these files and add your own rules to them, but it's generally a better idea to do these modifications and additions in your own CSS stylesheet so that your creativity is not obliterated when you next install an update to the SPIP core software.&lt;/p&gt; &lt;blockquote class=&quot;spip&quot;&gt;
&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt; never work directly in the files supplied by default, otherwise you will run the very serious risk of losing all your customisations when you update SPIP itself! To avoid losing the changes, almost make copies of any &quot;core&quot; files that you do decide to change anyway.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;1. Create a file named &lt;tt&gt;my_styles.css&lt;/tt&gt; (or whatever it is you have decided to call it) and store it in your &lt;a href=&quot;http://www.spip.net/en_article4907.html&quot; class='spip_in' hreflang='en'&gt;&quot;squelettes&quot; folder&lt;/a&gt;. You will copy into this file all the style rule definitions that you would like to use and modify; but for the purposes of this tutorial, we're going to assume that you're starting off with a completely empty stylesheet.&lt;/p&gt; &lt;p&gt;2. Call this stylesheet in the header section of your squelette templates, i.e. between the &lt;code class='spip_code' dir='ltr'&gt;&lt;head&gt;&lt;/code&gt; tags in the HTML file (right after the &lt;tt&gt;title&lt;/tt&gt; and other similar &lt;tt&gt;meta&lt;/tt&gt; tag fields). This call should look something like this:&lt;/p&gt; &lt;form action='' method='get'&gt;&lt;div&gt;
&lt;input type='hidden' name='exec' value='' /&gt;
&lt;textarea readonly='readonly' cols='40' rows='2' class='spip_cadre' dir='ltr'&gt;&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;#CHEMIN{my_styles.css}&quot; /&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;/form&gt; &lt;p&gt;Often enough, you only need a single stylesheet for all of the graphical mark-up rules for a site, but you still create as many such stylesheets in the same manner as this as you so choose. It's often the case that some webmasters separate style rules depending on the medium and/or the targeted browser, simply to keep things clear and simple.&lt;/p&gt; &lt;blockquote class=&quot;spip&quot;&gt;
&lt;p&gt;&lt;i&gt;History:&lt;/i&gt; Since &lt;a href=&quot;http://www.spip.net/en_article3211.html&quot; class='spip_in'&gt;SPIP 1.8.2&lt;/a&gt;, we have been using:&lt;/p&gt;
&lt;form action='' method='get'&gt;&lt;div&gt;
&lt;input type='hidden' name='exec' value='' /&gt;
&lt;textarea readonly='readonly' cols='40' rows='2' class='spip_cadre' dir='ltr'&gt;&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;#DOSSIER_SQUELETTE/mes_styles.css&quot; /&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;/form&gt; &lt;p&gt;Since &lt;a href=&quot;http://www.spip.net/en_article3416.html&quot; class='spip_in'&gt; &lt;span style='color: darkviolet;'&gt;S&lt;/span&gt;&lt;span style='color: blue;'&gt;P&lt;/span&gt;&lt;span style='color: green;'&gt;I&lt;/span&gt;&lt;span style='color: salmon;'&gt;P&lt;/span&gt; &lt;span style='color: green;'&gt;1&lt;/span&gt;&lt;span style='color: blue;'&gt;.&lt;/span&gt;&lt;span style='color: darkviolet;'&gt;9&lt;/span&gt;&lt;/a&gt;, the &lt;tt&gt;#CHEMIN&lt;/tt&gt; tag has replaced and imrpoved on the &lt;tt&gt;#DOSSIER_SQUELETTE&lt;/tt&gt; tag.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 class=&quot;spip&quot;&gt;Respecting the &quot;cascade&quot;&lt;/h3&gt;
&lt;p&gt;It is important to keep in mind how the &lt;strong&gt;cascade&lt;/strong&gt; component of &lt;abbr title=&quot;Cascading Style Sheets&quot; lang=&quot;en&quot;&gt;CSS&lt;/abbr&gt;: when several style definitions are applicable to a single given element, &lt;strong&gt;the closest style for the element is the one that takes priority&lt;/strong&gt;. What is &lt;i&gt;close&lt;/i&gt; is affected by the order in which the style rules are &quot;read&quot;, so this is therefore a very important matter.&lt;/p&gt; &lt;p&gt;- &lt;i&gt; &lt;strong&gt;External stylesheets&lt;/strong&gt; &lt;/i&gt;&lt;/p&gt; &lt;p&gt;If you use several stylesheets, note that the order in which they are referenced in the page header is important. If you &lt;i&gt;first&lt;/i&gt; call &lt;tt&gt;my_styles.css&lt;/tt&gt; and &lt;i&gt;then&lt;/i&gt; &lt;tt&gt;spip_style.css&lt;/tt&gt;, then the rules in the latter file will take priority, because they are &lt;i&gt;closer&lt;/i&gt; to the elements to which they apply, which means that they will override your rules. Remember, then, to call your stylesheets in the opposite order:&lt;/p&gt; &lt;div style='text-align: left;' class='spip_code' dir='ltr'&gt;&lt;code&gt;&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;#CHEMIN{spip_style.css}&quot;&gt;&lt;br /&gt; &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;#CHEMIN{mes_styles.css}&quot;&gt;&lt;/code&gt;&lt;/div&gt;
&lt;p&gt;- &lt;i&gt; &lt;strong&gt;Styles defined in the HTML code&lt;/strong&gt; &lt;/i&gt;&lt;/p&gt; &lt;p&gt;If you do not want to touch the CSS files, you can still continue to insert, in all the necessary spots, the graphical instructions directly into the HTML code of your squelette templates: either by defining some style rules in the &lt;tt&gt;head&lt;/tt&gt; section, and/or by attaching the style rules directly onto the HTML tags inside the page.&lt;/p&gt; &lt;p&gt;The style attached directly to the tags, being the &lt;i&gt;closest&lt;/i&gt; to the elements in question, will take priority over those defined in the &lt;tt&gt;head&lt;/tt&gt;, which themselves will take priority over any &lt;i&gt;external&lt;/i&gt; stylesheets.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;Styles that have &quot;class&quot;&lt;/h3&gt;
&lt;p&gt;So how can we change, for example, the appearance of all of the sub-headings generated by SPIP? This is actually very easy. Open up your &lt;tt&gt;my_styles.css&lt;/tt&gt; file in a text editor and add the following line:&lt;/p&gt; &lt;p&gt;&lt;code class='spip_code' dir='ltr'&gt;h3.spip { color: red; font-size: 18px; }&lt;/code&gt;&lt;/p&gt; &lt;p&gt;Now reload the page: all of the sub-headings now magically appear in red; note that if you have any other &lt;tt&gt;h3&lt;/tt&gt; content on your page, then they will &lt;i&gt;not&lt;/i&gt; be displayed in red.&lt;/p&gt; &lt;p&gt;A brief explanation of the syntax of this page formatting rule is in order:&lt;/p&gt; &lt;p&gt;- &lt;code class='spip_code' dir='ltr'&gt;h3.spip&lt;/code&gt; just before the braces means that the rule only applies to the &lt;code class='spip_code' dir='ltr'&gt;&lt;h3&gt;&lt;/code&gt; tags that have been assigned a &lt;code class='spip_code' dir='ltr'&gt;class&lt;/code&gt; attribute equal to &quot;&lt;code class='spip_code' dir='ltr'&gt;spip&lt;/code&gt;&quot;. Note: none of the &lt;code class='spip_code' dir='ltr'&gt;&lt;h3&gt;&lt;/code&gt; tags without that attribute, and no other tags that do have that attribute but are not actually &lt;code class='spip_code' dir='ltr'&gt;&lt;h3&gt;&lt;/code&gt; tags, will be affected by this rule.&lt;/p&gt; &lt;p&gt;If you add in your own style rules, note that the value assigned to the &lt;tt&gt;class&lt;/tt&gt; attribute is completely arbitrary. The only thing that matters, is that you use the same name in the HTML code (&lt;code class='spip_code' dir='ltr'&gt;class=&quot;toto&quot;&lt;/code&gt;) and in your CSS stylesheet (&lt;code class='spip_code' dir='ltr'&gt;.toto { ... }&lt;/code&gt;).
&lt;br /&gt;Remember, though, that you can not actually rename the &lt;tt&gt;class&lt;/tt&gt; attributes associated with the code generated by SPIP (which have style definitions all combined in &lt;tt&gt;&lt;a href=&quot;http://www.spip.net/en_article2433.html&quot; class='spip_in' hreflang='en'&gt;spip_style.css&lt;/a&gt;&lt;/tt&gt;).&lt;/p&gt; &lt;p&gt;- The braces contain the list of graphical properties associated with the style rule as defined. In our example we note the the colour is set to be read and that the font in question will be displayed with a size of 18 pixels.&lt;/p&gt; &lt;p&gt;Note that all of the properties that are not defined in this list retain their normal values for the tag in question: in our example, the &lt;tt&gt;h3&lt;/tt&gt; will always still generate a text displayed in bold, because nothing in your style definition has instructed that &quot;standard&quot; rule to be overwritten.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;Managing the cache&lt;/h3&gt;
&lt;p&gt;The fact that the style rules are defined in a separate file has an important consequence. In fact this file, as opposed to your squelette templates, is not managed by SPIP (it doesn't need it at all!). This means that &lt;strong&gt;if you modify a stylesheet, you do not need to empty the SPIP cache: just reload the page from your browser (although some browsers may require you to specifically reload a new stylesheet with a special command - after time, the browser will do this automatically, but at least Firefox will probably require a CTRL-F5 instead of the normal F5 for the refresh).&lt;/strong&gt; So having external stylesheets actually makes graphically reformatting your pages an easier task.&lt;/p&gt; &lt;p&gt;Remember still that your stylesheet must be declared in your HTML files, and that they must be recalculated any time that you change them for their contents to be reflected on the browser screen.&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="en">
		<title>Several logos for a single article</title>
		<link>http://www.spip.net/en_article5244.html</link>
		<guid isPermaLink="true">http://www.spip.net/en_article5244.html</guid>
		<dc:date>2010-08-20T18:03:27Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>en</dc:language>
		<dc:creator>Mark</dc:creator>



		<description>In order to give some graphical &quot;life&quot; to a site, it's a common desire to use different logos (and in particular, logos of different sizes) for the same article depending on where that article is referenced or used. For example, you might want to use a &quot;big&quot; logo on the home page in order to draw attention to the &quot;article of the day&quot;, and then use a &quot;small&quot; logo where that article is included in the site's general navigation mechanism. Recalling that since SPIP 1.7, SPIP 1.7.2 , SPIP (...)

-
&lt;a href="http://www.spip.net/rubrique251.html" rel="directory"&gt;A few examples of loops&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_chapo'&gt;&lt;p&gt;In order to give some graphical &quot;life&quot; to a site, it's a common desire to use different logos (and in particular, logos of different sizes) for the same article depending on where that article is referenced or used.&lt;/p&gt; &lt;p&gt;For example, you might want to use a &quot;big&quot; logo on the home page in order to draw attention to the &quot;article of the day&quot;, and then use a &quot;small&quot; logo where that article is included in the site's general navigation mechanism.&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;p&gt;Recalling that since &lt;a href=&quot;http://www.spip.net/en_article2464.html&quot; class='spip_in'&gt;&lt;span style='color: red;'&gt;S&lt;/span&gt;&lt;span style='color: orange;'&gt;P&lt;/span&gt;&lt;span style='color: yellow;'&gt;I&lt;/span&gt;&lt;span style='color: green;'&gt;P &lt;/span&gt;&lt;span style='color: blue;'&gt;1&lt;/span&gt;&lt;span style='color: black;'&gt;.&lt;/span&gt;&lt;span style='color: darkviolet;'&gt;7&lt;/span&gt;, &lt;span style='color: red;'&gt;S&lt;/span&gt;&lt;span style='color: orange;'&gt;P&lt;/span&gt;&lt;span style='color: yellow;'&gt;I&lt;/span&gt;&lt;span style='color: green;'&gt;P &lt;/span&gt;&lt;span style='color: blue;'&gt;1&lt;/span&gt;&lt;span style='color: black;'&gt;.&lt;/span&gt;&lt;span style='color: darkviolet;'&gt;7&lt;/span&gt;&lt;span style='color: black;'&gt;.2&lt;/span&gt; &lt;/a&gt;, SPIP webmasters have been able to use the &lt;a href=&quot;http://www.spip.net/en_article2465.html&quot; class='spip_in' hreflang='en'&gt;&lt;code class='spip_code' dir='ltr'&gt;image_reduire&lt;/code&gt;&lt;/a&gt; function to create various versions (in size) of a single &lt;i&gt;same&lt;/i&gt; logo assigned to an article. But we will need to employ a different method if we have several &lt;i&gt;different&lt;/i&gt; logos for any single given article.&lt;/p&gt; &lt;p&gt;Some webmasters have created individual methods based on the differentiated usage of the &quot;normal&quot; logo and the &quot;mouseover&quot; or &quot;hover&quot; logo. For example: the &quot;normal&quot; logo might be used as a &quot;small logo&quot; for the article in a navigational context (called using the &lt;code class='spip_code' dir='ltr'&gt;#LOGO_ARTICLE_NORMAL&lt;/code&gt; tag), and then use the &quot;mouseover&quot; logo (called using the &lt;code class='spip_code' dir='ltr'&gt;#LOGO_ARTICLE_SURVOL&lt;/code&gt; tag) to access the &quot;big logo&quot; when linking to the article from the home page. Although it works, this sort of approach complicates the squelette templates and means that you can't use the &quot;mouseover&quot; logo for its intended purpose which SPIP would automatically provision itself in the &quot;normally&quot; appropriate circumstances. In addition, it doesn't really leave a lot of room for flexibility.&lt;/p&gt; &lt;p&gt;Since version &lt;a href=&quot;http://www.spip.net/fr_article1832.html&quot; class='spip_in' hreflang='fr'&gt;&lt;span style='color: green;'&gt;SPIP 1.4&lt;/span&gt; &lt;/a&gt;, it has been possible to attach &lt;i&gt;documents&lt;/i&gt; to articles (and later also to sections/rubriques). We're going to explain here below how you can use these attached documents to create several logos for a given article.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;The general principle&lt;/h3&gt;
&lt;p&gt;- We will continue to use the article's two logos to display just the &quot;normal&quot; logos (those that will appear in the most commonly accessed navigation links, as is the case for a section that lists its constituent articles), which means we can enjoy using the standard simple mechanisms for logos in SPIP with automatic handling of the &quot;mouseover&quot; logo (and simultaneously re-enabling the ordinary usage of the &lt;code class='spip_code' dir='ltr'&gt;#LOGO_ARTICLE&lt;/code&gt; and &lt;code class='spip_code' dir='ltr'&gt;#LOGO_ARTICLE_RUBRIQUE&lt;/code&gt; tags).&lt;/p&gt; &lt;p&gt;- We will choose to attach to each article concerned an additional document (generally an image in either GIF, JPEG or PNG format), which we will then systematically assign the same title name. This is all we need to be able to display this document (by referencing with this assigned standard name) instead of the &quot;normal&quot; article logo whenever we have a need to do so.&lt;/p&gt; &lt;p&gt;- This method then clearly makes it possible for us to assign as many different logos as we want for a given article (not just one big logo and one small logo, but why not a thumbnail logo as well to brighten up a title zone for the article as well, etc.).&lt;/p&gt; &lt;p&gt;- We will then see that thanks to SPIP's loops, it becomes very easy to determine within our templates if such a &quot;big&quot; logo exists (the one bearing the name that we so chose), and to take appropriate action (displaying it instead of the &quot;normal&quot; logo) for any specific piece of text in our database - or to use a completely different kind of graphical component instead.&lt;/p&gt; &lt;p&gt;- With the continuing innovation of modern technology, proprietary formats and broadband access, these specific versions of the logos, being as they are simply attached documents, can be in various other formats instead of just standard image &quot;stills&quot;. We could just as easily display Flash or Shockwave animations, video clips, whatever you have at hand, instead of the &quot;big&quot; logos that we illustrate in this article.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;Installing the documents and the choice of their names&lt;/h3&gt;
&lt;p&gt;- We have decided (quite arbitrarily, and you should follow or modify as suits your needs) that the attached documents that will be used as the &quot;big&quot; logos will all be named as &quot;spip_logo&quot;: it is this &quot;spip_logo&quot; document that will be displayed on the home page of our site instead of the &quot;normal&quot; article logo entered in the &quot;normal&quot; fashion in the editor's private zone.&lt;/p&gt; &lt;p&gt;We will soon other names later in this exercise to create more delicate effects: but right now, we will decide that all such names will be prefixed with &quot;spip_&quot;. (This will allow us, in the normal display of documents attached to an article, to exclude all the ones that have names starting with &quot;spip_&quot;. This will mean that our using attached documents as alternative logos will not interfere with the display of other images, a portfolio of photos, for example.)&lt;/p&gt; &lt;p&gt;- For an article published online (so that we can play around with our squelette templates when testing them), we simply attach:&lt;/p&gt; &lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; one normal logo; we could, if we wanted, also add a &quot;mouseover&quot; logo which would be automatically displayed when the site visitor moved their mouse over the normal logo;&lt;/li&gt;&lt;/ul&gt;
&lt;dl class='spip_document_2525 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://www.spip.net/local/cache-vignettes/L227xH297/logo_spip-02d9f.jpg' width='227' height='297' alt='JPEG - 33.6 kb' style='height:297px;width:227px;' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-2525 spip_doc_titre' style='width:227px;'&gt;&lt;strong&gt;The &quot;normal&quot; logo&lt;/strong&gt;&lt;/dt&gt;
&lt;dd class='crayon document-descriptif-2525 spip_doc_descriptif' style='width:227px;'&gt;The logo uploaded using the standard method for article logos. Normally this will be an image of modest proportions.
&lt;/dd&gt;
&lt;/dl&gt;
&lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; one &quot;attached document&quot; (using the &quot;ATTACH A DOCUMENT&quot; panel); to make things simple, we attach just an ordinary image (JPEG, GIF, PNG); once this document is installed (&quot;uploaded&quot;), we will assign it a name of &quot;spip_logo&quot;. There - that's all you need to do in the private zone... SPIP will automatically display this document at the bottom of the page for the article in the private zone, displaying the name of the file as it's stored in the server directory, its title that you just assigned (&quot;spip_logo&quot;) and the image's dimensions measured in pixels.&lt;/li&gt;&lt;/ul&gt;
&lt;dl class='spip_document_2527 spip_documents spip_documents_center'&gt;
&lt;dt&gt;&lt;img src='http://www.spip.net/local/cache-vignettes/L177xH414/logo_attached-3dc99.jpg' width='177' height='414' alt='JPEG - 40.7 kb' style='height:414px;width:177px;' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-2527 spip_doc_titre' style='width:177px;'&gt;&lt;strong&gt;The &quot;spip_logo&quot; document&lt;/strong&gt;&lt;/dt&gt;
&lt;dd class='crayon document-descriptif-2527 spip_doc_descriptif' style='width:177px;'&gt;The only requirement is to assign this document a title of &quot;spip_logo&quot;. There is no need to install a preview thumbnail. If this were a multimedia document (Flash, Shockwave...), you will need to manually specify its dimensions in pixels.
&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;- We choose what we will do with this document entitled &quot;spip_logo&quot;: it will be displayed on the home page of the site instead of the normal logo for the most recently published article. Doing this will mean that the home page can display a &quot;BIG&quot; image to highlight the &quot;article of the day&quot;.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;Displaying the &quot;spip_logo&quot; on the site's home page&lt;/h3&gt;
&lt;p&gt;- We start by inserting a very simple loop to display the most recently published article on the site and its &quot;normal&quot; logo. (In all of the examples which follow, the HTML code has been reduced to its strict minimum for the sake of clarity: you will still need to &quot;wrap it up&quot; nicely in the correct position and framing that suits your graphical charter.)&lt;/p&gt; &lt;form action='' method='get'&gt;&lt;div&gt;
&lt;input type='hidden' name='exec' value='' /&gt;
&lt;textarea readonly='readonly' cols='40' rows='5' class='spip_cadre' dir='ltr'&gt;&lt;BOUCLE_article_of_the_day(ARTICLES){doublons}{par date}{inverse}{0,1}&gt; #LOGO_ARTICLE &lt;h1&gt;#TITRE&lt;/h1&gt; &lt;/BOUCLE_article_of_the_day&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;/form&gt; &lt;p&gt;This very simple loop will display the first article (&lt;code class='spip_code' dir='ltr'&gt;{0,1}&lt;/code&gt;) amongst all ARTICLES in the database, selected in order of publication date (&lt;code class='spip_code' dir='ltr'&gt;{par date}&lt;/code&gt;) from most recent to earliest published (&lt;code class='spip_code' dir='ltr'&gt;{inverse}&lt;/code&gt;). This means that we will definitively be displaying the article most recently published on the site. Inside that loop, we display the logo of the article followed by the title of the article.&lt;/p&gt; &lt;p&gt;- We said before, that we would like to display the document attached to the article that has a name of &quot;spip_logo&quot; instead of the normal logo. In that case then, the code becomes:&lt;/p&gt; &lt;form action='' method='get'&gt;&lt;div&gt;
&lt;input type='hidden' name='exec' value='' /&gt;
&lt;textarea readonly='readonly' cols='40' rows='9' class='spip_cadre' dir='ltr'&gt;&lt;BOUCLE_article_of_the_day(ARTICLES){doublons}{par date}{inverse}{0,1}&gt; &lt;BOUCLE_logo_article_of_the_day(DOCUMENTS){id_article}{titre=spip_logo}&gt; [(#EMBED_DOCUMENT)] &lt;/BOUCLE_logo_article_of_the_day&gt; &lt;h1&gt;#TITRE&lt;/h1&gt; &lt;/BOUCLE_article_of_the_day&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;/form&gt; &lt;p&gt;The &lt;tt&gt;BOUCLE_logo_article_of_the_day&lt;/tt&gt; loop selects from the documents attached to that article (&lt;code class='spip_code' dir='ltr'&gt;{id_article}&lt;/code&gt;) the one that is named &quot;spip_logo&quot; (&lt;code class='spip_code' dir='ltr'&gt;{titre=spip_logo}&lt;/code&gt;). Inside that loop, we request the display of that attached document using (&lt;code class='spip_code' dir='ltr'&gt;#EMBED_DOCUMENT&lt;/code&gt;).&lt;/p&gt; &lt;p&gt;The usage of &lt;tt&gt;#EMBED_DOCUMENT&lt;/tt&gt; inside squelette templates makes it possible to directly insert the document into the page using the standard loop mechanism. SPIP takes care of creating the corresponding code for the images or other multimedia files (depending on the type of the file that has been attached and embedded).&lt;/p&gt; &lt;p&gt;- Once inconvenience: if the article does not have an attached document titled &quot;spip_logo&quot;, then the code above will only display the title. So we will then make another modification, which will allows the display of the &quot;normal&quot; logo for the article if in fact that article does not have a specific attached document nominated for this purpose. &lt;i&gt;Attention:&lt;/i&gt; once you've understood this concept, there aren't any other subtleties to learn to achieve all of the effects detailed further below...&lt;/p&gt; &lt;form action='' method='get'&gt;&lt;div&gt;
&lt;input type='hidden' name='exec' value='' /&gt;
&lt;textarea readonly='readonly' cols='40' rows='11' class='spip_cadre' dir='ltr'&gt;&lt;BOUCLE_article_of_the_day(ARTICLES){doublons}{par date}{inverse}{0,1}&gt; &lt;BOUCLE_logo_article_of_the_day(DOCUMENTS){id_article}{titre=spip_logo}&gt; [(#EMBED_DOCUMENT)] &lt;/BOUCLE_logo_article_of_the_day&gt; #LOGO_ARTICLE &lt;//B_logo_article_of_the_day&gt; &lt;h1&gt;#TITRE&lt;/h1&gt; &lt;/BOUCLE_article_of_the_day&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;/form&gt; &lt;p&gt;We have simply added the call to the &quot;normal&quot; logo (&lt;code class='spip_code' dir='ltr'&gt;#LOGO_ARTICLE&lt;/code&gt;) as the alternative text (the code located just before the closing &lt;code class='spip_code' dir='ltr'&gt;&lt;//B...&gt;&lt;/code&gt; of a loop, that will be displayed if the loop does not return any results itself - in this case, that will be when there isn't any document attached to the article that bears the title of &quot;spip_logo&quot;).&lt;/p&gt; &lt;p&gt;So we have obtained the result we were looking for:
&lt;br /&gt;- if there is an attached document linked to the article to which we have assigned the title &quot;spip_logo&quot;, then it will be directly displayed;
&lt;br /&gt;- &lt;i&gt;otherwise&lt;/i&gt;, it will be the &quot;normal&quot; logo that will be displayed.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;Excluding these specific documents form the normal display of attached documents&lt;/h3&gt;
&lt;p&gt;In the articles template, we display the attached articles using the &lt;tt&gt;BOUCLE_documents_joints&lt;/tt&gt;, which is constructed with the following criteria applied to it:&lt;/p&gt; &lt;p&gt;&lt;code class='spip_code' dir='ltr'&gt;&lt;BOUCLE_documents_joints(DOCUMENTS){id_article}{mode=document}{doublons}&gt;&lt;/code&gt;&lt;/p&gt; &lt;p&gt;This calls the DOCUMENTS linked to this article (&lt;code class='spip_code' dir='ltr'&gt;{id_article}&lt;/code&gt;), which are definitely attached documents and not just images (&lt;code class='spip_code' dir='ltr'&gt;{mode=document}&lt;/code&gt;) and which have not already been displayed inside the text of the article by using the &lt;code class='spip_code' dir='ltr'&gt;&lt;EMBxx&gt;&lt;/code&gt; shortcut (&lt;code class='spip_code' dir='ltr'&gt;{doublons}&lt;/code&gt;).&lt;/p&gt; &lt;p&gt;We modify this code to prevent the display, inside of this loop (which is a kind of document &quot;portfolio&quot;), of any documents that have a title starting with &quot;spip_&quot; (we do not want to display here the &quot;BIG&quot; logo that is used on the site's homepage):&lt;/p&gt; &lt;form action='' method='get'&gt;&lt;div&gt;
&lt;input type='hidden' name='exec' value='' /&gt;
&lt;textarea readonly='readonly' cols='40' rows='2' class='spip_cadre' dir='ltr'&gt;&lt;BOUCLE_documents_joints(DOCUMENTS){id_article}{titre!==^spip\_}{mode=document}{doublons}&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;/form&gt; &lt;p&gt;The &lt;code class='spip_code' dir='ltr'&gt;{titre!==^spip\_}&lt;/code&gt; criteria is a regular expression, the syntax of which has been very strictly formalised. It selects the documents that have a title which does not match the regular expression (the &lt;code class='spip_code' dir='ltr'&gt;!==&lt;/code&gt; means &quot;not matching the regular expression&quot;): the first characters (the &lt;code class='spip_code' dir='ltr'&gt;^&lt;/code&gt; symbol is used to denote the start of the text string) are &quot;spip&quot; followed by &quot;_&quot; (in regular expressions, we are required to use an &quot;escape&quot; character in order to specify the literal &quot;_&quot; by using the carat just beforehand, this &quot;\_&quot;, since the &quot;_&quot; character plays a special role in regular expression syntax).&lt;/p&gt; &lt;p&gt;This criteria then selects attached documents with a title that &lt;i&gt;does not start with &quot;spip_&quot;&lt;/i&gt;.&lt;/p&gt; &lt;p&gt;&lt;i&gt;The demonstration of the general principle is now finished, and you've now got the key ingredients necessary for you to work with on your own site. The examples that follow are simply some additional variants on the theme.&lt;/i&gt;&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;Always display a big logo at the top of the page&lt;/h3&gt;
&lt;p&gt;I have decided, once again quite arbitrarily, that there should always be a big image displayed at the top of the page for my articles. This is a graphical layout choice all of my own: in order to ensure some graphical consistency to my site, I'm going to display a large format version of an image linked to the article up at the top of the page (a variation on the &quot;big&quot; logo principle above), and if the article doesn't have one of its own assigned, then I will use a &quot;default&quot; image that I have stored elsewhere on my site.&lt;/p&gt; &lt;p&gt;- Still using the same principle: I attach a document to my article and assign it the title of &quot;spip_top&quot;. (To make sure that the document does not display in the &quot;portfolio&quot; generated by the preceding &lt;tt&gt;BOUCLE_documents_joints&lt;/tt&gt; loop, I have selected a different title that starts with &quot;spip_&quot;.)&lt;/p&gt; &lt;p&gt;In my articles template, I simply display this document at the top of the page with this:&lt;/p&gt; &lt;form action='' method='get'&gt;&lt;div&gt;
&lt;input type='hidden' name='exec' value='' /&gt;
&lt;textarea readonly='readonly' cols='40' rows='4' class='spip_cadre' dir='ltr'&gt;&lt;BOUCLE_doc_top(DOCUMENTS){id_article}{titre=spip_top}&gt; #EMBED_DOCUMENT &lt;/BOUCLE_doc_top&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;/form&gt; &lt;p&gt;As in the previous example, I display the document linked to the article for this page which has a title of &quot;spip_top&quot;. Too easy.&lt;/p&gt; &lt;p&gt;- As with the earlier example, I would like to display the article logo instead of that document doesn't exist for this article:&lt;/p&gt; &lt;form action='' method='get'&gt;&lt;div&gt;
&lt;input type='hidden' name='exec' value='' /&gt;
&lt;textarea readonly='readonly' cols='40' rows='6' class='spip_cadre' dir='ltr'&gt;&lt;BOUCLE_doc_top(DOCUMENTS){id_article}{titre=spip_top}&gt; #EMBED_DOCUMENT &lt;/BOUCLE_doc_top&gt; #LOGO_ARTICLE &lt;//B_doc_top&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;/form&gt; &lt;p&gt;- But this still isn't quite the desired result. I insist, for reasons of graphical consistency, to make sure that I always have a big image in the predetermined image dimensions.&lt;/p&gt; &lt;p&gt;So I'm going to create some substitution images (still quite arbitrary on my part), for use in the event that an article doesn't have any image of its own at all. These images that I create meet the graphical demands that I have stipulated (e.g. they have the same dimensions as the documents that I normally use for the &quot;spip_top&quot; image).&lt;/p&gt; &lt;p&gt;So somewhere on my site, I've create a section to host such substitution documents &quot;in bulk&quot;. I need to activate the use of documents linked to sections/rubriques. (I could also create an article which hosts all these documents, and then not need to activate the availability of attaching documents to sections. But in the end, the code wouldn't really be much different.) Assuming that this section was number 18 (a number which SPIP automatically assigns when the section is created). I then install all of my substitution (or default) documents into this section number 18. In this case, there's no use giving each of these &quot;bulk&quot; documents any title.&lt;/p&gt; &lt;p&gt;In order to randomly call a document stored in this section, all I need to do use the criteria shown below:&lt;/p&gt; &lt;form action='' method='get'&gt;&lt;div&gt;
&lt;input type='hidden' name='exec' value='' /&gt;
&lt;textarea readonly='readonly' cols='40' rows='4' class='spip_cadre' dir='ltr'&gt;&lt;BOUCLE_doc_substitution(DOCUMENTS){id_rubrique=18}{0,1}{par hasard}&gt; #EMBED_DOCUMENT &lt;/BOUCLE_doc_substitution&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;/form&gt; &lt;p&gt;(Attention: the &lt;code class='spip_code' dir='ltr'&gt;{par hasard}&lt;/code&gt; criteria does not mean that the image selected will necessarily be a different one each time that the page is visited, only that it will be selected at random each time that the page is actually recalculated.)&lt;/p&gt; &lt;p&gt;&lt;i&gt;We need to take care that the site navigation does not include section 19, which does not need to shown to site visitors at all. The criteria &lt;code class='spip_code' dir='ltr'&gt;{id_rubrique!=18}&lt;/code&gt; &lt;i&gt;will take care of that for us.&lt;/i&gt;&lt;/p&gt; &lt;p&gt;- To complete the installation of our mechanism, we need to insert this loop displaying the randomly selected section 18 substitution document as the alternative text in our &lt;code class='spip_code' dir='ltr'&gt;BOUCLE_doc_top&lt;/code&gt; loop (instead of the &lt;code class='spip_code' dir='ltr'&gt;#LOGO_ARTICLE&lt;/code&gt;):&lt;/p&gt; &lt;form action='' method='get'&gt;&lt;div&gt;
&lt;input type='hidden' name='exec' value='' /&gt;
&lt;textarea readonly='readonly' cols='40' rows='9' class='spip_cadre' dir='ltr'&gt;&lt;BOUCLE_doc_top(DOCUMENTS){id_article}{titre=spip_top}&gt; #EMBED_DOCUMENT &lt;/BOUCLE_doc_top&gt; &lt;BOUCLE_doc_substitution(DOCUMENTS){id_rubrique=18}{0,1}{par hasard}&gt; #EMBED_DOCUMENT &lt;/BOUCLE_doc_substitution&gt; &lt;//B_doc_top&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;/form&gt; &lt;h3 class=&quot;spip&quot;&gt;Displaying a graphical title&lt;/h3&gt;
&lt;p&gt;Still using the same principle, we are now going to display a graphical version of the article's title. This involves an image that has been created using a graphical design programme, which uses the article's title shown with a particularly carefully selected typographical layout (shadow effects, colour gradients, fancy fonts...).&lt;/p&gt; &lt;p&gt;- We will state that this will be a attached document linked to the article that we will always name &quot;spip_title&quot;.&lt;/p&gt; &lt;p&gt;- To call this document, at the location where the &lt;code class='spip_code' dir='ltr'&gt;#TITRE&lt;/code&gt; of the article would normally be displayed, we will include a now familiar looking loop instead:&lt;/p&gt; &lt;form action='' method='get'&gt;&lt;div&gt;
&lt;input type='hidden' name='exec' value='' /&gt;
&lt;textarea readonly='readonly' cols='40' rows='4' class='spip_cadre' dir='ltr'&gt;&lt;BOUCLE_doc_title(DOCUMENTS){id_article}{titre=spip_title}&gt; #EMBED_DOCUMENT &lt;/BOUCLE_doc_title&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;/form&gt; &lt;p&gt;&lt;i&gt;Note again that this method not only allows us to use an image to display the title, but we could also use a Flash animation or a video clip... In such cases, you will need to specify manually what the pixel dimensions of your article are supposed to be.&lt;/i&gt;&lt;/p&gt; &lt;p&gt;- So let's finish of the mechanism: if there is no attached document bearing the title of &quot;spip_title&quot;, then we need to display the necessary information as standard ordinary HTML text:&lt;/p&gt; &lt;form action='' method='get'&gt;&lt;div&gt;
&lt;input type='hidden' name='exec' value='' /&gt;
&lt;textarea readonly='readonly' cols='40' rows='10' class='spip_cadre' dir='ltr'&gt;&lt;BOUCLE_doc_title(DOCUMENTS){id_article}{titre=spip_title}&gt; #EMBED_DOCUMENT &lt;/BOUCLE_doc_title&gt; [&lt;div&gt;(#SURTITRE|majuscules)&lt;/div&gt;] &lt;div&gt;&lt;font size=6&gt;#TITRE&lt;/font&gt;&lt;/div&gt; [&lt;div&gt;(#SOUSTITRE|majuscules)&lt;/div&gt;] &lt;br&gt;[(#DATE|nom_jour)] [(#DATE|affdate)]&lt;/p&gt; &lt;//B_doc_title&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;/form&gt; &lt;h3 class=&quot;spip&quot;&gt;* * *&lt;/h3&gt;
&lt;p&gt;We'd like to mention here one last advantage to this kind of method...&lt;/p&gt; &lt;p&gt;It makes it possible to radically alter the graphical interface of your site again later at any time you choose. You won't need to manually delete all these documents named as &quot;spip_top&quot;, &quot;spip_title&quot;..., all you need to do is create new squelette templates that just simply don't call them at all.&lt;/p&gt; &lt;p&gt;For example, if the &quot;spip_top&quot; documents have been previously all created with a width of 450 pixels, and the new graphical interface requires images with a width of 600 pixels instead, then you don't need to modify all of your &quot;spip_top&quot; images one by one - you can just assign a new name for the replacement images, and install the new versions of the replacement documents at your own pace and name them &quot;spip_large&quot; instead. During the transition, there won't be any glaring graphical inconsistencies from one article page to another.&lt;/p&gt; &lt;p&gt;The more adventurous readers might even imagine all sorts of tests for the document type (&lt;code class='spip_code' dir='ltr'&gt;{extension=...}&lt;/code&gt;) or their size (&lt;code class='spip_code' dir='ltr'&gt;{largeur=...}&lt;/code&gt;, &lt;code class='spip_code' dir='ltr'&gt;{hauteur=...}&lt;/code&gt;) (no PHP necessary) to compile interfaces that respond to these tests (e.g. a certain graphical interface to use if &quot;spip_top&quot; has a 450 pixel width, and another if it has a 600 pixel width...).&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="ca">
		<title>SPIP 1.6</title>
		<link>http://www.spip.net/ca_article5240.html</link>
		<guid isPermaLink="true">http://www.spip.net/ca_article5240.html</guid>
		<dc:date>2010-08-19T14:49:36Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>ca</dc:language>
		<dc:creator>merce</dc:creator>



		<description>La nova versi&#243; &#171;oficial&#187; d'SPIP &#233;s la 1.6. Podeu descarregar SPIP-1.6 a l'adre&#231;a habitual ACTUALITZACI&#211; L'actualitzaci&#243; es pot fer a partir de qualsevol versi&#243; anterior d'SPIP. Si utilitzeu habitualment la instal&#183;laci&#243; autom&#224;tica, en tindreu prou llen&#231;ant el fitxer spip_loader.php3 des del vostre navegador i seguir les instruccions que s'hi mostren. Si feu servir la instal&#183;laci&#243; manual a partir d'un arxiu descarregat des de l'URL de m&#233;s amunt, haureu de: Escollir un arxiu: el format nom&#233;s dep&#232;n de (...)

-
&lt;a href="http://www.spip.net/rubrique237.html" rel="directory"&gt;Evoluci&#243; i actualitzacions&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_texte'&gt;&lt;p&gt;La nova versi&#243; &#171;oficial&#187; d'SPIP &#233;s la 1.6.&lt;/p&gt; &lt;p&gt;Podeu descarregar SPIP-1.6 a l'adre&#231;a habitual &lt;a href=&quot;http://rezo.net/spip-dev/DISTRIB/&quot; class='spip_url spip_out' rel='external'&gt;http://rezo.net/spip-dev/DISTRIB/&lt;/a&gt;&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;ACTUALITZACI&#211;&lt;/h3&gt;
&lt;p&gt;L'actualitzaci&#243; es pot fer a partir de qualsevol versi&#243; anterior d'SPIP.&lt;/p&gt; &lt;p&gt;Si utilitzeu habitualment la instal&#183;laci&#243; autom&#224;tica, en tindreu prou llen&#231;ant el fitxer spip_loader.php3 des del vostre navegador i seguir les instruccions que s'hi mostren.&lt;/p&gt; &lt;p&gt;Si feu servir la instal&#183;laci&#243; manual a partir d'un arxiu descarregat des de l'URL de m&#233;s amunt, haureu de:&lt;/p&gt; &lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; Escollir un arxiu: el format nom&#233;s dep&#232;n de vosaltres, els fitxers, en el seu interior, s&#243;n id&#232;ntics; fixeu-vos que si teniu una connexi&#243; lenta, podeu escollir una versi&#243; monoling&#252;e (l'arxiu porta llavors el sufixe del codi de la llengua: per exemple &quot;-fr&quot; pel franc&#232;s).&lt;/li&gt;&lt;/ul&gt;
&lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; Descomprimir l'arxiu que heu escollit. &lt;/li&gt;&lt;/ul&gt;
&lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; Enviar els fitxer per FTP al vostre lloc Web (esborrant eventualment els fitxers anteriors: abans, per&#242;, penseu a fer una c&#242;pia de seguretat dels vostres esquelets, per si falla o d&#243;na errors la manipulaci&#243; err&#242;nia). &lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Atenci&#243;:&lt;/strong&gt; estigueu atents a no esborrar involunt&#224;riament el contingut del directori IMG/ ja que aquest cont&#233; totes les imatges i els documents adjunts del vostre lloc!&lt;/p&gt; &lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; Aneu, amb el vostre navegador, a ecrire/ i seguiu les instruccions (haureu de crear un fitxer o directori particular a dins d'ecrire/data/ i despr&#233;s deixeu que SPIP faci l'actualitzaci&#243; de la vostra base de dades).&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;I... aix&#242; &#233;s tot!&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Remarques importants (i habituals):&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;- Abans podeu fer una c&#242;pia de seguretat de la vostra base de dades; sapigueu no obstant que normalment no tindreu necessitat de fer-la servir ja que SPIP s'encarrega ell sol de l'actualitzaci&#243; de la vostra base de dades. Per altra banda, aquesta salvaguarda no es podr&#224; restaurar sense danys sobre una versi&#243; m&#233;s recent que la vostra versi&#243; actual; per tant, nom&#233;s es pot utilitzar com a &#250;ltim recurs!&lt;/p&gt; &lt;p&gt;- Sobretot, NO BUIDEU LA VOSTRA BASE DE DADES ABANS DE FER L'ACTUALITZACI&#211;. (L'error &#233;s cl&#224;ssic, alguns imaginen, err&#242;niament, que fa falta buidar la base de dades i, a continuaci&#243;, restaurar la c&#242;pia de seguretat).&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;DOCUMENTACI&#211;&lt;/h3&gt;
&lt;p&gt;La documentaci&#243; s'ha actualitzat; suposa dos articles nous: &lt;br /&gt;- &lt;a href=&quot;http://www.spip.net/ca_article2198.html&quot; class='spip_in'&gt;La gesti&#243; de les dates&lt;/a&gt;
&lt;br /&gt;- &lt;a href=&quot;http://www.spip.net/ca_article2164.html&quot; class='spip_in'&gt;Les lleng&#252;es d'SPIP&lt;/a&gt;&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;ESPAI PRIVAT MULTILING&#220;E&lt;/h3&gt;
&lt;p&gt;&#201;s el canvi m&#233;s gros a SPIP despr&#233;s de la versi&#243; 1.5:
l'espai privat, l'ajuda en l&#237;nia i una petita part de l'espai p&#250;blic (&#233;s a dir, els formularis gestionats per SPIP) a partir d'ara estan disponibles en diverses lleng&#252;es.&lt;/p&gt; &lt;p&gt;Durant la instal&#183;laci&#243; d'SPIP, podreu escollir una llengua per la visualitzaci&#243; de la interf&#237;cie. Aquesta llengua tamb&#233; ser&#224; adoptada com a &quot;llengua per defecte&quot; del vostre lloc. &#201;s aquest reglatge el que determinar&#224;:&lt;/p&gt; &lt;ul class=&quot;spip&quot;&gt;&lt;li&gt; la llengua amb la que es mostraran els formularis de l'espai p&#250;blic (formularis de cerca, de comentaris als f&#242;rums, d'identificaci&#243; per l'espai privat, etc.)&lt;/li&gt;&lt;li&gt; les regles aplicades pel motor tipogr&#224;fic (nom&#233;s el franc&#232;s i l'esperanto suporten la correcci&#243; tipogr&#224;fica francesa completa)&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;No us preocupeu, podeu canviar aquesta configuraci&#243; m&#233;s endavant en qualsevol moment, a la configuraci&#243; del lloc i dins de la categoria &quot;opcions avan&#231;ades&quot;. A m&#233;s, cada redactor o administrador pot, independentment de la resta, modificar la llengua utilitzada per la interf&#237;cie quan visita l'espai privat. Tamb&#233; podeu acollir comunitats de redactors / administradors de lleng&#252;es diverses.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;PARTICIPAR&lt;/h3&gt;
&lt;p&gt;Hi ha altres lleng&#252;es en preparaci&#243;, i si voleu participar en l'esfor&#231; de la traducci&#243;, podeu posar-vos en contacte amb la llista &lt;a href=&quot;http://listes.rezo.net/mailman/listinfo/spip-trad&quot; class='spip_out' rel='external'&gt;spip-trad@rezo.net&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Si voleu parlar d'SPIP en una de les lleng&#252;es ja integrades, hem posat en funcionament llistes espec&#237;fiques, aix&#237; com llocs de refer&#232;ncia: la seva adre&#231;a &#233;s spip-xx@rezo.net i &lt;a href=&quot;http://www.uzine.net/spip-xx&quot; class='spip_url spip_out' rel='nofollow external'&gt;http://www.uzine.net/spip-xx&lt;/a&gt; (on xx s'ha de substituir pel codi de la llengua en q&#252;esti&#243;). A vegades el &quot;lloc de refer&#232;ncia&quot; nom&#233;s proposa la llista: aix&#242; vol dir que tot est&#224; encara construint-se.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;COMENTARI IMPORTANT:&lt;/strong&gt; probablement &#233;s preferible comen&#231;ar, durant una nova instal&#183;laci&#243;, per anar a la configuraci&#243; avan&#231;ada per tal d'escollir el joc de car&#224;cters 'utf-8' m&#233;s que el tradicional i antiquat 'iso-8859-1'.&lt;/p&gt; &lt;p&gt;S&#243;n suportats diversos jocs de car&#224;cters corrents, sobretot utf-8,
iso-8859-1, iso-8859-15, windows-1251 (cir&#237;l&#183;lic); la sindicaci&#243; tamb&#233; &#233;s totalment compatible d'un lloc a un altre independentment dels jocs de car&#224;cters escollits.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;MOTOR DE CERCA&lt;/h3&gt;
&lt;p&gt;- Funcions de transcripci&#243; multiling&#252;e: en la mesura del possible els car&#224;cters accentuats o no occidentals s&#243;n tradu&#239;ts en els seus &quot;equivalents&quot; (no accentuats, fon&#232;tics...) ; la precisi&#243; de la transcripci&#243; dep&#232;n en part de la configuraci&#243; de PHP, pels jocs de car&#224;cters no integrats a SPIP.&lt;/p&gt; &lt;p&gt;D'aquesta manera una paraula en cir&#237;l&#183;lic s'indexar&#224; en la seva forma de transcripci&#243; en ASCII, (per exemple : &quot;teoreticheskaya&quot;). La cerca donar&#224; resultats tan de la forma original de la paraula com de la forma transcrita. De fet &#233;s una generalitzaci&#243; del mecanisme que permetia ja fer cerques en franc&#232;s, alemany, (etc.) sense haver d'escriure els accents.&lt;/p&gt; &lt;p&gt;- Quan la llengua del lloc &#233;s 'vi' (vietnamita), la transcripci&#243; &#233;s m&#233;s complexa: els accents s&#243;n codificats per xifres, i la cerca tamb&#233; es pot fer tant a partir de paraules escrites amb tots els accents com a partir de la transcripci&#243; cl&#224;ssica (a^.) o spip (a65)...&lt;/p&gt; &lt;p&gt;- El gui&#243; baix (underscore) ja no &#233;s considerat com un separador de paraules, sin&#243; com un car&#224;cter alfab&#232;tic (documentaci&#243; inform&#224;tica).&lt;/p&gt; &lt;p&gt;- A partir d'ara es poden indexar les sigles de dues lletres i m&#233;s, incloent-hi tamb&#233; aquelles que contenen xifres (G8, CNT...). Una sigla &#233;s una paraula que no t&#233; cap lletra min&#250;scula.&lt;/p&gt; &lt;p&gt;- Per ra&#243; d'aquestes millores, l'actualitzaci&#243; d'SPIP activa excepcionalment que es torni a indexar completament tot el vostre lloc (si el motor de cerca est&#224; activat).&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;UNA CORRECCI&#211; IMPORTANT&lt;/h3&gt;
&lt;p&gt;- Modificaci&#243; del funcionament del &lt;code class='spip_code' dir='ltr'&gt;$dossier_squelettes&lt;/code&gt;, per tornar-lo m&#233;s &#224;gil i compatible amb &lt;code class='spip_code' dir='ltr'&gt;&lt;INCLURE&gt;&lt;/code&gt;: a partir d'ara SPIP
cerca, en ordre, &lt;code class='spip_code' dir='ltr'&gt;dossier_squelettes/fond=10.html&lt;/code&gt;, despr&#233;s &lt;code class='spip_code' dir='ltr'&gt;dossier_squelettes/fond-8.html&lt;/code&gt; (remuntant la jerarquia de les seccions10, 8, etc. cap a l'arrel), despr&#233;s &lt;code class='spip_code' dir='ltr'&gt;dossier_squelettes/fond.html&lt;/code&gt;, despr&#233;s &lt;code class='spip_code' dir='ltr'&gt;./fond.html&lt;/code&gt; a l'arrel del lloc,
despr&#233;s &lt;code class='spip_code' dir='ltr'&gt;./fond-dist.html&lt;/code&gt;&lt;/p&gt; &lt;p&gt;Pels &lt;code class='spip_code' dir='ltr'&gt;&lt;INCLURE(fichier.php3)&gt;&lt;/code&gt;, SPIP mira si el fitxer &lt;code class='spip_code' dir='ltr'&gt;dossier_squelette/fichier.php3&lt;/code&gt; existeix (i l'inclou si &#233;s el cas); i sin&#243; inclou &lt;code class='spip_code' dir='ltr'&gt;./fichier.php3&lt;/code&gt; (sense verificar necess&#224;riament la seva exist&#232;nica).&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;MINIATURES AUTOM&#192;TIQUES&lt;/h3&gt;
&lt;p&gt;- La generaci&#243; autom&#224;tica de miniatures (es pot activar des de la configuraci&#243; del lloc, a dins la categoria &quot;opcions avan&#231;ades&quot;) a partir d'ara &#233;s compatible amb m&#233;s sistemes, i les miniatures generades tenen m&#233;s qualitat (&#233;s aconsellable utilitzar PHP 4.3 o superior si volem tenir uns resultats m&#233;s &#242;ptims).&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;SINDICACI&#211;&lt;/h3&gt;
&lt;p&gt;- La sindicaci&#243; dels llocs referenciats accepta un nombre m&#233;s gran de formats de &#171;backends&#187;, i reconeix m&#233;s informacions a l'interior d'aquests (compatibilitat amb els formats RSS 0.91, 1.0, 2.0, i recuperaci&#243; de dates i autors segons els diversos formats)&lt;/p&gt; &lt;p&gt;- Els fitxers de sindicaci&#243; generats per SPIP (&lt;code class='spip_code' dir='ltr'&gt;backend.php3&lt;/code&gt; pels articles, &lt;code class='spip_code' dir='ltr'&gt;backend-breves.php3&lt;/code&gt; per les breus) s&#243;n m&#233;s complerts, contenen sobretot la data exacta de publicaci&#243; dels &quot;&#237;tems&quot; sindicats.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;GESTI&#211; DE DATES&lt;/h3&gt;
&lt;p&gt;- L'etiqueta &lt;code class='spip_code' dir='ltr'&gt;#DATE_NOUVEAUTES&lt;/code&gt; permet publicar la data del darrer enviament de correu electr&#242;nic presentant les novetats.&lt;/p&gt; &lt;p&gt;- correcci&#243; de l'error dels criteris &lt;code class='spip_code' dir='ltr'&gt;{age}&lt;/code&gt; i &lt;code class='spip_code' dir='ltr'&gt;{age_relatif}&lt;/code&gt;; aquests permeten a partir d'ara distingir dos articles publicats el mateix dia (noci&#243; de &#171;precedent&#187; de &#171;seg&#252;ent&#187;)&lt;/p&gt; &lt;p&gt;- introducci&#243; de criteris &lt;code class='spip_code' dir='ltr'&gt;{jour_relatif}&lt;/code&gt;, &lt;code class='spip_code' dir='ltr'&gt;{mois_relatif}&lt;/code&gt; i &lt;a name=&quot;annee_relatif&quot;&gt;&lt;/a&gt;&lt;code class='spip_code' dir='ltr'&gt;{annee_relatif}&lt;/code&gt;, com extensi&#243; de l'&lt;code class='spip_code' dir='ltr'&gt;{age_relatif}&lt;/code&gt;, per&#242; arrodonit al dia, al mes i a l'any (cosa que permet fer a partir d'ara un bucle per &#171;tots els articles del mes de mar&#231; del 2003&#187; [especialment dedicat als amants dels &lt;i&gt;weblogs&lt;/i&gt;])&lt;/p&gt; &lt;p&gt;- neteja de la data passada a dins de l'URL: 2003, 2003/01, per&#242; tamb&#233; a partir de PHP3.0.12 (utilitzaci&#243; de la funci&#243; &lt;code class='spip_code' dir='ltr'&gt;strtotime&lt;/code&gt;), &lt;code class='spip_code' dir='ltr'&gt;date=-1year&lt;/code&gt;, &lt;code class='spip_code' dir='ltr'&gt;date=1march1970&lt;/code&gt;, etc.&lt;/p&gt; &lt;p&gt;- &lt;code class='spip_code' dir='ltr'&gt;#DATE&lt;/code&gt; es pot utilitzar a fora dels bucles (context o URL)&lt;/p&gt; &lt;p&gt;&lt;i&gt;En resum, i utilitzant h&#224;bilment les etiquetes &lt;code class='spip_code' dir='ltr'&gt;&lt;INCLURE()&gt;&lt;/code&gt;, actualment estan permeses totes les manipulacions sobre les dates. A partir d'ara, tots els criteris de data permeten comparar les &lt;code class='spip_code' dir='ltr'&gt;date_redac&lt;/code&gt; entre elles o amb la data passada en URL (afegir &lt;code class='spip_code' dir='ltr'&gt;_redac&lt;/code&gt; al final)&lt;/i&gt;&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;ACCESSIBILITAT DE L'ESPAI PRIVAT&lt;/h3&gt;
&lt;p&gt;Hem afegit una colla de dreceres de teclat a l'espai privat, per tal de facilitar la navegaci&#243; pels sistemes no gr&#224;fics.
Totes aquestes tecles s&#243;n generades pel navegador i el sistema d'explotaci&#243;: &#233;s a dir, que les heu d'utilitzar, si el vostre sistema ho permet, combinant-les amb &#171;Alt&#187;, &#171;Ctrl&#187; o &#171;Pomme&#187;... Us toca a vosaltres provar-ho.&lt;/p&gt; &lt;p&gt; &lt;strong&gt;Resum de les dreceres:&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;- Les tecles 1, 2, ... 9, 0 activen les diferents entrades dels men&#250;s de navegaci&#243; (les dues rengleres d'icones al capdamunt de la pantalla). Com a conseq&#252;&#232;ncia del n&#250;mero limitat de xifres disponibles, nom&#233;s les primeres icones de la segona filera s&#243;n accessibles d'aquesta manera;)
&lt;br /&gt;&lt;i&gt;(NB : si esteu en un teclat azerty, no oblideu utilitzar a m&#233;s la tecla shift, o passar a trav&#233;s del teclat num&#232;ric)&lt;/i&gt;
&lt;br /&gt;- La tecla S salta directament a la columna &#171;de la dreta&#187;, qui presenta el contingut &#250;til de la p&#224;gina en curs (&#250;til amb els sistemes amb la parla per no enumerar totes les tries de navegaci&#243; de la columna de l'esquerre i dels men&#250;s d'icones)
&lt;br /&gt;- La tecla R salta directament a la casella de cerca (nota: no oblideu que aquesta casella nom&#233;s est&#224; disponible si s'utilitza la interf&#237;cie completa), cosa que us permet cercar r&#224;pidament un contingut (teclegeu Ctrl R, i despr&#233;s el text a cercar, i premeu la tecla Enter)
&lt;br /&gt;- Les tecles A, B, C, etc. permeten saltar a cadascun dels &#171;blocs de visualitzaci&#243;&#187; presents a la p&#224;gina (un &#171;bloc&#187; &#233;s, per exemple, una llista d'articles, un formulari...). El n&#250;mero de tecles disponibles d'aquesta manera dep&#232;n del n&#250;mero de blocs.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;PETITS AFEGITS I CORRECCIONS&lt;/h3&gt;
&lt;p&gt;- propre() &#233;s una mica m&#233;s compatible amb les normes HTML modernes&lt;/p&gt; &lt;p&gt;- Una nova variable &lt;code class='spip_code' dir='ltr'&gt;$ligne_horizontale&lt;/code&gt; permet personalitzar la l&#237;nia &lt;code class='spip_code' dir='ltr'&gt;&lt;hr&gt;&lt;/code&gt;&lt;/p&gt; &lt;p&gt;- Atenci&#243;, els subt&#237;tols canvien en refer&#232;ncia a l'hist&#242;ric: per trobar l'estil antic, cal que personalitzeu &lt;code class='spip_code' dir='ltr'&gt;$debut_intertitre&lt;/code&gt; i &lt;code class='spip_code' dir='ltr'&gt;$fin_intertitre&lt;/code&gt;&lt;/p&gt; &lt;p&gt;- Nou filtre &#171;&lt;code class='spip_code' dir='ltr'&gt;|sinon&lt;/code&gt;&#187;: &lt;code class='spip_code' dir='ltr'&gt;[(#TEXTE|sinon{&quot;pas de texte&quot;})]&lt;/code&gt; mostra el text; si est&#224; buit, mostra &lt;i&gt;&#171;pas de texte&#187;&lt;/i&gt;.&lt;/p&gt; &lt;p&gt;- Noves etiquetes &lt;code class='spip_code' dir='ltr'&gt;#LOGO_AUTEUR_NORMAL&lt;/code&gt; i &lt;code class='spip_code' dir='ltr'&gt;#LOGO_AUTEUR_SURVOL&lt;/code&gt;&lt;/p&gt; &lt;p&gt;- Al men&#250; &#171;afegir un document des del directori &lt;code class='spip_code' dir='ltr'&gt;upload&lt;/code&gt;&#187;, els noms dels arxius es mostren per odre alfab&#232;tic; a m&#233;s, els subdirectoris instal&#183;lats eventualment a upload/ es tenen en compte.&lt;/p&gt; &lt;p&gt;- el fitxer &lt;code class='spip_code' dir='ltr'&gt;engines-list.ini&lt;/code&gt; s'ha despla&#231;at a dins de &lt;code class='spip_code' dir='ltr'&gt;ecrire/&lt;/code&gt; i anomenat de nou com &lt;code class='spip_code' dir='ltr'&gt;engines-list.txt&lt;/code&gt;: si l'heu modificat, alerta a posar les vostres correccions al nou fitxer: l'antic es suprimir&#224;.&lt;/p&gt; &lt;p&gt;- el fitxer &lt;code class='spip_code' dir='ltr'&gt;inc_meta_cache.php3&lt;/code&gt; passa a &lt;code class='spip_code' dir='ltr'&gt;ecrire/data/&lt;/code&gt; (permet eventualment assegurar un funcionament normal d'SPIP mentre s'est&#224; treballant en el directori &lt;code class='spip_code' dir='ltr'&gt;ecrire/&lt;/code&gt;)&lt;/p&gt; &lt;p&gt;- El criteri &lt;code class='spip_code' dir='ltr'&gt;{branche}&lt;/code&gt; est&#224; suportat oficialment&lt;/p&gt; &lt;p&gt;- Afegit de nous tipus de documents autoritzats&lt;/p&gt; &lt;p&gt;- Canvi d'estrat&#232;gia en &lt;code class='spip_code' dir='ltr'&gt;?var_recherche=toto&lt;/code&gt;: nom&#233;s s'afegeixen a dins dels URLs en el s&#237; dels bucles &lt;code class='spip_code' dir='ltr'&gt;{recherche}&lt;/code&gt; (i no a dins de tota la p&#224;gina). Per tant, ja no cal definir-los a dins dels &lt;code class='spip_code' dir='ltr'&gt;inc-urls...&lt;/code&gt; (si teniu un inc-urls... personalitzat [diferent del 'standard' o 'html'], &#233;s aconsellable revisar-lo tot suprimint la part que s'ocupa de &lt;code class='spip_code' dir='ltr'&gt;var_recherche&lt;/code&gt;).&lt;/p&gt; &lt;p&gt;- Error: a partir d'ara es pot utilitzar &lt;code class='spip_code' dir='ltr'&gt;#POINTS&lt;/code&gt; pels llocs referenciats&lt;/p&gt; &lt;p&gt;- Error: supressi&#243; dels f&#242;rums adjunts quan s'elimina un lloc referenciat&lt;/p&gt; &lt;p&gt;- Error: no acceptar canvis de nom o correu electr&#242;nic en els f&#242;rums amb subscripci&#243;&lt;/p&gt; &lt;p&gt;- Error: miniatures no suprimides a la supressi&#243; d'un document&lt;/p&gt; &lt;p&gt;- Error: les peticions amb correu electr&#242;nic &#250;nic no funcionen&lt;/p&gt; &lt;p&gt;- Peda&#231; allotjament-discount&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;* * *&lt;/h3&gt;
&lt;p&gt;Per consultar la llista de novetats a partir de les versions anteriors, mireu la secci&#243; &lt;a href=&quot;http://www.spip.net/rubrique237.html&quot; class='spip_in'&gt;Evoluci&#243; i actualitzacions&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="en">
		<title>Extending SPIP</title>
		<link>http://www.spip.net/en_article5241.html</link>
		<guid isPermaLink="true">http://www.spip.net/en_article5241.html</guid>
		<dc:date>2010-08-19T14:07:27Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>en</dc:language>
		<dc:creator>Mark</dc:creator>



		<description>If you're thinking about extending SPIP and specifically intend to contribute to the kernel, there are a few salient points to consider:: SPIP is a tool already used by thousands of people, it has a history and a planned road map, and is a widely collaborative project with a global audience. Certain choices have been made, not always easily, but which have led to an overall consistency in the code, which makes moving forward a much simpler task. Whenever an earlier choice reveals itself to (...)

-
&lt;a href="http://www.spip.net/rubrique672.html" rel="directory"&gt;The development of SPIP and its tools&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_chapo'&gt;&lt;p&gt;If you're thinking about extending SPIP and specifically intend to contribute to the kernel, there are a few salient points to consider:: &lt;i&gt;SPIP is a tool already used by thousands of people, it has a history and a planned road map, and is a widely collaborative project with a global audience&lt;/i&gt;. Certain choices have been made, not always easily, but which have led to an overall consistency in the code, which makes moving forward a much simpler task. Whenever an earlier choice reveals itself to be clearly incompatible with a new technology that would be useful to integrate, a refactoring of the code is commenced but which may take several months to complete, entailing a prolonged inconsistency until it's done. It's obvious why such decisions should be avoided where possible, and accept that occasionally a new rule will be violated, with the refactoring of that section still not having been completed. It's also true that even if programming styles vary a little from one place to another, an overall internally coherent system is in constant evolution, and a useful and widely used software is not derived from religious application of some sainted procedures, but results from organic growth from a lively and open community.&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;h3 class=&quot;spip&quot;&gt;Organisation of the code sources&lt;/h3&gt;
&lt;p&gt;Since version 1.9 was released, it has been made possible to modify SPIP's behaviour without altering its kernel code, principally due to the use of the &lt;i&gt;access paths&lt;/i&gt; defined by the &lt;code class='spip_code' dir='ltr'&gt;SPIP_PATH&lt;/code&gt; global constant.
All SPIP extensions should use this mechanism so that integration testing can be detachable from the system as a whole by simply redefining that access path, with the SPIP core distribution essentially being read only.
If you are convinced that a certain desired behaviour can not be achieved using this mechanism, please discuss your requirements and thoughts before proceeding through the &lt;a href=&quot;http://listes.rezo.net/mailman/listinfo/spip-dev&quot; class='spip_out' rel='external'&gt;spip-dev&lt;/a&gt; discussion list.&lt;/p&gt; &lt;p&gt;Contributions to SPIP should always be described with an article on &lt;a href=&quot;http://www.spip-contrib.net/&quot; class='spip_out' rel='external'&gt;Spip-Contrib&lt;/a&gt;, and their constituent contents made available as documents attached to that article, or (and even better) stored in the &lt;a href=&quot;http://zone.spip.org/trac/spip-zone/&quot; class='spip_out' rel='external'&gt;spip-zone&lt;/a&gt; which provides a &lt;a href=&quot;http://subversion.tigris.org/&quot; class='spip_out' rel='external'&gt;Subversion&lt;/a&gt; code server provisioned by &lt;a href=&quot;http://www.edgewall.com/trac/&quot; class='spip_out' rel='external'&gt;Trac&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;In order to extend SPIP in this way, it is necessary to fully understand how the various directories nominated in the SPIP path are organised and the roles played by the files assigned to each of these directories. This is the purpose of this article, but you might well also benefit from reading the &lt;a href=&quot;http://www.spip.net/en_article3416.html&quot; class='spip_in' hreflang='en'&gt;&quot;release notes&quot; article&lt;/a&gt; describing the SPIP path system that was issued when SPIP 1.9 was initially released.&lt;/p&gt; &lt;p&gt;The root directory of the SPIP distribution essentially contains:&lt;/p&gt; &lt;p&gt;- a file called
&lt;code class='spip_code' dir='ltr'&gt;spip.php&lt;/code&gt;, aliased as
&lt;code class='spip_code' dir='ltr'&gt;index.php&lt;/code&gt;, to handle backwards compatibility with prior versions, and which loads up the &lt;code class='spip_code' dir='ltr'&gt;ecrire/inc_version.php&lt;/code&gt; initialisation file, and then immediately passing control on to the main script: &lt;code class='spip_code' dir='ltr'&gt;ecrire/public.php&lt;/code&gt;;&lt;/p&gt; &lt;p&gt;- a directory called
&lt;code class='spip_code' dir='ltr'&gt;ecrire&lt;/code&gt;
which contains only files that can be interpreted on the server side (PHP and SQL);&lt;/p&gt; &lt;p&gt;- one or more (depending on the version) directories containing files that can be interpreted on the client side (HTML, JavaScript, style sheets, images in various formats) as well as the formatting templates known as &lt;i&gt;squelettes&lt;/i&gt;. These squelettes/templates are interpreted on both server and client sides:
these are files compiled in a MIME format, and supplemented with SPIP directives which are processed on the server side in order to send the client a text file that is purely MIME (normally HTML, but also RSS, SVG, ICS, etc).&lt;/p&gt; &lt;p&gt;- four directories which are empty upon installation, which will contain the temporary and permanent data necessary for maintaining the web site.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;The roles of the&lt;/strong&gt; &lt;code class='spip_code' dir='ltr'&gt;prive&lt;/code&gt; and &lt;code class='spip_code' dir='ltr'&gt;squelettes-dist&lt;/code&gt; &lt;strong&gt;directories and their sub-directories&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;These folders contain the files that determine the presentation of SPIP's output, for the private and public zones respectively. Prior to &lt;a href=&quot;http://www.spip.net/en_article3837.html&quot; class='spip_in'&gt;&lt;span style='color: #273494;'&gt;SPIP 2.0&lt;/span&gt;&lt;/a&gt;, these two directories were one and the same, and were then named as &lt;code class='spip_code' dir='ltr'&gt;dist&lt;/code&gt;. They contain a large number of sub-directories, summaries of which are detailed here below:&lt;/p&gt; &lt;table class=&quot;spip&quot;&gt;
&lt;thead&gt;&lt;tr class='row_first'&gt;&lt;th scope='col'&gt;directory&lt;/th&gt;&lt;th scope='col'&gt;role&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class='row_even'&gt;
&lt;td&gt;&lt;code class='spip_code' dir='ltr'&gt;/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;contains the squelette templates. The template files are suffixed with &lt;code class='spip_code' dir='ltr'&gt;.html&lt;/code&gt; for historical reasons but this does not imply anything about their contents. You can supply any file without that extension as the &lt;code class='spip_code' dir='ltr'&gt;page&lt;/code&gt; parameter for the URL of a SPIP site and it will be used just like a squelette template that did have the extension.
&lt;br /&gt;
This directory also contains the stylesheets (with the &lt;code class='spip_code' dir='ltr'&gt;.css&lt;/code&gt; extension) defining the default styling for the pages&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_odd'&gt;
&lt;td&gt;&lt;code class='spip_code' dir='ltr'&gt;formulaires/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;contains the html section of the &lt;i&gt;dynamic tags&lt;/i&gt;, form templates which use PHP code stored in the &lt;code class='spip_code' dir='ltr'&gt;ecrire/balise&lt;/code&gt; directory&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_even'&gt;
&lt;td&gt;&lt;code class='spip_code' dir='ltr'&gt;icones_barre/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;contains the images used to illustrate the typographic toolbar in the private zone&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_odd'&gt;
&lt;td&gt;&lt;code class='spip_code' dir='ltr'&gt;images/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;images used in the private zone&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_even'&gt;
&lt;td&gt;&lt;code class='spip_code' dir='ltr'&gt;javascript/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;JavaScript libraries (jQuery, typographical toolbar, ...)&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_odd'&gt;
&lt;td&gt;&lt;code class='spip_code' dir='ltr'&gt;modeles/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;squelette templates that can be called using the #MODELE tag or with shortcuts in the form of &lt;code class='spip_code' dir='ltr'&gt;&lt;article6|model_name&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_even'&gt;
&lt;td&gt;&lt;code class='spip_code' dir='ltr'&gt;polices/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;the fonts that can be used with &lt;a href=&quot;http://www.spip.net/en_article3477.html&quot; class='spip_in' hreflang='en'&gt;typographical (textual) images&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_odd'&gt;
&lt;td&gt;&lt;code class='spip_code' dir='ltr'&gt;vignettes/&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;standard thumbnails for the types of document that can be associated with an article&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;The roles of the&lt;/strong&gt; &lt;code class='spip_code' dir='ltr'&gt;ecrire&lt;/code&gt; &lt;strong&gt;directory and its sub-directories&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;The &lt;code class='spip_code' dir='ltr'&gt;ecrire&lt;/code&gt; directory contains several sub-directories which contain the PHP files defining the functions and sometimes, but quite rarely, triggering certain initialisation tasks when they are loaded (these exceptions will soon be eliminated). The files located in the main directory which are the most important ones to understand as regards making your own contributions to SPIP are:
&lt;code class='spip_code' dir='ltr'&gt;inc_version.php&lt;/code&gt;,
&lt;code class='spip_code' dir='ltr'&gt;public.php&lt;/code&gt;
and
&lt;code class='spip_code' dir='ltr'&gt;index.php&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;The &lt;code class='spip_code' dir='ltr'&gt;ecrire/inc_version.php&lt;/code&gt; file
initialises the global constants and variables necessary for SPIP's normal operations, specifically those that ensure its portability over the various supporting platforms. Fairly early on when it is loaded, it includes the &lt;code class='spip_code' dir='ltr'&gt;inc/utils.php&lt;/code&gt; file where all of the essential SPIP files are defined, and then another file not part of the standard SPIP distribution called &lt;code class='spip_code' dir='ltr'&gt;mes_options.php&lt;/code&gt;,
which is used to modify the initialisation task without needing to modify the &lt;code class='spip_code' dir='ltr'&gt;inc_version.php&lt;/code&gt; file. In particular, it is possible in this customised file to call the &lt;code class='spip_code' dir='ltr'&gt;spip_initialisation&lt;/code&gt; function in order to define the data directories and thereby enable you to run several distinct SPIP web sites using a single distribution kernel (the standard call to this function, further down in the &lt;code class='spip_code' dir='ltr'&gt;inc_version.php&lt;/code&gt; file, will automatically be neutralised so that it does not run twice).
Another essential SPIP function is &lt;code class='spip_code' dir='ltr'&gt;find_in_path&lt;/code&gt;, which uses the &lt;i&gt;access paths&lt;/i&gt; as well as &lt;code class='spip_code' dir='ltr'&gt;include_spip&lt;/code&gt;
which relies on
&lt;code class='spip_code' dir='ltr'&gt;find_in_path&lt;/code&gt;,
and
&lt;code class='spip_code' dir='ltr'&gt;charger_fonction&lt;/code&gt;
which relies on
&lt;code class='spip_code' dir='ltr'&gt;include_spip&lt;/code&gt;. All of SPIP's files are loaded by one of these two functions.&lt;/p&gt; &lt;p&gt;The
&lt;code class='spip_code' dir='ltr'&gt;ecrire/public.php&lt;/code&gt; file, called by
&lt;code class='spip_code' dir='ltr'&gt;spip.php&lt;/code&gt;, has the critical role of provisioning the public web pages required whenever an HTTP request contains the &lt;code class='spip_code' dir='ltr'&gt;page&lt;/code&gt; parameter (with URL rewriting possibly intervening beforehand). This script then applies the squelette template which bears the same name as that parameter. It returns the HTTP headers and calculated contents, handles any possible errors that may occur, and runs the background tasks using the internal SPIP &lt;code class='spip_code' dir='ltr'&gt;cron&lt;/code&gt; function. Contributing to the SPIP public zone therefore consists of supplying new templates, and also possibly additional stylesheet rules and images that they may reference.&lt;/p&gt; &lt;p&gt;The other role of the
&lt;code class='spip_code' dir='ltr'&gt;ecrire/public.php&lt;/code&gt;
directory concerns cases where the HTTP requests includes the &lt;code class='spip_code' dir='ltr'&gt;action&lt;/code&gt; argument. It then applies the &lt;code class='spip_code' dir='ltr'&gt;charger_fonction&lt;/code&gt; function with the &lt;i&gt;v&lt;/i&gt; value of that
&lt;code class='spip_code' dir='ltr'&gt;action&lt;/code&gt; parameter. This application will cause the loading of the file with the same name in the &lt;code class='spip_code' dir='ltr'&gt;action&lt;/code&gt; directory, which has a principal function named &lt;code class='spip_code' dir='ltr'&gt;action_&lt;/code&gt;&lt;i&gt;v&lt;/i&gt;&lt;code class='spip_code' dir='ltr'&gt;_dist&lt;/code&gt; which is thereby invoked. These scripts principally perform write operations (to the database or to an external file) and generally do not return any results, thereby escaping any issues with page formatting.&lt;/p&gt; &lt;p&gt;The
&lt;code class='spip_code' dir='ltr'&gt;index.php&lt;/code&gt;
file is the central access file to the forms in the private zone. It authenticates the site visitor, initialise that user's personal data, and applied the &lt;code class='spip_code' dir='ltr'&gt;charger_fonction&lt;/code&gt;
function to the &lt;i&gt;v&lt;/i&gt; value of the &lt;code class='spip_code' dir='ltr'&gt;exec&lt;/code&gt; parameter. This application will cause the loading of the file with the same name from the &lt;code class='spip_code' dir='ltr'&gt;exec&lt;/code&gt;directory, which will have a principal function called &lt;code class='spip_code' dir='ltr'&gt;exec_&lt;/code&gt;&lt;i&gt;v&lt;/i&gt;&lt;code class='spip_code' dir='ltr'&gt;_dist&lt;/code&gt; which is then invoked. That function then has the task to deliver all of the output data, includes the HTTP headers. It is therefore possible to extend SPIP simply by adding a PHP file into a sub-directory named &lt;code class='spip_code' dir='ltr'&gt;exec&lt;/code&gt;
that is listed in the list of directories stored in the &lt;code class='spip_code' dir='ltr'&gt;SPIP_PATH&lt;/code&gt; global variable.&lt;/p&gt; &lt;p&gt;The
&lt;code class='spip_code' dir='ltr'&gt;exec&lt;/code&gt;
directory only contains the files that define the functions directly callable using the &lt;code class='spip_code' dir='ltr'&gt;exec&lt;/code&gt; URL parameter. The PHP code in these files must never attempt to write to the database (the few remaining exceptions to this rule are currently being eliminated). On the other hand, it frequently accesses the database in read mode in order to verify the rights of the requester and to determine the data to be displayed. Looking at SPIP as a &lt;i&gt;Model-View-Controller&lt;/i&gt; architecture, the &lt;code class='spip_code' dir='ltr'&gt;exec&lt;/code&gt;
files perform the role of the &lt;i&gt;Controller&lt;/i&gt;. Looking at SPIP using Lisp's &lt;i&gt;(Print(Eval(Read)))&lt;/i&gt; architecture, it performs the &lt;i&gt;Read&lt;/i&gt; segment. Eventually, this directory ought to become a directory of squelette templates.
It is requested of new contributions to SPIP to consider this objective when the contributions are being coded.&lt;/p&gt; &lt;p&gt;The &lt;code class='spip_code' dir='ltr'&gt;action&lt;/code&gt; directory, which has already been mentioned, essentially contains all of the scripts that access the database in write mode. Looking at SPIP as a &lt;i&gt;Model-View-Controller&lt;/i&gt; architecture, the &lt;code class='spip_code' dir='ltr'&gt;action&lt;/code&gt; files fill the role of the &lt;i&gt;Model&lt;/i&gt;. From the point of view of the Lisp &lt;i&gt;(Print(Eval(Read)))&lt;/i&gt; architecture, it is the &lt;i&gt;Eval&lt;/i&gt; section. Here again, any contributions to SPIP consist of writing such scripts and calling them from the forms built using the &lt;code class='spip_code' dir='ltr'&gt;generer_action_auteur&lt;/code&gt; function, which ensures the security access of those scripts, which itself will invoke the &lt;code class='spip_code' dir='ltr'&gt;securiser_action&lt;/code&gt;
function to verify the access rights of the requester. This architecture enables the calculation of these rights only when constructing the forms that call the write mode access scripts: rather than repeatedly recalculating all of these rights, these scripts simply verify that the key passed amongst the arguments is the same as that which they recalculated based on the other arguments, the requester's identity, and a random value that is periodically refreshed. These scripts do not generally return any results, so therefore also don't generally return any HTML code nor any call to the &lt;code class='spip_code' dir='ltr'&gt;echo&lt;/code&gt; function (any remaining exceptions are currently being eliminated).
On the other hand, they are often called with an HTTP parameter called &lt;code class='spip_code' dir='ltr'&gt;redirect&lt;/code&gt;, which requests a redirection which will then be automatically triggered by &lt;code class='spip_code' dir='ltr'&gt;public.php&lt;/code&gt;, which itself will retrn an HTTP 204 status message if that parameter is absent.
In the case of forms constructed with the &lt;code class='spip_code' dir='ltr'&gt;ajax_action_auteur&lt;/code&gt; function, that redirection leads to the script of the same name in the &lt;code class='spip_code' dir='ltr'&gt;exec&lt;/code&gt; directory. This second script often only entails loaded the file with the same name from the &lt;code class='spip_code' dir='ltr'&gt;inc&lt;/code&gt; directory, calling that file's main function, and returning that function's result to the client via the &lt;code class='spip_code' dir='ltr'&gt;ajax_retour&lt;/code&gt; function. In this way it is very easy to extend SPIP in AJAX mode using this pre-constructed infrastructure.&lt;/p&gt; &lt;p&gt;The &lt;code class='spip_code' dir='ltr'&gt;inc&lt;/code&gt; directory, the one with the most content, essentially contains the functions used to build the private zone pages returned to the client, these functions which ought to later become filters used by the
&lt;code class='spip_code' dir='ltr'&gt;exec&lt;/code&gt; files when those files are all squelette templates.
Looking at SPIP as a &lt;i&gt;Model-View-Controller&lt;/i&gt; architecture, the &lt;code class='spip_code' dir='ltr'&gt;inc&lt;/code&gt; files fill the role of the &lt;i&gt;View&lt;/i&gt;.
From the point of view of the Lisp &lt;i&gt;(Print(Eval(Read)))&lt;/i&gt; architecture, it is the &lt;i&gt;Print&lt;/i&gt; section.
Nevertheless, this directory also contains a lot of functions that are actually more relevant to the &lt;i&gt;Control&lt;/i&gt; function and which should therefore really be reorganised. Most of the &lt;code class='spip_code' dir='ltr'&gt;inc&lt;/code&gt; files are loaded via the &lt;code class='spip_code' dir='ltr'&gt;charger_fonction&lt;/code&gt; function, and in time this will be the case for all of them. None of the functions in this directory are supposed to use &lt;code class='spip_code' dir='ltr'&gt;echo&lt;/code&gt;.
Contributions to SPIP are requested to respect these rules from now on.&lt;/p&gt; &lt;p&gt;The &lt;code class='spip_code' dir='ltr'&gt;install&lt;/code&gt; directly only contains the functions necessary for SPIP installation. Each step may be overloaded or supplemented by others, the principal function &lt;code class='spip_code' dir='ltr'&gt;exec/install.php&lt;/code&gt; using this directory following the same principle as &lt;code class='spip_code' dir='ltr'&gt;ecrire/index.php&lt;/code&gt; does with the &lt;code class='spip_code' dir='ltr'&gt;exec&lt;/code&gt; directory.&lt;/p&gt; &lt;p&gt;The &lt;code class='spip_code' dir='ltr'&gt;urls&lt;/code&gt; directory contains the files that each define the same set of &lt;i&gt;URL rewriting functions&lt;/i&gt;. Based on the numeric identifiers in a given table in the database, these are functions which calculate a name which is easier to read and write than the direct PHP script call that is actually executed by the HTTP server for that numeric index and that table. Here again, you only need to add a file into this directory to obtain a new set of rewrite rules, the name of which will be displayed for selection in the private zone configuration panel that deals with the different types of &lt;code class='spip_code' dir='ltr'&gt;URLs&lt;/code&gt; (prior to &lt;a href=&quot;http://www.spip.net/en_article3837.html&quot; class='spip_in'&gt;&lt;span style='color: #273494;'&gt;SPIP 2.0&lt;/span&gt;&lt;/a&gt;, this panel did not exist in the private zone and these files were referenced instead by the &lt;code class='spip_code' dir='ltr'&gt;type_urls&lt;/code&gt; global variable).&lt;/p&gt; &lt;p&gt;The &lt;code class='spip_code' dir='ltr'&gt;lang&lt;/code&gt; directory only contains data files, PHP arrays which supply the language specific translations for the &quot;idioms&quot; used for all of SPIP's hosted languages, and for all the arguments that the &lt;code class='spip_code' dir='ltr'&gt;_T&lt;/code&gt; function (defined in &lt;code class='spip_code' dir='ltr'&gt;inc/utils.php&lt;/code&gt;) is expected to be passed. These files are loaded only by the &lt;code class='spip_code' dir='ltr'&gt;inc/lang.php&lt;/code&gt; functions. By translating the reference files suffixed with &lt;code class='spip_code' dir='ltr'&gt;fr&lt;/code&gt; into similarly named files suffixed with another language code is all that is required to make SPIP available in another language.&lt;/p&gt; &lt;p&gt;The &lt;code class='spip_code' dir='ltr'&gt;charset&lt;/code&gt; directory also only contains data files, PHP arrays used to convert from one character encoding to another (utf, iso, ascii, html entities, etc). They are exclusively read by the functions in &lt;code class='spip_code' dir='ltr'&gt;inc/charsets.php&lt;/code&gt;. Once again, just by adding a file into the directory makes it possible to declare a new encoding to SPIP, but SPIP actually already offers all encodings in common use, so adding such a file will be a rare event indeed.&lt;/p&gt; &lt;p&gt;The &lt;code class='spip_code' dir='ltr'&gt;base&lt;/code&gt;
directory contains the interface functions between PHP and the SQL servers that SPIP can access.
In particular, the generic &lt;code class='spip_code' dir='ltr'&gt;abstract_sql.php&lt;/code&gt;
file contains the functions that should be used to communicate the the SQL servers, thereby avoiding any need to use the PHP database functions which would negatively impact the portability of any code.
There should, of course, not be any MIME code in this directory.&lt;/p&gt; &lt;p&gt;The &lt;code class='spip_code' dir='ltr'&gt;req&lt;/code&gt; directory contains the effective ports of SPIP's virtual SQL server to the real world servers (MySQL, PG) and similar others (SQLite).&lt;/p&gt; &lt;p&gt;The &lt;code class='spip_code' dir='ltr'&gt;balise&lt;/code&gt; directory contains the PHP files associated with SPIP's &lt;i&gt;dynamic tags&lt;/i&gt;.
Their names are synonymous with the &lt;code class='spip_code' dir='ltr'&gt;squelettes-dist/formulaires&lt;/code&gt; squelette template. Supplementing the SPIP public zone with a form &lt;i&gt;F&lt;/i&gt; consists of creating an &lt;i&gt;F&lt;/i&gt;.html file in your &lt;code class='spip_code' dir='ltr'&gt;SPIP_PATH&lt;/code&gt; and an &lt;i&gt;F&lt;/i&gt;.php file in a &lt;code class='spip_code' dir='ltr'&gt;balise&lt;/code&gt; sub-directory of your &lt;code class='spip_code' dir='ltr'&gt;SPIP_PATH&lt;/code&gt;.
The role of the PHP file is to accept the entries requested by this form, and to possible redisplay it to request corrections to invalid data entries. It is without doubt the type of contribution to the public zone which is the most difficult to provision, since the accompanying mechanism requires twoo PHP execution passes, with different roles that must be understood completely.
Before this mechanism existed, the strategy for developing forms consisted of writing templates that contained their own PHP instructions. it is still possible to do this, but the result won't be very efficient since the results will never be cached; and this would still not allow you to avoid understanding the two PHP passes intrinsic to the operation.&lt;/p&gt; &lt;p&gt;The &lt;code class='spip_code' dir='ltr'&gt;public&lt;/code&gt; directory contains the squelette template compiler. This is a fairly complicated section of code, but since &lt;a href=&quot;http://www.spip.net/en_article3064.html&quot; class='spip_in'&gt;SPIP 1.8, 1.8.1&lt;/a&gt; it has benefited from a programming interface which makes the compiler totally extendable without requiring the coder to understand all of its internal details.
The least incomplete description of it is provided in French &lt;a href=&quot;http://www.spip-contrib.net/spikini/PagePrincipale?wiki=NouveauCompilo&quot; class='spip_out' rel='external'&gt;here&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;The &lt;code class='spip_code' dir='ltr'&gt;lib&lt;/code&gt; directory contains the library sub-directories developed outside the scope of SPIP which upon which it depends. At present, the only one supplied systematically is the &lt;code class='spip_code' dir='ltr'&gt;safehtml&lt;/code&gt; library which supplies security tools for scriptable pages. To contribute to this section, please contact the separate dedicated &lt;a href=&quot;http://pixel-apes.com/safehtml&quot; class='spip_out' rel='external'&gt;site&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;Final point: most of the SPIP files are used via the &lt;code class='spip_code' dir='ltr'&gt;charger_fonction&lt;/code&gt; function, which loads an file and calls the function of the same name which ought to be defined in that file. This means that the PHP file name must be composed only of characters which are acceptable in a PHP function name: this means that you should avoid using the minus sign, the period sign, etc.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;Programming rules&lt;/h3&gt;
&lt;p&gt;SPIP was started at a time when PHP automatically transformed global variables in to HTTP parameters. This suicidal style of programming was completely abandoned by PHP4. SPIP has followed a parallel evolution, but a little delayed in time. Even though the current code does not necessarily follow the rules that follow below, it is requested of all contributors that they respect them from here on in, without expecting SPIP to have completely abandoned the practice itself in a few odd locations.
As a guide, carefully examining the &lt;code class='spip_code' dir='ltr'&gt;ecrire/articles.php&lt;/code&gt; file is useful as it is currently the closest adherent to the specifications detailed below.&lt;/p&gt; &lt;p&gt;- Try to opt for writing functions. The philosophy of open source software is to be used in a maximum of different contexts, and so the code should be written as much as possible with a view to being reused outside of its initial development environment. Writing functions will no reference to any global variables and not executing any calls to &lt;code class='spip_code' dir='ltr'&gt;echo&lt;/code&gt;
or &lt;code class='spip_code' dir='ltr'&gt;print&lt;/code&gt; will guarantee a silent loading and calls that do not have any undesirable side effects.&lt;/p&gt; &lt;p&gt;- Avoid the use of global variables wherever possible. They are responsible for numerous security holes and make the code virtually impossible to be reused. Alternatives to them are:&lt;/p&gt; &lt;p&gt;&#8212; constants, which have the advantage of indicating to the reader that their values will not change throughout the entire execution of the script;&lt;/p&gt; &lt;p&gt;&#8212; static variables, which have the advantage of indicating to the reader that they relate to values of long life duration but are only of interest to the function that declares them.&lt;/p&gt; &lt;p&gt;- Write code that does not generate any error or warning in &lt;code class='spip_code' dir='ltr'&gt;error_reporting(E_ALL)&lt;/code&gt; mode. This makes it easier to update in the event of unintentionally undefined variables. If you really need to run the code outside of this mode, use the @ construct and limit the problematic code as much as possible, and opt for an error message into the log files using the &lt;code class='spip_code' dir='ltr'&gt;spip_log&lt;/code&gt; function.&lt;/p&gt; &lt;p&gt;- Comment on the &lt;i&gt;context&lt;/i&gt;, not the text. It serves nothing to paraphrase the names of its variables and functions, nor the PHP functions described in its manual: comments such as &lt;i&gt;loop through the table of values&lt;/i&gt; before a &lt;code class='spip_code' dir='ltr'&gt;foreach&lt;/code&gt; statement only serve to uselessly increase the size of the files. On the other hand, it's a good idea to indicate the argument types (PHP being a dynamically typed language, they can often be difficult to ascertain implicitly) and their presumed properties upon entry to the function (e.g. not null). When a difficult bug is corrected or expected, explain why the initial code was incorrect in order to avoid any later code refactoring reintroducing the fault under the guise of an attempt to optimise the code in question. Finally, SPIP has been developed in French, so try to avoid using terms not generally available in French dictionaries so that it is easier for non-native French speakers to understand what you have written (i.e. avoid local slang).&lt;/p&gt; &lt;p&gt;- Name your functions and variables sensibly.
The organisation of the SPIP code is originally based on breaking it up into dedicated directories with strict naming conventions, but we still try to avoid inconsistencies like including multilingualism within a given name. Functions within the same file will tend to have a common prefix or suffix that is inspired by the name of the file itself.&lt;/p&gt; &lt;p&gt;- Test your code on a maximum number of different configurations. do not overlook that SPIP should work on all its supported platforms, both in terms of servers and clients. You will necessarily have several browsers deployed on your machine, and you should test your code using at least two of them. Wherever possible, try it out on several different hosts as well. Whenever a particular platform requires unusual coding techniques, detail them explicitly, specifying the date and version number the test was executed.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;Presentation and coding rules&lt;/h3&gt;
&lt;p&gt;SPIP is concerned with the typographical quality of the pages that it sends out to HTTP clients, so it is therefore also concerned with the quality of its own internal files. It is highly recommended that you respect the rules below, which in any case are fairly standard in modern programming anyway.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Presentation&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;- The text of the functions should be of short line lengths, ideally less than the width of a standard screen, so that their entire structure is visible at a glance.&lt;/p&gt; &lt;p&gt;- The text of the functions should be indented, each block contained inside a pair of braces must be indented b an additional tab mark, a system which should be applied recursively for increasing logical depths.&lt;/p&gt; &lt;p&gt;- Use only the tab character for indenting, which allows the viewer to choose whatever equivalent space indenting that equates to according to the options set in their own text editor.&lt;/p&gt; &lt;p&gt;- Whenever a PHP instruction takes up several lines, insert a blank line both before and after it to make ti stand out clearly;&lt;/p&gt; &lt;p&gt;- HTML fragments, whether they be (&lt;code class='spip_code' dir='ltr'&gt;&lt;?php&lt;/code&gt;
or
&lt;code class='spip_code' dir='ltr'&gt;?&gt;&lt;/code&gt;) transitions of PHP expressions must for complete XHTML blocks: avoid inserting an opening tag at the start of a function and closing it at the end, which will not make it easy to relocate that pair should the need arise.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Typography&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;- When using parentheses or brackets, avoid using spaces after the opening one and before the closing one.&lt;/p&gt; &lt;p&gt;- Within PHP expressions, leave a space before and after any binary operators (+, =, *, AND, ...).&lt;/p&gt; &lt;p&gt;- Any (!, ...) unitary operators must be immediately adjacent to the parameter to which they apply.&lt;/p&gt; &lt;p&gt;- By convention, when calling a function, we do not insert any space before the opening parenthesis: &quot;f($x)&quot; and not &quot;f ($x)&quot;.
On the other hand, and to clearly distinguish the difference, we do insert a space before the parenthesis when it relates to a control structure integrated into the language&quot;if (!$x)&quot; and not &quot;if(!$x)&quot;.&lt;/p&gt; &lt;p&gt;- Any commas and semi-colons are followed by but not preceded by a blank space.&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="en">
		<title>The overall structure of SPIP</title>
		<link>http://www.spip.net/en_article5239.html</link>
		<guid isPermaLink="true">http://www.spip.net/en_article5239.html</guid>
		<dc:date>2010-08-18T13:25:49Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>en</dc:language>
		<dc:creator>Mark</dc:creator>



		<description>SPIP is a CMS truly quite unique in its field. Beyond the underlying system that defines it as being &quot;data driven&quot; by using its famous BOUCLE (loop) constructs, it has always emphasised and facilitated methods for individual webmasters to &quot;customise&quot; it's operations and presentation to meet the particular needs and tastes of any given site. This is primarily accomplished by creating one's own squelettes (templates), by enabling the attachment of special PHP code fragments, and by (...)

-
&lt;a href="http://www.spip.net/rubrique641.html" rel="directory"&gt;Introduction&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_texte'&gt;&lt;p&gt;SPIP is a CMS truly quite unique in its field.&lt;/p&gt; &lt;p&gt;Beyond the underlying system that defines it as being &quot;&lt;i&gt;data driven&lt;/i&gt;&quot; by using its famous BOUCLE (loop) constructs, it has always emphasised and facilitated methods for individual webmasters to &quot;&lt;i&gt;customise&lt;/i&gt;&quot; it's operations and presentation to meet the particular needs and tastes of any given site.&lt;/p&gt; &lt;p&gt;This is primarily accomplished by creating one's own &lt;strong&gt;squelettes&lt;/strong&gt; (templates), by enabling the attachment of special PHP code fragments, and by overloading the basic functions in the &quot;&lt;i&gt;core&lt;/i&gt;&quot; code (the default &lt;code class='spip_code' dir='ltr'&gt;function xxx_dist()&lt;/code&gt; naming mechanism that we will address again later).&lt;/p&gt; &lt;p&gt;Version 1.9 introduced an additional mechanism, that of administrator selected &lt;strong&gt;plugins&lt;/strong&gt;. These are the results of wanting to open up SPIP to new additional functionalities without needing to over-burden the SPIP kernel (aka the &lt;i&gt;core&lt;/i&gt;). In fact, the current tendency is to actually work on minimising this &lt;i&gt;core&lt;/i&gt; code by transferring optional features out to the plugins.
&lt;br /&gt;The SPIP 2.0 version has indeed been reduced and delivered with a collection of &lt;i&gt;basic&lt;/i&gt; plugins that the user/administrator can activate as and when necessary. For example, there's a debate running as to whether news items should no longer be in the &lt;i&gt;core&lt;/i&gt; but handed off to an optional plugin - many sites, in fact, have no need or call for news items at all, so it would be preferable to lighten the base system for those who do not actually need them.&lt;/p&gt; &lt;p&gt;Already previously, SPIP 1.9 had completely reorganised the directory structures that it employed in order to clearly separate elements according to their life expectancies, according to whether they were modifiable or not, and according to whether their appearance is standardised or customised relative to the core code or to the site's own standards. One of the other targeted objectives with that release was to open up the possibility of sharing the kernel core amongst several sites, allowing them to share a common code base that no longer then needed to be duplicated.&lt;/p&gt; &lt;p&gt;First up here, we will look at this new directory structure, in terms of what belongs to SPIP, what belongs to a specific site, what remains constant and what continually changes. In the following discussion, a number of directories have been renamed and/or deleted and/or added, so don't panic if you see something that you are unfamiliar with - check the version of SPIP that you are working with, and you should see that everything is, in fact, correctly structured as it ought to be.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;&lt;span style=&quot;font-size:large;&quot;&gt;Distribution&lt;/span&gt;&lt;/h3&gt;
&lt;h3 class=&quot;spip&quot;&gt;The site root&lt;/h3&gt;
&lt;p&gt;The root folder of a SPIP site has been completely emptied and now practically only contains the &lt;i&gt;index.php&lt;/i&gt; which redirects to &lt;i&gt;spip.php&lt;/i&gt;, which is now the unique point of entry to the public HTML site (of course, RSS feeds are still available, but they are XML and not HTML).&lt;/p&gt; &lt;p&gt;&lt;i&gt;inc-public.php3&lt;/i&gt; is a ghost file that has been retained for backwards compatibility.&lt;/p&gt; &lt;p&gt;&lt;i&gt;.htaccess&lt;/i&gt; is an optional file, essentially used for rewriting URLs.&lt;/p&gt; &lt;p&gt;&lt;i&gt;win_png.htc&lt;/i&gt; [&lt;a href='#nb1' class='spip_note' rel='footnote' title='deleted from version SPIP 2.0' id='nh1'&gt;1&lt;/a&gt;] onwards and &lt;i&gt;rien.gif&lt;/i&gt; to ensure png transparencies under most versions of MSIE.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;ecrire/&lt;/h3&gt;
&lt;p&gt;This folder now contains all of the files that can be interpreted by the server (PHP and MySQL) for both the &lt;i&gt;private&lt;/i&gt; and &lt;i&gt;public&lt;/i&gt; (in the public/ sub-directory) display screens.&lt;/p&gt; &lt;p&gt;The name of this folder (in French - &quot;to write&quot;) is historical, because it was previously the location which contained the code for &lt;strong&gt;writing&lt;/strong&gt; and modifying the site content. Paradoxically, it has now become a folder which never changes, as no one ever writes into it. In a standard installation, it only contains the scripts delivered with the standard distribution, and it is almost sacrosanct against any modifications of any kind whatsoever.&lt;/p&gt; &lt;p&gt;Its &lt;i&gt;index.php&lt;/i&gt; script is the entry point into &lt;i&gt;ecrire/&lt;/i&gt;, the private zone of the site, aka the &quot;back-end&quot;.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;dist/ [&lt;a href='#nb2' class='spip_note' rel='footnote' title='From SPIP 2.0 onwards, this folder has been renamed as . Please read: (...)' id='nh2'&gt;2&lt;/a&gt;]&lt;/h3&gt;
&lt;p&gt;This folder contains all of the files deliverable to the client (HTML, JavaScript, stylesheets, images in various formats) as well as the format templating files commonly known in SPIP as &lt;i&gt;squelettes&lt;/i&gt;, or &lt;i&gt;templates&lt;/i&gt; or &lt;i&gt;template files&lt;/i&gt; for English speakers. These squelettes are interpreted by the server in order to send pure MIME text content out to clients (most of the time this is HTML, but may also be RSS, SVG... maybe even JS or some other esoteric content format that you may require).&lt;/p&gt; &lt;p&gt;These are the standard such templates delivered with the SPIP distribution, which you theoretically MAY modify, but which you really OUGHT NOT to as your changes would be lost if you ever upgrade your SPIP system - it is vastly preferred to copy them into a new directory that you should create in the root directory named &lt;i&gt;squelettes/&lt;/i&gt;, and then modify them there instead, and they will automatically &lt;i&gt;override&lt;/i&gt; the default ones in the dist/ directory. They are included in the standard distribution so that you at least have something to display any content that you insert in the SPIP database, even if you haven't done any template customising work yet.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;oo/ [&lt;a href='#nb3' class='spip_note' rel='footnote' title='deleted starting from version SPIP 2.0' id='nh3'&gt;3&lt;/a&gt;]&lt;/h3&gt;
&lt;p&gt;This folder supplies the &quot;&lt;i&gt;accessibility&lt;/i&gt;&quot; mode for SPIP, being a text only based presentation. It essentially only contains an index that links into the standard system.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;&lt;span style=&quot;font-size:large;&quot;&gt;Adaptation&lt;/span&gt;&lt;/h3&gt;
&lt;h3 class=&quot;spip&quot;&gt;config/&lt;/h3&gt;
&lt;p&gt;This folder, created at system installation time, contains the database connection script: &lt;code class='spip_code' dir='ltr'&gt;connect.php&lt;/code&gt; and the script that assigns protections on files created by the server: &lt;code class='spip_code' dir='ltr'&gt;chmod.php&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;It is also where the universal site options are specified in a file (that you must create yourself) called : &lt;code class='spip_code' dir='ltr'&gt;mes_options.php&lt;/code&gt; [&lt;a href='#nb4' class='spip_note' rel='footnote' title='Please read: The mes_options.php file' id='nh4'&gt;4&lt;/a&gt;]&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;IMG/&lt;/h3&gt;
&lt;p&gt;This folder contains all of the document originals (in their original full sizes) associated with the site. It is subdivided into sub-folders for each possible type of document.
&lt;br /&gt;Upon installation, it only contains the test documents used for constructing images so that the administrator can observe the available functionalities of the server when setting up the site configuration in the private zone.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;squelettes/&lt;/h3&gt;
&lt;p&gt;This is where all of the files: scripts, images, form... particular to the site are stored, and its structure exactly follows that of &lt;code class='spip_code' dir='ltr'&gt;ecrire/&lt;/code&gt; or &lt;code class='spip_code' dir='ltr'&gt;dist/&lt;/code&gt;. For example, to redefine the the home page &lt;i&gt;sommaire&lt;/i&gt; for the site, you need to copy and then modify the &lt;code class='spip_code' dir='ltr'&gt;sommaire.html&lt;/code&gt; file form the &lt;code class='spip_code' dir='ltr'&gt;dist/&lt;/code&gt; directory.&lt;/p&gt; &lt;p&gt;In addition, and of particular importance, the &lt;code class='spip_code' dir='ltr'&gt;mes_fonctions.php&lt;/code&gt; script should be located here if/when you create one, so that it can be loaded on every recalculation of every page. Also note that you may create additional &lt;code class='spip_code' dir='ltr'&gt;xxx_fonctions.php&lt;/code&gt; files which will be only loaded when the corresponding &lt;code class='spip_code' dir='ltr'&gt;xxx&lt;/code&gt; page is requested (e.g. &lt;code class='spip_code' dir='ltr'&gt;sommaire_fonctions.php&lt;/code&gt;) for the home page.&lt;/p&gt; &lt;p&gt;When the system is first installed, you have no customisations of any kind, so this folder does not exist - you need to create it yourself when you start customising the SPIP installation. At this point, bear in mind that in recent versions of SPIP there are plugins available that supply their own entire sets of &lt;i&gt;squelette&lt;/i&gt; templates, which are maintained within the plugin directory structure, and which case you will not see the squelettes/ directory appear even though the public and private zones seem to clearly indicate that the site has been customised.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;plugins/&lt;/h3&gt;
&lt;p&gt;This folder, which also needs to be created manually after system installation, is used to store all of the sub-folders for each of the plugins. For example, the &lt;i&gt;crayons&lt;/i&gt; plugin is stored in the &lt;code class='spip_code' dir='ltr'&gt;plugins/crayons/&lt;/code&gt; folder.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;&lt;span style=&quot;font-size:large;&quot;&gt;Temporary files&lt;/span&gt;&lt;/h3&gt;
&lt;h3 class=&quot;spip&quot;&gt;local/&lt;/h3&gt;
&lt;p&gt;This contains all of the (re-)calculable files based on the site's data and uploaded or referenced documents.&lt;/p&gt; &lt;p&gt;It essentially normally consists of &lt;i&gt;caches&lt;/i&gt; of reduced images. There are also some other calculated caches stored here by certain plugins such as &quot;&lt;i&gt;coloration_code&lt;/i&gt;&quot;.&lt;/p&gt; &lt;p&gt;This folder may will be emptied, without any other impact than requiring its contents to be recalculated at such time as they are requested by site visitors.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;tmp/&lt;/h3&gt;
&lt;p&gt;This folder is used to store all of the site's normal temporary files, such as the template caches, session data, log files, etc.&lt;/p&gt; &lt;p&gt;It is also home to the &lt;code class='spip_code' dir='ltr'&gt;dump/&lt;/code&gt; sub-directory which stores all the database backups generated by the standard SPIP backup procedures provided in the private zone.&lt;/p&gt; &lt;p&gt;This folder, too, can be emptied at any time without affecting the site, but BE WARNED that you may also be deleting your only backups. Accordingly, proceed with caution and copy at least one back-up to your local machine before deleting all of those stored on the server.&lt;/p&gt;&lt;/div&gt;
		&lt;hr /&gt;
		&lt;div class='rss_notes'&gt;&lt;p&gt;[&lt;a href='#nh1' id='nb1' class='spip_note' title='Footnotes 1' rev='footnote'&gt;1&lt;/a&gt;] deleted from version &lt;a href=&quot;http://www.spip.net/en_article3837.html&quot; class='spip_in'&gt;&lt;span style='color: #273494;'&gt;SPIP 2.0&lt;/span&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;[&lt;a href='#nh2' id='nb2' class='spip_note' title='Footnotes 2' rev='footnote'&gt;2&lt;/a&gt;] From &lt;a href=&quot;http://www.spip.net/en_article3837.html&quot; class='spip_in'&gt;&lt;span style='color: #273494;'&gt;SPIP 2.0&lt;/span&gt;&lt;/a&gt; onwards, this folder has been renamed as &lt;code class='spip_code' dir='ltr'&gt;squelettes-dist/&lt;/code&gt;.
&lt;br /&gt;Please read: &lt;a href=&quot;http://www.spip.net/en_article4892.html&quot; class='spip_in' hreflang='en'&gt;Updating from 1 .9 .x to 2 .0 .x&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;[&lt;a href='#nh3' id='nb3' class='spip_note' title='Footnotes 3' rev='footnote'&gt;3&lt;/a&gt;] deleted starting from version &lt;a href=&quot;http://www.spip.net/en_article3837.html&quot; class='spip_in'&gt;&lt;span style='color: #273494;'&gt;SPIP 2.0&lt;/span&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;[&lt;a href='#nh4' id='nb4' class='spip_note' title='Footnotes 4' rev='footnote'&gt;4&lt;/a&gt;] Please read: &lt;a href=&quot;http://www.spip.net/en_article4909.html&quot; class='spip_in' hreflang='en'&gt;The mes_options.php file&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_ps'&gt;&lt;p&gt;See also: &lt;a href=&quot;http://www.spip.net/en_article5241.html&quot; class='spip_in' hreflang='en'&gt;Extending SPIP&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;
		</content:encoded>


		

	</item>
<item xml:lang="en">
		<title>#BIO</title>
		<link>http://www.spip.net/en_article4447.html</link>
		<guid isPermaLink="true">http://www.spip.net/en_article4447.html</guid>
		<dc:date>2010-08-18T09:41:32Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>en</dc:language>
		<dc:creator>Mark, Teddy</dc:creator>


		<dc:subject>BOUCLE(AUTEURS)</dc:subject>
		<dc:subject>#BIO</dc:subject>

		<description>Used in a loop (AUTEURS), the tag #BIO will show the biography of the author. The biography for any given author is the information entered in the administration zone just for that author. An author may only update his/her own details, except for site administrators, who can update the details for anyone.

-
&lt;a href="http://www.spip.net/rubrique545.html" rel="directory"&gt;Tags&lt;/a&gt;

/ 
&lt;a href="http://www.spip.net/@boucleauteurs" rel="tag"&gt;BOUCLE(AUTEURS)&lt;/a&gt;, 
&lt;a href="http://www.spip.net/@bio" rel="tag"&gt;#BIO&lt;/a&gt;

		</description>


 <content:encoded>&lt;div class='rss_texte'&gt;&lt;p&gt;Used in a loop (AUTEURS), the tag &lt;code class='spip_code' dir='ltr'&gt;#BIO&lt;/code&gt; will show the biography of the author. The biography for any given author is the information entered in the administration zone just for that author. An author may only update his/her own details, except for site administrators, who can update the details for anyone.&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="en">
		<title>The general principle</title>
		<link>http://www.spip.net/en_article5159.html</link>
		<guid isPermaLink="true">http://www.spip.net/en_article5159.html</guid>
		<dc:date>2010-08-18T09:38:15Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>en</dc:language>
		<dc:creator>Mark</dc:creator>



		<description>All of the content for a site managed with SPIP is stored in a MySQL database. In order to present these data to visitors of the site, it is then necessary to execute an operation which consists of reading those data, organising them, formatting them, and finally displaying an HTML page within a Web browser. Unless using an advanced content management system like SPIP, such operations can be quite unwieldy: you need to know how to programme in PHP and MySQL, and to code &quot;routines&quot; that (...)

-
&lt;a href="http://www.spip.net/rubrique57.html" rel="directory"&gt;Webmasters&lt;/a&gt;


		</description>


 <content:encoded>&lt;div class='rss_texte'&gt;&lt;p&gt;All of the content for a site managed with SPIP is stored in a MySQL database. In order to present these data to visitors of the site, it is then necessary to execute an operation which consists of reading those data, organising them, formatting them, and finally displaying an HTML page within a Web browser.&lt;/p&gt; &lt;p&gt;Unless using an advanced content management system like SPIP, such operations can be quite unwieldy:
&lt;br /&gt;- you need to know how to programme in PHP and MySQL, and to code &quot;routines&quot; that are relatively complex;
&lt;br /&gt;- you must integrate these routines with complex HTML page formatting that is temperamental at best;
&lt;br /&gt;- you need to develop an interface so that authorised users can modify the contents in the database; &lt;br /&gt;- you need to take account of performance issues: constantly using PHP and MySQL code consumes a lot of system resources, slows down visits to the site, and in extreme cases, can make your web server actually crash.&lt;/p&gt; &lt;p&gt;SPIP offers a complete solution to overcome these difficulties and more:
&lt;br /&gt;- formatting for the site is accomplished using HTML-formatted template files known as &lt;i&gt;squelettes&lt;/i&gt; (French for skeletons), which contain simplified instructions indicating where and how to position the data extracted from the database on to the HTML page;
&lt;br /&gt;- a cache system used to store every page and thereby avoid making so many calls to the database for every site visitor. This not only reduces the load on the server, but response time is much quicker, and the site remains visible even if the MySQL database for the site actually crashes;
&lt;br /&gt;- a &quot;private zone&quot; that is used by administrators and editors to manage all the data used for the site.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;One basic template file for each type of page&lt;/h3&gt;
&lt;p&gt;A key benefit &lt;i&gt;and limitation&lt;/i&gt; of an automated publishing system is defining a template file that can, for instance, be used for publishing all of the articles for a site. Indicated in this template is information on where to position the title, the text, the navigation links, etc. for the article, and we then allow the system to generate each individual article's page by automatically positioning the corresponding data from the database into the correct positions as intended by the webmaster.&lt;/p&gt; &lt;p&gt;This automated system then enables a consistent presentation across the site... and this also constitutes a limitation: it is unable to define a different interface for every single page (but we will see later that SPIP does nonetheless offer a considerable amount of flexibility to overcome this restriction).&lt;/p&gt; &lt;p&gt;When you install SPIP, a set of such templates is offered to you by default. This set is stored in the &lt;strong&gt;dist/&lt;/strong&gt; directory at the root of your site. As soon as you modify these templates to your own needs, or if you want to install another such set of templates, it's a good idea to create a new directory called &lt;strong&gt;squelettes/&lt;/strong&gt; at the same hierarchy level in your site, which will take priority over the standard ones, and which you can then leave in place as they were. For more details about this subject, please read the article &lt;a href=&quot;http://www.spip.net/en_article4907.html&quot; class='spip_in' hreflang='en'&gt;Where do I put the template files for my site?&lt;/a&gt; .&lt;/p&gt; &lt;p&gt;Whenever a visitor requests a page called &lt;code class='spip_code' dir='ltr'&gt;http://example.org/spip.php?article3437&lt;/code&gt;, SPIP will go to look for a template file called &quot;article.html&quot;. SPIP therefore is basing its decision on which template to use based on the URL address itself:&lt;/p&gt; &lt;table class=&quot;spip&quot;&gt;
&lt;thead&gt;&lt;tr class='row_first'&gt;&lt;th scope='col'&gt; L'URL &lt;/th&gt;&lt;th scope='col'&gt; will call the template file named &lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class='row_even'&gt;
&lt;td&gt;&lt;code class='spip_code' dir='ltr'&gt;spip.php?article3437&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;tt&gt;article.html&lt;/tt&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_odd'&gt;
&lt;td&gt;&lt;code class='spip_code' dir='ltr'&gt;spip.php?rubrique143&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;tt&gt;rubrique.html&lt;/tt&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_even'&gt;
&lt;td&gt;&lt;code class='spip_code' dir='ltr'&gt;spip.php?mot12&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;tt&gt;mot.html&lt;/tt&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_odd'&gt;
&lt;td&gt;&lt;code class='spip_code' dir='ltr'&gt;spip.php?auteur5&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;tt&gt;auteur.html&lt;/tt&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class='row_even'&gt;
&lt;td&gt;&lt;code class='spip_code' dir='ltr'&gt;spip.php?site364 &lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;tt&gt;site.html&lt;/tt&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;With two special cases of note:&lt;/p&gt; &lt;p&gt;- The URL &lt;code class='spip_code' dir='ltr'&gt;spip.php&lt;/code&gt; calls the sommaire.html template to generate and present the site's home page.
&lt;br /&gt;- The URL &lt;code class='spip_code' dir='ltr'&gt;spip.php?page=abcd&lt;/code&gt; calls the abcd.html template. In other words, you can create entire sets of templates which have not been pre-built into the system and name them however you choose to.&lt;/p&gt; &lt;p&gt;This syntax is also used for other kinds of page like the site map or for returning results from a search request, for example: &lt;code class='spip_code' dir='ltr'&gt;spip.php?page=plan&lt;/code&gt;, &lt;code class='spip_code' dir='ltr'&gt;spip.php?page=recherche&amp;recherche=squirrel&lt;/code&gt;.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;Whenever SPIP calls a template, it passes a context as &quot;arguments&quot; to that template&lt;/h3&gt;
&lt;p&gt;In addition, you can see above that the URL can supply other elements than just the name of the template. For example, in &lt;code class='spip_code' dir='ltr'&gt;spip.php?article3437&lt;/code&gt;, the number of the article requested is (3437); and in &lt;code class='spip_code' dir='ltr'&gt;spip.php?page=recherche&amp;recherche=squirrel&lt;/code&gt;, the word searched for is (squirrel).&lt;/p&gt; &lt;p&gt;This constitutes what we call a &quot;context&quot;, i.e. one or more &quot;environment variables&quot; that SPIP will provide to the template so that they can be used in the composition of the page. In fact, the article.html template needs to know the number of the requested article so it can go find the matching title, text and other fields from the database. In the same fashion, the recherche.html template needs to know what words the visitor has entered to search for in the database records.&lt;/p&gt; &lt;p&gt;Within the URL, the environment variables appear after the &quot;?&quot; character. When there are several such variables, they are separated by &quot;&amp;&quot; characters.&lt;/p&gt; &lt;p&gt;So the 'URL &lt;code class='spip_code' dir='ltr'&gt;spip.php?page=recherche&amp;recherche=squirrel&lt;/code&gt; has two variables: page and recherche, to which two respective values are assigned: &quot;recherche&quot; and &quot;squirrel&quot;.&lt;/p&gt; &lt;p&gt;In the case of &lt;code class='spip_code' dir='ltr'&gt;spip.php?article5159&lt;/code&gt;, SPIP has merely simplified the URL syntax which actually corresponds to : &lt;code class='spip_code' dir='ltr'&gt;spip.php?page=article&amp;id_article=5159&lt;/code&gt; (and yes, you can try it yourself if you want!). It therefore also has two variables: page, with the value &quot;article&quot;, and id_article with the value &quot;5159&quot;. These variables enable SPIP to use the data from article 5159 in the database within the article.html template.&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;How the cache works - made simple&lt;/h3&gt;
&lt;dl class='spip_document_2523 spip_documents'&gt;
&lt;dt&gt;&lt;img src='http://www.spip.net/local/cache-vignettes/L500xH501/flowchart-4f14d.jpg' width='500' height='501' alt='JPEG - 96.9 kb' style='height:501px;width:500px;' /&gt;&lt;/dt&gt;
&lt;dt class='crayon document-titre-2523 spip_doc_titre' style='width:350px;'&gt;&lt;strong&gt;Simplified schematic of the cache system&lt;/strong&gt;&lt;/dt&gt;
&lt;/dl&gt;
&lt;p&gt;SPIP looks to see if there is a page corresponding to the requested URL already stored in the &lt;strong&gt;CACHE&lt;/strong&gt;&lt;/p&gt; &lt;ol class=&quot;spip&quot;&gt;&lt;li&gt;If the page exists, SPIP checks that it's not too old.&lt;ol class=&quot;spip&quot;&gt;&lt;li&gt;If the page is too old, SPIP recalculates it using the appropriate template and data from the MySQL database. It then updates the &lt;strong&gt;CACHE&lt;/strong&gt; before returning that same file back to the user.&lt;/li&gt;&lt;li&gt;If the page is recent enough, that cached page is immediately returned back to the user.&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;li&gt;If the page doesn't exist in the cache at all, then it is calculated from the template and MySQL database. It is then also stored in the &lt;strong&gt;CACHE&lt;/strong&gt; before being returned to the requesting user.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;When the next visit to that page is made, if the duration between the two visits is sufficiently short, then the recently calculated page stored in the &lt;code class='spip_code' dir='ltr'&gt;/CACHE&lt;/code&gt; is returned without needing to recalculate everything and wait for the database. If the database has actually crashed, then it is always the cached page which is returned, if it has &quot;expired&quot;.&lt;/p&gt; &lt;blockquote class=&quot;spip&quot;&gt;
&lt;p&gt;&lt;i&gt;Note.&lt;/i&gt; We can see here that each page for the site is cached individually, and each recalculation is provoked by a visit to the site. There is generally not any overall recalculation of all pages in a single hit on a regular timed basis (this kind of &quot;major process&quot; often tends to overload the server and sometimes even make it crash).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;By default, a page is considered as expired after a period of 3600 seconds. [&lt;a href='#nb2-1' class='spip_note' rel='footnote' title='Once you understand SPIP's language syntax, you can change this period as (...)' id='nh2-1'&gt;1&lt;/a&gt;]&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;The .html file&lt;/h3&gt;
&lt;p&gt;Within SPIP, we call the &lt;strong&gt;&lt;code class='spip_code' dir='ltr'&gt;.html&lt;/code&gt;&lt;/strong&gt; files our &lt;strong&gt;squelettes&lt;/strong&gt; (French for skeleton, and commonly referred to in English as a &quot;template&quot; or &quot;template file&quot;). These are what describe the graphical interface of your site pages, in conjunction with any internal or external, default or customised CSS stylesheet rules that you may specify.&lt;/p&gt; &lt;p&gt;These files are coded directly in HTML, to which are added several instructions telling SPIP where it should position any elements that it extracts from the database (of the style: &quot;put the title here&quot;, &quot;show the list of articles with the same topic here&quot;, etc.).&lt;/p&gt; &lt;p&gt;The instructions for including and positioning such elements are coded in a special language, which is the subject of this entire on-line user manual. This language, as powerful as it may be, also constitutes the only real major hurdle for learning how to use SPIP. What's more, most of the keywords used in this language are derived from the French language, which can make learning SPIP additionally more tricky for those not conversant with that language [&lt;a href='#nb2-2' class='spip_note' rel='footnote' title='There are a handful of operators and functions also available in English, (...)' id='nh2-2'&gt;2&lt;/a&gt;].&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&quot;Yet another language?&quot;&lt;/strong&gt; Ah, yes, you will need to learn a new language. Fortunately, its structure is not very complicated, and it can be used to construct complex interfaces very quickly. In comparison to PHP and MySQL, you will see that you do, in fact, gain a lot of time since the SPIP language is actually a lot simpler than those other two. It is therefore a &lt;span lang=&quot;en&quot;&gt;&lt;i&gt;markup language&lt;/i&gt;&lt;/span&gt;, being one that employs tags quite similar to those in HTML itself.&lt;/p&gt; &lt;blockquote class=&quot;spip&quot;&gt;
&lt;p&gt;
&lt;i&gt;Note.&lt;/i&gt; In the same way that one can learn HTML by taking inspiration from the source code of sites that one visits, you can also inspire yourself from the templates used by other sites that work under SPIP. All you need to do is find the matching &quot;.html&quot; template file. For example, perhaps you would like to see &lt;a href=&quot;http://www.spip.net/squelettes/article.html&quot; class='spip_out'&gt;the template for the articles that you are currently viewing now&lt;/a&gt; (view the source code to reveal the text of the template).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a name=&quot;interface_differente&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;h3 class=&quot;spip&quot;&gt;A different interface for the same site&lt;/h3&gt;
&lt;p&gt;In addition to the default page formatting for the various types of content on the site (rubrique.html for sections, article.html for articles, breve.html for news items etc.), you are able to create different templates for particular sections of the site and any content belonging to those sections. You only need to create some new .html template files and name them according to the following principle:&lt;/p&gt; &lt;p&gt;- A different interface for a section and its contents (sub-sections, articles, new items, etc.): just append the template file name in question with &quot;-number&quot; (a hyphen followed by the number of that section).&lt;/p&gt; &lt;p&gt;For example, suppose you create a rubrique-60.html file, then it will be applied to section n&#176;60 and to all of its sub-sections instead of the standard rubrique.html. A template file named article-60.html will apply to all articles in section n&#176;60. If that section contains any sub-sections, then any articles in those sub-sections will also adopt the new template. The same would apply for news items in the section with breve-60.html... and so on and so forth.&lt;/p&gt; &lt;p&gt;- An interface for just one single section. (SPIP 1.3) You can also create an interface for one section, but not for its sub-sections. This is done by naming the file with an equal sign instead of the hyphen, i.e. &quot;=number&quot;.&lt;/p&gt; &lt;p&gt;For example, creating a file called rubrique=60.html will make it apply only to section n&#176;60 and not to its sub-sections. The same principle applies to article=60.html, breve=60.html, etc. These templates are applied to the contents of section n&#176;60 but not to the contents of any of its sub-sections, which will simply use the default formatting instead.&lt;/p&gt; &lt;p&gt;- An interface for each language supported in a multi-lingual site. This is done by including the two-character language code in the file name just before the &lt;code class='spip_code' dir='ltr'&gt;.html&lt;/code&gt; suffix, e.g. article.en.html, article.fr.html, article.de.html, etc. For full details on this, please read the article on &lt;a href=&quot;http://www.spip.net/en_article2444.html&quot; class='spip_in' hreflang='en'&gt;Internationalizing Templates&lt;/a&gt;.&lt;/p&gt; &lt;blockquote class=&quot;spip&quot;&gt;
&lt;p&gt;Important note: the number indicated is ALWAYS that of the relevant section. Templates named article-60.html or article=60.html do not relate to article n&#176;60 but to articles contained in section n&#176;60.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 class=&quot;spip&quot;&gt;What can we put in the .html template files&lt;/h3&gt;
&lt;p&gt;The &lt;code class='spip_code' dir='ltr'&gt;.html&lt;/code&gt; files are essentially just &quot;text&quot; files, supplemented with instructions for inserting elements from the database.&lt;/p&gt; &lt;p&gt;SPIP only analyses and process these instructions for inserting database elements (coded in SPIP's own special language); SPIP otherwise completely ignores whatever else is in these files which does not match any of its own known instructions.&lt;/p&gt; &lt;p&gt;The files are therefore essentially HTML. You determine the page formatting, the HTML version you wish to employ, etc. You can obviously include CSS stylesheets, but also JavaScript, Flash... in summary: anything that you would normally put on a Web page anyway.&lt;/p&gt; &lt;p&gt;But you can just as easily (and it's all just text anyway) create XML files instead (e.g. the backend.html generates XML for RSS feeds).&lt;/p&gt; &lt;p&gt;Even more original: all of the pages returned to the visitor are extracted from the &lt;strong&gt;CACHE&lt;/strong&gt; by a page written in PHP. You may therefore include PHP instructions within your template files, which will be executed when the visit is actually made. Used judiciously, this possibility opens up enormous flexibility to SPIP, so that you can augment it (perhaps by adding a counter, for example) or even alter certain page formatting elements depending on the data extracted from the database.&lt;/p&gt;&lt;/div&gt;
		&lt;hr /&gt;
		&lt;div class='rss_notes'&gt;&lt;p&gt;[&lt;a href='#nh2-1' id='nb2-1' class='spip_note' title='Footnotes 2-1' rev='footnote'&gt;1&lt;/a&gt;] Once you understand SPIP's language syntax, you can change this period as you wish using the &lt;a href=&quot;http://www.spip.net/en_article2421.html&quot; class='spip_in' hreflang='en'&gt;#CACHE&lt;/a&gt; tag.&lt;/p&gt; &lt;p&gt;[&lt;a href='#nh2-2' id='nb2-2' class='spip_note' title='Footnotes 2-2' rev='footnote'&gt;2&lt;/a&gt;] There are a handful of operators and functions also available in English, but they really are the exception&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_ps'&gt;&lt;p&gt;This article is only valid for &lt;a href=&quot;http://www.spip.net/en_article3416.html&quot; class='spip_in'&gt; &lt;span style='color: darkviolet;'&gt;S&lt;/span&gt;&lt;span style='color: blue;'&gt;P&lt;/span&gt;&lt;span style='color: green;'&gt;I&lt;/span&gt;&lt;span style='color: salmon;'&gt;P&lt;/span&gt; &lt;span style='color: green;'&gt;1&lt;/span&gt;&lt;span style='color: blue;'&gt;.&lt;/span&gt;&lt;span style='color: darkviolet;'&gt;9&lt;/span&gt;&lt;/a&gt; and later. For prior versions, please read the &lt;a href=&quot;http://www.spip.net/en_article2068.html&quot; class='spip_in' hreflang='en'&gt;archived version&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;
		</content:encoded>


		
		<enclosure url="http://www.spip.net/IMG/png/Image_7.png" length="46147" type="image/png" />
		

	</item>



</channel>

</rss>
