mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 10:54:27 +02:00
added <![CDATA[ tags, sync translation informations, added missing para and infotables
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
<!-- EN-Revision: 1.4 Maintainer: gerald Status: ready -->
|
||||||
<chapter id="language.basic.syntax">
|
<chapter id="language.basic.syntax">
|
||||||
<title>Bases syntaxiques</title>
|
<title>Bases syntaxiques</title>
|
||||||
<para>
|
<para>
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
|
||||||
<sect1 id="language.modifier.date.format">
|
<sect1 id="language.modifier.date.format">
|
||||||
<title>date_format</title>
|
<title>date_format</title>
|
||||||
<informaltable frame="all">
|
<informaltable frame="all">
|
||||||
@@ -48,123 +48,176 @@
|
|||||||
</para>
|
</para>
|
||||||
<example>
|
<example>
|
||||||
<title>date_format</title>
|
<title>date_format</title>
|
||||||
<programlisting>
|
<programlisting role="php">
|
||||||
index.php:
|
<![CDATA[
|
||||||
|
<?php
|
||||||
|
|
||||||
$smarty = new Smarty;
|
$smarty = new Smarty;
|
||||||
$smarty->assign('hier', strtotime('-1 day'));
|
$smarty->assign('hier', strtotime('-1 day'));
|
||||||
$smarty->display('index.tpl');
|
$smarty->display('index.tpl');
|
||||||
|
?>
|
||||||
index.tpl:
|
]]>
|
||||||
|
</programlisting>
|
||||||
|
<para>
|
||||||
|
ou index.tpl est:
|
||||||
|
</para>
|
||||||
|
<programlisting>
|
||||||
|
<![CDATA[
|
||||||
{$smarty.now|date_format}
|
{$smarty.now|date_format}
|
||||||
{$smarty.now|date_format:"%A, %B %e, %Y"}
|
{$smarty.now|date_format:"%A, %B %e, %Y"}
|
||||||
{$smarty.now|date_format:"%H:%M:%S"}
|
{$smarty.now|date_format:"%H:%M:%S"}
|
||||||
{$hier|date_format}
|
{$hier|date_format}
|
||||||
{$hier|date_format:"%A, %B %e, %Y"}
|
{$hier|date_format:"%A, %B %e, %Y"}
|
||||||
{$hier|date_format:"%H:%M:%S"}
|
{$hier|date_format:"%H:%M:%S"}
|
||||||
|
]]>
|
||||||
SORTIE:
|
</programlisting>
|
||||||
|
<para>
|
||||||
|
Ce qui donne <20> l'<27>cran:
|
||||||
|
</para>
|
||||||
|
<screen>
|
||||||
|
<![CDATA[
|
||||||
Feb 6, 2001
|
Feb 6, 2001
|
||||||
Tuesday, February 6, 2001
|
Tuesday, February 6, 2001
|
||||||
14:33:00
|
14:33:00
|
||||||
Feb 5, 2001
|
Feb 5, 2001
|
||||||
Monday, February 5, 2001
|
Monday, February 5, 2001
|
||||||
14:33:00</programlisting>
|
14:33:00
|
||||||
|
]]>
|
||||||
|
</screen>
|
||||||
</example>
|
</example>
|
||||||
<example>
|
<para>
|
||||||
<title>date_format indicateurs de convertion</title>
|
date_format conversion specifiers:
|
||||||
<programlisting>
|
<itemizedlist>
|
||||||
|
<listitem><para>
|
||||||
%a - Abr<62>viation du jour de la semaine, selon les param<61>tres locaux.
|
%a - Abr<62>viation du jour de la semaine, selon les param<61>tres locaux.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
%A - Nom du jour de la semaine, selon les param<61>tres locaux.
|
%A - Nom du jour de la semaine, selon les param<61>tres locaux.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
%b - Abr<62>viation du nom du jour, selon les param<61>tres locaux.
|
%b - Abr<62>viation du nom du jour, selon les param<61>tres locaux.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
%B - Nom complet du mois, selon les param<61>tres locaux.
|
%B - Nom complet du mois, selon les param<61>tres locaux.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
%c - Pr<50>f<EFBFBD>rences d'affichage selon les param<61>tres locaux.
|
%c - Pr<50>f<EFBFBD>rences d'affichage selon les param<61>tres locaux.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
%C - Si<53>cle, (L'ann<6E>e divis<69>e par 100 et tronqu<71>e comme un entier, de 00 <20> 99)
|
%C - Si<53>cle, (L'ann<6E>e divis<69>e par 100 et tronqu<71>e comme un entier, de 00 <20> 99)
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
%d - Jour du mois, en tant que nombre d<>cimal (de 00 <20> 31)
|
%d - Jour du mois, en tant que nombre d<>cimal (de 00 <20> 31)
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
%D - m<>me chose que %m/%d/%y
|
%D - m<>me chose que %m/%d/%y
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
%e - Jour du mois en tant que nombre d<>cimal. Un chiffre unique est pr<70>c<EFBFBD>d<EFBFBD> par
|
%e - Jour du mois en tant que nombre d<>cimal. Un chiffre unique est pr<70>c<EFBFBD>d<EFBFBD> par
|
||||||
un espace (de 1 <20> 31)
|
un espace (de 1 <20> 31)
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
%g - Position de la semaine dans le si<73>cle [00,99]
|
%g - Position de la semaine dans le si<73>cle [00,99]
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
%G - Position de la semaine, incluant le si<73>cle [0000,9999]
|
%G - Position de la semaine, incluant le si<73>cle [0000,9999]
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
%h - identique <20> %b
|
%h - identique <20> %b
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
%H - L'heure en tant que d<>cimale, en utilisant une horloge sur 24 (de 00 <20> 23)
|
%H - L'heure en tant que d<>cimale, en utilisant une horloge sur 24 (de 00 <20> 23)
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
%I - L'heure en tant que d<>cimale en utilisant une horloge sur 12 (de 01 to 12)
|
%I - L'heure en tant que d<>cimale en utilisant une horloge sur 12 (de 01 to 12)
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
%j - jour de l'ann<6E>e (de 001 <20> 366)
|
%j - jour de l'ann<6E>e (de 001 <20> 366)
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
%k - Heure (horloge sur 24). Les num<75>ros <20> un chiffre sont pr<70>c<EFBFBD>d<EFBFBD>s d'un espace. (de 0 <20> 23)
|
%k - Heure (horloge sur 24). Les num<75>ros <20> un chiffre sont pr<70>c<EFBFBD>d<EFBFBD>s d'un espace. (de 0 <20> 23)
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
%l - Heure (horloge sur 12). Les num<75>ros <20> un chiffre sont pr<70>c<EFBFBD>d<EFBFBD>s d'un espace. (de 1 <20> 12)
|
%l - Heure (horloge sur 12). Les num<75>ros <20> un chiffre sont pr<70>c<EFBFBD>d<EFBFBD>s d'un espace. (de 1 <20> 12)
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
%m - Mois en tant que nombre d<>cimal (de 01 <20> 12)
|
%m - Mois en tant que nombre d<>cimal (de 01 <20> 12)
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
%M - Minute en tant que nombre d<>cimal
|
%M - Minute en tant que nombre d<>cimal
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
%n - Retour chariot (nouvelle ligne).
|
%n - Retour chariot (nouvelle ligne).
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
%p - soit am soit pm selon l'heure donn<6E>e, ou alors leurs correspondances locales.
|
%p - soit am soit pm selon l'heure donn<6E>e, ou alors leurs correspondances locales.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
%r - heure en notation a.m. et p.m.
|
%r - heure en notation a.m. et p.m.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
%R - Heure au format 24 heures
|
%R - Heure au format 24 heures
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
%S - Secondes en tant que nombre d<>cimal.
|
%S - Secondes en tant que nombre d<>cimal.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
%t - Caract<63>re tabulation.
|
%t - Caract<63>re tabulation.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
%T - Heure courante, <20>quivalent <20> %H:%M:%S
|
%T - Heure courante, <20>quivalent <20> %H:%M:%S
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
%u - Jour de la semaine en tant que nombre d<>cimal [1,7], ou 1 repr<70>sente le lundi.
|
%u - Jour de la semaine en tant que nombre d<>cimal [1,7], ou 1 repr<70>sente le lundi.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
%U - Le num<75>ro de la semaine en nombre d<>cimal, utilisant le premier dimanche
|
%U - Le num<75>ro de la semaine en nombre d<>cimal, utilisant le premier dimanche
|
||||||
en tant que premier jour de la premi<6D>re semaine.
|
en tant que premier jour de la premi<6D>re semaine.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
%V - Le num<75>ro de la semaine de l'ann<6E>e courante selon la norme ISO 8601:1988,
|
%V - Le num<75>ro de la semaine de l'ann<6E>e courante selon la norme ISO 8601:1988,
|
||||||
de 01 <20> 53, ou la semaine 1 est la premi<6D>re semaine qui dispose au minimum
|
de 01 <20> 53, ou la semaine 1 est la premi<6D>re semaine qui dispose au minimum
|
||||||
de 4 jours dans l'ann<6E>e courante et ou Lundi est le premier jour
|
de 4 jours dans l'ann<6E>e courante et ou Lundi est le premier jour
|
||||||
de cette semaine.
|
de cette semaine.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
%w - Jour de la semaine en tant que nombre d<>cimal, dimanche <20>tant 0
|
%w - Jour de la semaine en tant que nombre d<>cimal, dimanche <20>tant 0
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
%W - Le num<75>ro de la semaine de l'ann<6E>e courante en tant que nombre d<>cimal,
|
%W - Le num<75>ro de la semaine de l'ann<6E>e courante en tant que nombre d<>cimal,
|
||||||
ou Lundi est le premier jour de la premi<6D>re semaine.
|
ou Lundi est le premier jour de la premi<6D>re semaine.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
%x - Repr<70>sentation pr<70>f<EFBFBD>r<EFBFBD>e de la date selon les param<61>tres locaux.
|
%x - Repr<70>sentation pr<70>f<EFBFBD>r<EFBFBD>e de la date selon les param<61>tres locaux.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
%X - Repr<70>sentation pr<70>f<EFBFBD>r<EFBFBD>e de l'heure selon les param<61>tres locaux, sans la
|
%X - Repr<70>sentation pr<70>f<EFBFBD>r<EFBFBD>e de l'heure selon les param<61>tres locaux, sans la
|
||||||
date.
|
date.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
%y - L'ann<6E>e en tant que nombre d<>cimal, sans le si<73>cle. (de 00 <20> 99)
|
%y - L'ann<6E>e en tant que nombre d<>cimal, sans le si<73>cle. (de 00 <20> 99)
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
%Y - L'ann<6E>e en tant que nombre d<>cimal, avec le si<73>cle.
|
%Y - L'ann<6E>e en tant que nombre d<>cimal, avec le si<73>cle.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
%Z - Zone horraire, nom ou abr<62>viation
|
%Z - Zone horraire, nom ou abr<62>viation
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
%% - Un caract<63>re lit<69>ral `%'
|
%% - Un caract<63>re lit<69>ral `%'
|
||||||
|
</para></listitem>
|
||||||
NOTE AUX DEVELOPPEURS: date_format est un alias de la fonction
|
</itemizedlist>
|
||||||
PHP strftime(). Il est probable que vous disposiez de plus ou moins d'options
|
<note>
|
||||||
disponibles selon le syst<73>me sur lequel PHP a <20>t<EFBFBD> compil<69> (strftime ()).
|
<title>Note aux d<>veloppeurs</title>
|
||||||
Reportez vous <20> l'aide de votre syst<73>me pour une liste compl<70>te des
|
<para>
|
||||||
param<EFBFBD>tres disponibles.</programlisting>
|
NOTE AUX DEVELOPPEURS: date_format est un alias de la fonction
|
||||||
</example>
|
PHP strftime(). Il est probable que vous disposiez de plus ou moins d'options
|
||||||
|
disponibles selon le syst<73>me sur lequel PHP a <20>t<EFBFBD> compil<69> (strftime ()).
|
||||||
|
Reportez vous <20> l'aide de votre syst<73>me pour une liste compl<70>te des
|
||||||
|
param<61>tres disponibles.
|
||||||
|
</para>
|
||||||
|
</note>
|
||||||
|
</para>
|
||||||
</sect1>
|
</sect1>
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
Local variables:
|
Local variables:
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
|
||||||
<sect1 id="language.modifier.default">
|
<sect1 id="language.modifier.default">
|
||||||
<title>default</title>
|
<title>default</title>
|
||||||
<informaltable frame="all">
|
<informaltable frame="all">
|
||||||
@@ -38,22 +38,31 @@
|
|||||||
</para>
|
</para>
|
||||||
<example>
|
<example>
|
||||||
<title>default</title>
|
<title>default</title>
|
||||||
<programlisting>
|
<programlisting role="php">
|
||||||
index.php:
|
<![CDATA[
|
||||||
|
<?php
|
||||||
$smarty = new Smarty;
|
$smarty = new Smarty;
|
||||||
$smarty->assign('TitreArticle', 'Les portes de la moria restent ferm<72>es.');
|
$smarty->assign('TitreArticle', 'Les portes de la moria restent ferm<72>es.');
|
||||||
$smarty->display('index.tpl');
|
$smarty->display('index.tpl');
|
||||||
|
?>
|
||||||
index.tpl:
|
]]>
|
||||||
|
</programlisting>
|
||||||
|
<para>
|
||||||
|
Ou index.tpl est:
|
||||||
|
</para>
|
||||||
|
<programlisting>
|
||||||
|
<![CDATA[
|
||||||
{$TitreArticle|default:"pas de titre"}
|
{$TitreArticle|default:"pas de titre"}
|
||||||
{$monTitre|default:"pas de titre"}
|
{$monTitre|default:"pas de titre"}
|
||||||
|
]]>
|
||||||
SORTIE:
|
</programlisting>
|
||||||
|
<para>
|
||||||
|
Ce qui donne <20> l'<27>cran :
|
||||||
|
</para>
|
||||||
|
<screen>
|
||||||
Les portes de la moria restent ferm<72>es.
|
Les portes de la moria restent ferm<72>es.
|
||||||
pas de titre</programlisting>
|
pas de titre
|
||||||
|
</screen>
|
||||||
</example>
|
</example>
|
||||||
</sect1>
|
</sect1>
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
|
||||||
<sect1 id="language.modifier.escape">
|
<sect1 id="language.modifier.escape">
|
||||||
<title>escape</title>
|
<title>escape</title>
|
||||||
<informaltable frame="all">
|
<informaltable frame="all">
|
||||||
@@ -42,32 +42,43 @@
|
|||||||
</para>
|
</para>
|
||||||
<example>
|
<example>
|
||||||
<title>escape</title>
|
<title>escape</title>
|
||||||
<programlisting>
|
<programlisting role="php">
|
||||||
index.php:
|
<![CDATA[
|
||||||
|
<?php
|
||||||
$smarty = new Smarty;
|
$smarty = new Smarty;
|
||||||
$smarty->assign('TitreArticle', "'Stiff Opposition Expected to Casketless Funeral Plan'");
|
$smarty->assign('TitreArticle', "'Stiff Opposition Expected to Casketless Funeral Plan'");
|
||||||
$smarty->display('index.tpl');
|
$smarty->display('index.tpl');
|
||||||
|
?>
|
||||||
index.tpl:
|
]]>
|
||||||
|
</programlisting>
|
||||||
|
<para>
|
||||||
|
Ou index.tpl est:
|
||||||
|
</para>
|
||||||
|
<programlisting>
|
||||||
|
<![CDATA[
|
||||||
{$titreArticle}
|
{$titreArticle}
|
||||||
{$titreArticle|escape}
|
{$titreArticle|escape}
|
||||||
{$titreArticle|escape:"html"} {* escapes & " ' < > *}
|
{$titreArticle|escape:"html"} {* escapes & " ' < > *}
|
||||||
{$titreArticle|escape:"htmlall"} {* escapes ALL html entities *}
|
{$titreArticle|escape:"htmlall"} {* escapes ALL html entities *}
|
||||||
{$titreArticle|escape:"url"}
|
{$titreArticle|escape:"url"}
|
||||||
{$titreArticle|escape:"quotes"}
|
{$titreArticle|escape:"quotes"}
|
||||||
<a href="mailto:{$EmailAddress|escape:"hex"}">{$EmailAddress|escape:"hexentity"}</a>
|
<a href="mailto:{$EmailAddress|escape:"hex"}">{$EmailAddress|escape:"hexentity"}</a>
|
||||||
|
]]>
|
||||||
SORTIE:
|
</programlisting>
|
||||||
|
<para>
|
||||||
|
Ce qui donne <20> l'<27>cran:
|
||||||
|
</para>
|
||||||
|
<screen>
|
||||||
|
<![CDATA[
|
||||||
'Stiff Opposition Expected to Casketless Funeral Plan'
|
'Stiff Opposition Expected to Casketless Funeral Plan'
|
||||||
&#039;Stiff Opposition Expected to Casketless Funeral Plan&#039;
|
&#039;Stiff Opposition Expected to Casketless Funeral Plan&#039;
|
||||||
&#039;Stiff Opposition Expected to Casketless Funeral Plan&#039;
|
&#039;Stiff Opposition Expected to Casketless Funeral Plan&#039;
|
||||||
&#039;Stiff Opposition Expected to Casketless Funeral Plan&#039;
|
&#039;Stiff Opposition Expected to Casketless Funeral Plan&#039;
|
||||||
%27Stiff+Opposition+Expected+to+Casketless+Funeral+Plan%27
|
%27Stiff+Opposition+Expected+to+Casketless+Funeral+Plan%27
|
||||||
\'Stiff Opposition Expected to Casketless Funeral Plan\'
|
\'Stiff Opposition Expected to Casketless Funeral Plan\'
|
||||||
<a href="mailto:%62%6f%62%40%6d%65%2e%6e%65%74">&#x62;&#x6f;&#x62;&#x40;&#x6d;&#x65;&#x2e;&#x6e;&#x65;&#x74;</a></programlisting>
|
<a href="mailto:%62%6f%62%40%6d%65%2e%6e%65%74">bob@me.net</a>
|
||||||
|
]]>
|
||||||
|
</screen>
|
||||||
</example>
|
</example>
|
||||||
</sect1>
|
</sect1>
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
<!-- EN-Revision: 1.2 Maintainer: gerald Status: ready -->
|
||||||
<sect1 id="language.modifier.indent">
|
<sect1 id="language.modifier.indent">
|
||||||
<title>indent</title>
|
<title>indent</title>
|
||||||
<informaltable frame="all">
|
<informaltable frame="all">
|
||||||
@@ -46,15 +46,20 @@
|
|||||||
</para>
|
</para>
|
||||||
<example>
|
<example>
|
||||||
<title>indent</title>
|
<title>indent</title>
|
||||||
<programlisting>
|
<programlisting role="php">
|
||||||
index.php:
|
<![CDATA[
|
||||||
|
<?php
|
||||||
$smarty = new Smarty;
|
$smarty = new Smarty;
|
||||||
$smarty->assign('TitreArticle', 'Il fera noir cette nuit.');
|
$smarty->assign('TitreArticle', 'Il fera noir cette nuit.');
|
||||||
$smarty->display('index.tpl');
|
$smarty->display('index.tpl');
|
||||||
|
?>
|
||||||
index.tpl:
|
]]>
|
||||||
|
</programlisting>
|
||||||
|
<para>
|
||||||
|
Ou index.tpl est:
|
||||||
|
</para>
|
||||||
|
<programlisting>
|
||||||
|
<![CDATA[
|
||||||
{$TitreArticle}
|
{$TitreArticle}
|
||||||
|
|
||||||
{$TitreArticle|indent}
|
{$TitreArticle|indent}
|
||||||
@@ -62,9 +67,13 @@ index.tpl:
|
|||||||
{$TitreArticle|indent:10}
|
{$TitreArticle|indent:10}
|
||||||
|
|
||||||
{$TitreArticle|indent:1:"\t"}
|
{$TitreArticle|indent:1:"\t"}
|
||||||
|
]]>
|
||||||
SORTIE:
|
</programlisting>
|
||||||
|
<para>
|
||||||
|
Ce qui donne <20> l'<27>cran
|
||||||
|
</para>
|
||||||
|
<screen>
|
||||||
|
<![CDATA[
|
||||||
Il fera noir cette nuit.
|
Il fera noir cette nuit.
|
||||||
|
|
||||||
Il fera noir cette nuit.
|
Il fera noir cette nuit.
|
||||||
@@ -72,7 +81,8 @@ Il fera noir cette nuit.
|
|||||||
Il fera noir cette nuit.
|
Il fera noir cette nuit.
|
||||||
|
|
||||||
Il fera noir cette nuit.
|
Il fera noir cette nuit.
|
||||||
</programlisting>
|
]]>
|
||||||
|
</screen>
|
||||||
</example>
|
</example>
|
||||||
</sect1>
|
</sect1>
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
|
||||||
<sect1 id="language.modifier.lower">
|
<sect1 id="language.modifier.lower">
|
||||||
<title>lower</title>
|
<title>lower</title>
|
||||||
<para>
|
<para>
|
||||||
@@ -8,22 +8,33 @@
|
|||||||
</para>
|
</para>
|
||||||
<example>
|
<example>
|
||||||
<title>lower</title>
|
<title>lower</title>
|
||||||
<programlisting>
|
<programlisting role="php">
|
||||||
index.php:
|
<![CDATA[
|
||||||
|
<?php
|
||||||
$smarty = new Smarty;
|
$smarty = new Smarty;
|
||||||
$smarty->assign('TitreArticle', 'Deux Suspects Se Sont Sauv<75>s.');
|
$smarty->assign('TitreArticle', 'Deux Suspects Se Sont Sauv<75>s.');
|
||||||
$smarty->display('index.tpl');
|
$smarty->display('index.tpl');
|
||||||
|
?>
|
||||||
index.tpl:
|
]]>
|
||||||
|
</programlisting>
|
||||||
|
<para>
|
||||||
|
Ou index.tpl est :
|
||||||
|
</para>
|
||||||
|
<programlisting>
|
||||||
|
<![CDATA[
|
||||||
{$TitreArticle}
|
{$TitreArticle}
|
||||||
{$TitreArticle|lower}
|
{$TitreArticle|lower}
|
||||||
|
]]>
|
||||||
SORTIE:
|
</programlisting>
|
||||||
|
<para>
|
||||||
|
Ce qui donne <20> l'<27>cran :
|
||||||
|
</para>
|
||||||
|
<screen>
|
||||||
|
<![CDATA[
|
||||||
Deux Suspects Se Sont Sauv<75>s.
|
Deux Suspects Se Sont Sauv<75>s.
|
||||||
deux suspects se sont sauv<75>s.</programlisting>
|
deux suspects se sont sauv<75>s.
|
||||||
|
]]>
|
||||||
|
</screen>
|
||||||
</example>
|
</example>
|
||||||
</sect1>
|
</sect1>
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
|
||||||
<sect1 id="language.modifier.nl2br">
|
<sect1 id="language.modifier.nl2br">
|
||||||
<title>nl2br</title>
|
<title>nl2br</title>
|
||||||
<para>
|
<para>
|
||||||
@@ -9,20 +9,31 @@
|
|||||||
</para>
|
</para>
|
||||||
<example>
|
<example>
|
||||||
<title>nl2br</title>
|
<title>nl2br</title>
|
||||||
<programlisting>
|
<programlisting role="php">
|
||||||
index.php:
|
<![CDATA[
|
||||||
|
<?php
|
||||||
$smarty = new Smarty;
|
$smarty = new Smarty;
|
||||||
$smarty->assign('TitreArticle', "Pluie ou soleil attendu\naujourd'hui, nuit noire");
|
$smarty->assign('TitreArticle', "Pluie ou soleil attendu\naujourd'hui, nuit noire");
|
||||||
$smarty->display('index.tpl');
|
$smarty->display('index.tpl');
|
||||||
|
?>
|
||||||
index.tpl:
|
]]>
|
||||||
|
</programlisting>
|
||||||
|
<para>
|
||||||
|
Ou index.tpl est :
|
||||||
|
</para>
|
||||||
|
<programlisting>
|
||||||
|
<![CDATA[
|
||||||
{$TitreArticle|nl2br}
|
{$TitreArticle|nl2br}
|
||||||
|
]]>
|
||||||
SORTIE:
|
</programlisting>
|
||||||
|
<para>
|
||||||
Pluie ou soleil attendu<br />aujourd'hui, nuit noire</programlisting>
|
Ce qui donne en sortie :
|
||||||
|
</para>
|
||||||
|
<screen>
|
||||||
|
<![CDATA[
|
||||||
|
Pluie ou soleil attendu<br />aujourd'hui, nuit noire
|
||||||
|
]]>
|
||||||
|
</screen>
|
||||||
</example>
|
</example>
|
||||||
</sect1>
|
</sect1>
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
|
||||||
<sect1 id="language.modifier.regex.replace">
|
<sect1 id="language.modifier.regex.replace">
|
||||||
<title>regex_replace</title>
|
<title>regex_replace</title>
|
||||||
<informaltable frame="all">
|
<informaltable frame="all">
|
||||||
@@ -43,25 +43,36 @@
|
|||||||
</para>
|
</para>
|
||||||
<example>
|
<example>
|
||||||
<title>regex_replace</title>
|
<title>regex_replace</title>
|
||||||
<programlisting>
|
<programlisting role="php">
|
||||||
index.php:
|
<![CDATA[
|
||||||
|
<?php
|
||||||
$smarty = new Smarty;
|
$smarty = new Smarty;
|
||||||
$smarty->assign('TitreArticle', "L'infertilit<69> est un maux grandissant\n, disent les experts.");
|
$smarty->assign('TitreArticle', "L'infertilit<69> est un maux grandissant\n, disent les experts.");
|
||||||
$smarty->display('index.tpl');
|
$smarty->display('index.tpl');
|
||||||
|
?>
|
||||||
index.tpl:
|
]]>
|
||||||
|
</programlisting>
|
||||||
|
<para>
|
||||||
|
Ou index.tpl est :
|
||||||
|
</para>
|
||||||
|
<programlisting>
|
||||||
|
<![CDATA[
|
||||||
{* Remplace tous les retours chariot et les tabulation par une nouvelle ligne avec un espace *}
|
{* Remplace tous les retours chariot et les tabulation par une nouvelle ligne avec un espace *}
|
||||||
|
|
||||||
{$TitreArticle}
|
{$TitreArticle}
|
||||||
{$TitreArticle|regex_replace:"/[\r\t\n]/":" "}
|
{$TitreArticle|regex_replace:"/[\r\t\n]/":" "}
|
||||||
|
]]>
|
||||||
SORTIE:
|
</programlisting>
|
||||||
|
<para>
|
||||||
|
Ce qui donne en sortie:
|
||||||
|
</para>
|
||||||
|
<screen>
|
||||||
|
<![CDATA[
|
||||||
L'infertilit<69> est un maux grandissant
|
L'infertilit<69> est un maux grandissant
|
||||||
, disent les experts.
|
, disent les experts.
|
||||||
L'infertilit<69> est un maux grandissant, disent les experts.</programlisting>
|
L'infertilit<69> est un maux grandissant, disent les experts.
|
||||||
|
]]>
|
||||||
|
</screen>
|
||||||
</example>
|
</example>
|
||||||
</sect1>
|
</sect1>
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
|
||||||
<sect1 id="language.modifier.replace">
|
<sect1 id="language.modifier.replace">
|
||||||
<title>replace</title>
|
<title>replace</title>
|
||||||
<informaltable frame="all">
|
<informaltable frame="all">
|
||||||
@@ -42,24 +42,35 @@
|
|||||||
</para>
|
</para>
|
||||||
<example>
|
<example>
|
||||||
<title>replace</title>
|
<title>replace</title>
|
||||||
<programlisting>
|
<programlisting role="php">
|
||||||
index.php:
|
<![CDATA[
|
||||||
|
<?php
|
||||||
$smarty = new Smarty;
|
$smarty = new Smarty;
|
||||||
$smarty->assign('titreArticle', "Child's Stool Great for Use in Garden.");
|
$smarty->assign('titreArticle', "Child's Stool Great for Use in Garden.");
|
||||||
$smarty->display('index.tpl');
|
$smarty->display('index.tpl');
|
||||||
|
?>
|
||||||
index.tpl:
|
]]>
|
||||||
|
</programlisting>
|
||||||
|
<para>
|
||||||
|
Ou index.tpl est :
|
||||||
|
</para>
|
||||||
|
<programlisting>
|
||||||
|
<![CDATA[
|
||||||
{$titreArticle}
|
{$titreArticle}
|
||||||
{$titreArticle|replace:"Garden":"Vineyard"}
|
{$titreArticle|replace:"Garden":"Vineyard"}
|
||||||
{$titreArticle|replace:" ":" "}
|
{$titreArticle|replace:" ":" "}
|
||||||
|
]]>
|
||||||
SORTIE:
|
</programlisting>
|
||||||
|
<para>
|
||||||
|
Ce qui donne en sortie :
|
||||||
|
</para>
|
||||||
|
<screen>
|
||||||
|
<![CDATA[
|
||||||
Child's Stool Great for Use in Garden.
|
Child's Stool Great for Use in Garden.
|
||||||
Child's Stool Great for Use in Vineyard.
|
Child's Stool Great for Use in Vineyard.
|
||||||
Child's Stool Great for Use in Garden.</programlisting>
|
Child's Stool Great for Use in Garden.
|
||||||
|
]]>
|
||||||
|
</screen>
|
||||||
</example>
|
</example>
|
||||||
</sect1>
|
</sect1>
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
|
||||||
<sect1 id="language.modifier.spacify">
|
<sect1 id="language.modifier.spacify">
|
||||||
<title>spacify</title>
|
<title>spacify</title>
|
||||||
<informaltable frame="all">
|
<informaltable frame="all">
|
||||||
@@ -37,25 +37,36 @@
|
|||||||
</para>
|
</para>
|
||||||
<example>
|
<example>
|
||||||
<title>spacify</title>
|
<title>spacify</title>
|
||||||
<programlisting>
|
<programlisting role="php">
|
||||||
index.php:
|
<![CDATA[
|
||||||
|
<?php
|
||||||
$smarty = new Smarty;
|
$smarty = new Smarty;
|
||||||
$smarty->assign('titreArticle', 'Quelque chose s'est mal pass<73> et <20> provoqu<71>
|
$smarty->assign('titreArticle', 'Quelque chose s\'est mal pass<73> et <20> provoqu<71>
|
||||||
cet accident, disent les experts');
|
cet accident, disent les experts');
|
||||||
$smarty->display('index.tpl');
|
$smarty->display('index.tpl');
|
||||||
|
?>
|
||||||
index.tpl:
|
]]>
|
||||||
|
</programlisting>
|
||||||
|
<para>
|
||||||
|
Ou index.tpl est :
|
||||||
|
</para>
|
||||||
|
<programlisting>
|
||||||
|
<![CDATA[
|
||||||
{$titreArticle}
|
{$titreArticle}
|
||||||
{$titreArticle|spacify}
|
{$titreArticle|spacify}
|
||||||
{$titreArticle|spacify:"^^"}
|
{$titreArticle|spacify:"^^"}
|
||||||
|
]]>
|
||||||
SORTIE:
|
</programlisting>
|
||||||
|
<para>
|
||||||
|
Ce qui donne <20> l'<27>cran :
|
||||||
|
</para>
|
||||||
|
<screen>
|
||||||
|
<![CDATA[
|
||||||
Quelquechose s'est mal pass<73> et <20> provoqu<71> cet accident, disent les experts.
|
Quelquechose s'est mal pass<73> et <20> provoqu<71> cet accident, disent les experts.
|
||||||
Q u e l q u e c h o s e s ' e s t m a l p a s s <20> e t <20> p r o v o q u <20> c e t a c c i d e n t , d i s e n t l e s e x p e r t s .
|
Q u e l q u e c h o s e s ' e s t m a l p a s s <20> e t <20> p r o v o q u <20> c e t a c c i d e n t , d i s e n t l e s e x p e r t s .
|
||||||
Q^^u^^e^^l^^q^^u^^e^^c^^h^^o^^s^^e^^ ^^s^^'^^e^^s^^t^^ ^^m^^a^^l^^ ^^p^^a^^s^^s^^<5E>^^ ^^e^^t^^ ^^<5E>^^ ^^p^^r^^o^^v^^o^^q^^u^^<5E>^^ ^^c^^e^^t^^ ^^a^^c^^c^^i^^d^^e^^n^^t^^,^^ ^^d^^i^^s^^e^^n^^t^^ ^^l^^e^^s^^ ^^e^^x^^p^^e^^r^^t^^s^^.</programlisting>
|
Q^^u^^e^^l^^q^^u^^e^^c^^h^^o^^s^^e^^ ^^s^^'^^e^^s^^t^^ ^^m^^a^^l^^ ^^p^^a^^s^^s^^<5E>^^ ^^e^^t^^ ^^<5E>^^ ^^p^^r^^o^^v^^o^^q^^u^^<5E>^^ ^^c^^e^^t^^ ^^a^^c^^c^^i^^d^^e^^n^^t^^,^^ ^^d^^i^^s^^e^^n^^t^^ ^^l^^e^^s^^ ^^e^^x^^p^^e^^r^^t^^s^^.
|
||||||
|
]]>
|
||||||
|
</screen>
|
||||||
</example>
|
</example>
|
||||||
</sect1>
|
</sect1>
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
|
||||||
<sect1 id="language.modifier.string.format">
|
<sect1 id="language.modifier.string.format">
|
||||||
<title>string_format</title>
|
<title>string_format</title>
|
||||||
<informaltable frame="all">
|
<informaltable frame="all">
|
||||||
@@ -36,24 +36,35 @@
|
|||||||
</para>
|
</para>
|
||||||
<example>
|
<example>
|
||||||
<title>string_format</title>
|
<title>string_format</title>
|
||||||
<programlisting>
|
<programlisting role="php">
|
||||||
index.php:
|
<![CDATA[
|
||||||
|
<?php
|
||||||
$smarty = new Smarty;
|
$smarty = new Smarty;
|
||||||
$smarty->assign('nombre', 23.5787446);
|
$smarty->assign('nombre', 23.5787446);
|
||||||
$smarty->display('index.tpl');
|
$smarty->display('index.tpl');
|
||||||
|
?>
|
||||||
index.tpl:
|
]]>
|
||||||
|
</programlisting>
|
||||||
|
<para>
|
||||||
|
ou index.tpl est :
|
||||||
|
</para>
|
||||||
|
<programlisting>
|
||||||
|
<![CDATA[
|
||||||
{$nombre}
|
{$nombre}
|
||||||
{$nombre|string_format:"%.2f"}
|
{$nombre|string_format:"%.2f"}
|
||||||
{$nombre|string_format:"%d"}
|
{$nombre|string_format:"%d"}
|
||||||
|
]]>
|
||||||
SORTIE:
|
</programlisting>
|
||||||
|
<para>
|
||||||
|
Ce qui donne en sortie :
|
||||||
|
</para>
|
||||||
|
<screen>
|
||||||
|
<![CDATA[
|
||||||
23.5787446
|
23.5787446
|
||||||
23.58
|
23.58
|
||||||
24</programlisting>
|
24
|
||||||
|
]]>
|
||||||
|
</screen>
|
||||||
</example>
|
</example>
|
||||||
</sect1>
|
</sect1>
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
|
@@ -1,33 +1,70 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
<!-- EN-Revision: 1.2 Maintainer: gerald Status: ready -->
|
||||||
<sect1 id="language.modifier.strip.tags">
|
<sect1 id="language.modifier.strip.tags">
|
||||||
<title>strip_tags</title>
|
<title>strip_tags</title>
|
||||||
|
<informaltable frame="all">
|
||||||
|
<tgroup cols="5">
|
||||||
|
<colspec colname="param" align="center" />
|
||||||
|
<colspec colname="type" align="center" />
|
||||||
|
<colspec colname="required" align="center" />
|
||||||
|
<colspec colname="default" align="center" />
|
||||||
|
<colspec colname="desc"/>
|
||||||
|
<thead>
|
||||||
|
<row>
|
||||||
|
<entry>Position du param<61>tre</entry>
|
||||||
|
<entry>Type</entry>
|
||||||
|
<entry>Requis</entry>
|
||||||
|
<entry>Defaut</entry>
|
||||||
|
<entry>Description</entry>
|
||||||
|
</row>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<row>
|
||||||
|
<entry>1</entry>
|
||||||
|
<entry>bool</entry>
|
||||||
|
<entry>Non</entry>
|
||||||
|
<entry>true</entry>
|
||||||
|
<entry>Si l'on remplace les <20>l<EFBFBD>ments par ' ' ou par ''</entry>
|
||||||
|
</row>
|
||||||
|
</tbody>
|
||||||
|
</tgroup>
|
||||||
|
</informaltable>
|
||||||
<para>
|
<para>
|
||||||
Supprime toutes les balises, et plus g<>n<EFBFBD>ralement tout ce qui se trouve
|
Supprime toutes les balises, et plus g<>n<EFBFBD>ralement tout ce qui se trouve
|
||||||
entre < et >.
|
entre < et >.
|
||||||
</para>
|
</para>
|
||||||
<example>
|
<example>
|
||||||
<title>strip_tags</title>
|
<title>strip_tags</title>
|
||||||
<programlisting>
|
<programlisting role="php">
|
||||||
index.php:
|
<![CDATA[
|
||||||
|
<?php
|
||||||
$smarty = new Smarty;
|
$smarty = new Smarty;
|
||||||
$smarty->assign('titreArticle', "Une femme aveugle obtient un nouveau <font face=\"helvetica\">
|
$smarty->assign('titreArticle', "Une femme aveugle obtient un nouveau <font face=\"helvetica\">rein</font> d'un p<>re qu'elle n'a pas vu depuis <b>des ann<6E>es</b>.");
|
||||||
rein</font> d'un p<>re qu'elle n'a pas vu depuis<b> des ann<6E>es</b>.");
|
$smarty->display('index.tpl');
|
||||||
$smarty->display('index.tpl');
|
?>
|
||||||
|
]]>
|
||||||
index.tpl:
|
</programlisting>
|
||||||
|
<para>
|
||||||
|
Ou index.tpl est :
|
||||||
|
</para>
|
||||||
|
<programlisting>
|
||||||
|
<![CDATA[
|
||||||
{$titreArticle}
|
{$titreArticle}
|
||||||
{$titreArticle|strip_tags}
|
{$titreArticle|strip_tags} {* identique <20> {$titreArticle|strip_tags:true} *}
|
||||||
|
{$titreArticle|strip_tags:false}
|
||||||
SORTIE:
|
]]>
|
||||||
|
</programlisting>
|
||||||
Une femme aveugle obtient un nouveau <font face=\"helvetica\">
|
<para>
|
||||||
rein</font> d'un p<>re qu'elle n'a pas vu depuis<b> des ann<6E>es</b>.
|
Ce qui donne en sortie :
|
||||||
Une femme aveugle obtient un nouveau rein d'un p<>re
|
</para>
|
||||||
qu'elle n'a pas vu depuis des ann<6E>es.</programlisting>
|
<screen>
|
||||||
|
<![CDATA[
|
||||||
|
Une femme aveugle obtient un nouveau <font face=\"helvetica\">rein</font> d'un p<>re qu'elle n'a pas vu depuis <b>des ann<6E>es</b>.
|
||||||
|
Une femme aveugle obtient un nouveau rein d'un p<>re qu'elle n'a pas vu depuis des ann<6E>es .
|
||||||
|
Une femme aveugle obtient un nouveau rein d'un p<>re qu'elle n'a pas vu depuis des ann<6E>es.
|
||||||
|
]]>
|
||||||
|
</screen>
|
||||||
</example>
|
</example>
|
||||||
</sect1>
|
</sect1>
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
|
||||||
<sect1 id="language.modifier.strip">
|
<sect1 id="language.modifier.strip">
|
||||||
<title>strip</title>
|
<title>strip</title>
|
||||||
<para>
|
<para>
|
||||||
@@ -17,27 +17,36 @@
|
|||||||
</note>
|
</note>
|
||||||
<example>
|
<example>
|
||||||
<title>strip</title>
|
<title>strip</title>
|
||||||
<programlisting>
|
<programlisting role="php">
|
||||||
index.php:
|
<![CDATA[
|
||||||
|
<?php
|
||||||
$smarty = new Smarty;
|
$smarty = new Smarty;
|
||||||
$smarty->assign('titreArticle', "Une r<>union autour\n d'un feu de chemin<69>e\t
|
$smarty->assign('titreArticle', "Une r<>union autour\n d'un feu de chemin<69>e\t
|
||||||
est toujours agr<67>able.");
|
est toujours agr<67>able.");
|
||||||
$smarty->display('index.tpl');
|
$smarty->display('index.tpl');
|
||||||
|
?>
|
||||||
index.tpl:
|
]]>
|
||||||
|
</programlisting>
|
||||||
|
<para>
|
||||||
|
Ou index.tpl est :
|
||||||
|
</para>
|
||||||
|
<programlisting>
|
||||||
|
<![CDATA[
|
||||||
{$titreArticle}
|
{$titreArticle}
|
||||||
{$titreArticle|strip}
|
{$titreArticle|strip}
|
||||||
{$titreArticle|strip:"&nbsp;"}
|
{$titreArticle|strip:"&nbsp;"}
|
||||||
|
]]>
|
||||||
SORTIE:
|
</programlisting>
|
||||||
|
<para>
|
||||||
|
Ce qui donne en sortie :
|
||||||
|
</para>
|
||||||
|
<screen>
|
||||||
Une r<>union autour
|
Une r<>union autour
|
||||||
d'un feu de chemin<69>e est toujours agr<67>able.
|
d'un feu de chemin<69>e est toujours agr<67>able.
|
||||||
Une r<>union autour d'un feu de chemin<69>e est toujours agr<67>able.
|
Une r<>union autour d'un feu de chemin<69>e est toujours agr<67>able.
|
||||||
Une&nbsp;r<>union&nbsp;autour&nbsp;d'un&nbsp;feu&nbsp;de&nbsp;chemin<69>e&nbsp;est&nbsp;toujours
|
Une&nbsp;r<>union&nbsp;autour&nbsp;d'un&nbsp;feu&nbsp;de&nbsp;chemin<69>e&nbsp;est&nbsp;toujours
|
||||||
&nbsp;agr<67>able.</programlisting>
|
&nbsp;agr<67>able.
|
||||||
|
</screen>
|
||||||
</example>
|
</example>
|
||||||
</sect1>
|
</sect1>
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
|
||||||
<sect1 id="language.modifier.truncate">
|
<sect1 id="language.modifier.truncate">
|
||||||
<title>truncate</title>
|
<title>truncate</title>
|
||||||
<informaltable frame="all">
|
<informaltable frame="all">
|
||||||
@@ -59,15 +59,20 @@
|
|||||||
</para>
|
</para>
|
||||||
<example>
|
<example>
|
||||||
<title>truncate</title>
|
<title>truncate</title>
|
||||||
<programlisting>
|
<programlisting role="php">
|
||||||
index.php:
|
<![CDATA[
|
||||||
|
<?php
|
||||||
$smarty = new Smarty;
|
$smarty = new Smarty;
|
||||||
$smarty->assign('titreArticle', 'Deux soeurs r<>unies apr<70>s 18 ans de s<>paration.');
|
$smarty->assign('titreArticle', 'Deux soeurs r<>unies apr<70>s 18 ans de s<>paration.');
|
||||||
$smarty->display('index.tpl');
|
$smarty->display('index.tpl');
|
||||||
|
?>
|
||||||
index.tpl:
|
]]>
|
||||||
|
</programlisting>
|
||||||
|
<para>
|
||||||
|
Ou index.tpl est :
|
||||||
|
</para>
|
||||||
|
<programlisting>
|
||||||
|
<![CDATA[
|
||||||
{$titreArticle}
|
{$titreArticle}
|
||||||
{$titreArticle|truncate}
|
{$titreArticle|truncate}
|
||||||
{$titreArticle|truncate:30}
|
{$titreArticle|truncate:30}
|
||||||
@@ -75,16 +80,21 @@ index.tpl:
|
|||||||
{$titreArticle|truncate:30:"---"}
|
{$titreArticle|truncate:30:"---"}
|
||||||
{$titreArticle|truncate:30:"":true}
|
{$titreArticle|truncate:30:"":true}
|
||||||
{$titreArticle|truncate:30:"...":true}
|
{$titreArticle|truncate:30:"...":true}
|
||||||
|
]]>
|
||||||
SORTIE:
|
</programlisting>
|
||||||
|
<para>
|
||||||
|
Ce qui donne en sortie :
|
||||||
|
</para>
|
||||||
|
<screen>
|
||||||
|
<![CDATA[
|
||||||
Deux soeurs r<>unies apr<70>s 18 ans de s<>paration.
|
Deux soeurs r<>unies apr<70>s 18 ans de s<>paration.
|
||||||
Deux soeurs r<>unies apr<70>s...
|
Deux soeurs r<>unies apr<70>s...
|
||||||
Deux soeurs r<>unies apr<70>s
|
Deux soeurs r<>unies apr<70>s
|
||||||
Deux soeurs r<>unies apr<70>s---
|
Deux soeurs r<>unies apr<70>s---
|
||||||
Deux soeurs r<>unies apr<70>s 18 a
|
Deux soeurs r<>unies apr<70>s 18 a
|
||||||
Deux soeurs r<>unies apr<70>s 1...
|
Deux soeurs r<>unies apr<70>s 1...
|
||||||
</programlisting>
|
]]>
|
||||||
|
</screen>
|
||||||
</example>
|
</example>
|
||||||
</sect1>
|
</sect1>
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
|
||||||
<sect1 id="language.modifier.upper">
|
<sect1 id="language.modifier.upper">
|
||||||
<title>upper</title>
|
<title>upper</title>
|
||||||
<para>
|
<para>
|
||||||
@@ -8,23 +8,32 @@
|
|||||||
</para>
|
</para>
|
||||||
<example>
|
<example>
|
||||||
<title>upper</title>
|
<title>upper</title>
|
||||||
<programlisting>
|
<programlisting role="php">
|
||||||
index.php:
|
<![CDATA[
|
||||||
|
<?php
|
||||||
$smarty = new Smarty;
|
$smarty = new Smarty;
|
||||||
$smarty->assign('titreArticle', "Si l'attaque n'est pas mise en place
|
$smarty->assign('titreArticle', "Si l'attaque n'est pas mise en place
|
||||||
rapidement, cela risque de durer longtemps.");
|
rapidement, cela risque de durer longtemps.");
|
||||||
$smarty->display('index.tpl');
|
$smarty->display('index.tpl');
|
||||||
|
?>
|
||||||
index.tpl:
|
]]>
|
||||||
|
</programlisting>
|
||||||
|
<para>
|
||||||
|
Ou index.tpl est:
|
||||||
|
</para>
|
||||||
|
<programlisting>
|
||||||
|
<![CDATA[
|
||||||
{$titreArticle}
|
{$titreArticle}
|
||||||
{$titreArticle|upper}
|
{$titreArticle|upper}
|
||||||
|
]]>
|
||||||
SORTIE:
|
</programlisting>
|
||||||
|
<para>
|
||||||
|
Ce qui donne en sortie :
|
||||||
|
</para>
|
||||||
|
<screen>
|
||||||
Si l'attaque n'est pas mise en place rapidement, cela risque de durer longtemps.
|
Si l'attaque n'est pas mise en place rapidement, cela risque de durer longtemps.
|
||||||
SI L'ATTAQUE N'EST PAS MISE EN PLACE RAPIDEMENT, CELA RISQUE DE DURER LONGTEMPS.</programlisting>
|
SI L'ATTAQUE N'EST PAS MISE EN PLACE RAPIDEMENT, CELA RISQUE DE DURER LONGTEMPS.
|
||||||
|
</screen>
|
||||||
</example>
|
</example>
|
||||||
</sect1>
|
</sect1>
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
|
||||||
<sect1 id="language.modifier.wordwrap">
|
<sect1 id="language.modifier.wordwrap">
|
||||||
<title>wordwrap</title>
|
<title>wordwrap</title>
|
||||||
<informaltable frame="all">
|
<informaltable frame="all">
|
||||||
@@ -55,28 +55,37 @@
|
|||||||
</para>
|
</para>
|
||||||
<example>
|
<example>
|
||||||
<title>wordwrap</title>
|
<title>wordwrap</title>
|
||||||
<programlisting>
|
<programlisting role="php">
|
||||||
index.php:
|
<![CDATA[
|
||||||
|
<?php
|
||||||
$smarty = new Smarty;
|
$smarty = new Smarty;
|
||||||
$smarty->assign('titreArticle', "Une femme aveugle obtient un nouveau rein
|
$smarty->assign('titreArticle', "Une femme aveugle obtient un nouveau rein
|
||||||
d'un p<>re qu'elle n'a pas vu depuis des ann<6E>es.");
|
d'un p<>re qu'elle n'a pas vu depuis des ann<6E>es.");
|
||||||
$smarty->display('index.tpl');
|
$smarty->display('index.tpl');
|
||||||
|
?>
|
||||||
index.tpl:
|
]]>
|
||||||
|
</programlisting>
|
||||||
|
<para>
|
||||||
|
ou index.tpl est :
|
||||||
|
</para>
|
||||||
|
<programlisting>
|
||||||
|
<![CDATA[
|
||||||
{$titreArticle}
|
{$titreArticle}
|
||||||
|
|
||||||
{$titreArticle|wordwrap:30}
|
{$titreArticle|wordwrap:30}
|
||||||
|
|
||||||
{$titreArticle|wordwrap:20}
|
{$titreArticle|wordwrap:20}
|
||||||
|
|
||||||
{$titreArticle|wordwrap:30:"<br>\n"}
|
{$titreArticle|wordwrap:30:"<br>\n"}
|
||||||
|
|
||||||
{$titreArticle|wordwrap:30:"\n":true}
|
{$titreArticle|wordwrap:30:"\n":true}
|
||||||
|
]]>
|
||||||
SORTIE:
|
</programlisting>
|
||||||
|
<para>
|
||||||
|
Ce qui donne en sortie :
|
||||||
|
</para>
|
||||||
|
<screen>
|
||||||
|
<![CDATA[
|
||||||
Une femme aveugle obtient un nouveau rein d'un p<>re qu'elle n'a pas vu depuis des ann<6E>es.
|
Une femme aveugle obtient un nouveau rein d'un p<>re qu'elle n'a pas vu depuis des ann<6E>es.
|
||||||
|
|
||||||
Une femme aveugle obtient un
|
Une femme aveugle obtient un
|
||||||
@@ -90,15 +99,16 @@ rein d'un p
|
|||||||
qu'elle n'a pas vu
|
qu'elle n'a pas vu
|
||||||
depuis des ann<6E>es.
|
depuis des ann<6E>es.
|
||||||
|
|
||||||
Une femme aveugle obtient un<br>
|
Une femme aveugle obtient un<br>;
|
||||||
nouveau rein d'un p<>re<br>
|
nouveau rein d'un p<>re<br>;
|
||||||
qu'elle n'a pas vu depuis<br>
|
qu'elle n'a pas vu depuis<br>;
|
||||||
des ann<6E>es.
|
des ann<6E>es.
|
||||||
|
|
||||||
Une femme aveugle obtient un n
|
Une femme aveugle obtient un n
|
||||||
ouveau rein d'un p<>re qu'elle
|
ouveau rein d'un p<>re qu'elle
|
||||||
n'a pas vu depuis des ann<6E>es.
|
n'a pas vu depuis des ann<6E>es.
|
||||||
</programlisting>
|
]]>
|
||||||
|
</screen>
|
||||||
</example>
|
</example>
|
||||||
</sect1>
|
</sect1>
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
|
Reference in New Issue
Block a user