mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 10:54:27 +02:00
introducing the revcheck and WS
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
||||
<chapter id="chapter.debugging.console">
|
||||
<title>Console de d<>bogage</title>
|
||||
<para>
|
||||
@@ -16,8 +17,7 @@
|
||||
Pour d<>sactiver la console de d<>bogage, d<>finissez $debugging <20> false.
|
||||
Vous pouvez <20>galement temporairement activer le d<>bogage en indiquant
|
||||
SMARTY_DEBUG dans l'url si tant est que l'option
|
||||
<link
|
||||
linkend="variable.debugging.ctrl">$debugging_ctrl</link> soit activ<69>e.
|
||||
<link linkend="variable.debugging.ctrl">$debugging_ctrl</link> soit activ<69>e.
|
||||
</para>
|
||||
<note>
|
||||
<title>Note technique</title>
|
||||
|
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
||||
<chapter id="config.files">
|
||||
<title>Fichiers de configuration</title>
|
||||
<para>
|
||||
@@ -14,6 +15,7 @@
|
||||
<example>
|
||||
<title>Exemple de fichier de configuration</title>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
# variables globales
|
||||
titrePage = "Menu principal"
|
||||
bodyBgColor = #000000
|
||||
@@ -35,7 +37,9 @@ Intro = """Une valeur qui tient sur
|
||||
host=mon.domaine.com
|
||||
db=ADDRESSBOOK
|
||||
user=php-user
|
||||
pass=foobar</programlisting>
|
||||
pass=foobar
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
<para>
|
||||
Les valeurs des variables de fichiers de configuration peuvent <20>tre entre
|
||||
|
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
||||
<chapter id="language.basic.syntax">
|
||||
<title>Bases syntaxiques</title>
|
||||
<para>
|
||||
@@ -16,13 +17,10 @@
|
||||
</para>
|
||||
|
||||
&designers.language-basic-syntax.language-syntax-comments;
|
||||
|
||||
&designers.language-basic-syntax.language-syntax-functions;
|
||||
|
||||
&designers.language-basic-syntax.language-syntax-attributes;
|
||||
&designers.language-basic-syntax.language-syntax-quotes;
|
||||
&designers.language-basic-syntax.language-math;
|
||||
|
||||
&designers.language-basic-syntax.language-escaping;
|
||||
|
||||
</chapter>
|
||||
|
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
||||
<chapter id="language.builtin.functions">
|
||||
<title>Fonctions natives</title>
|
||||
<para>
|
||||
@@ -9,6 +10,7 @@
|
||||
qu'une fonction native. Vous ne pouvez pas non plus en modifier le
|
||||
comportement.
|
||||
</para>
|
||||
|
||||
&designers.language-builtin-functions.language-function-capture;
|
||||
&designers.language-builtin-functions.language-function-config-load;
|
||||
&designers.language-builtin-functions.language-function-foreach;
|
||||
@@ -21,6 +23,7 @@
|
||||
&designers.language-builtin-functions.language-function-php;
|
||||
&designers.language-builtin-functions.language-function-section;
|
||||
&designers.language-builtin-functions.language-function-strip;
|
||||
|
||||
</chapter>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
||||
<chapter id="language.combining.modifiers">
|
||||
<title>Combiner des modificateurs de variable.</title>
|
||||
<para>
|
||||
@@ -9,31 +10,43 @@
|
||||
</para>
|
||||
<example>
|
||||
<title>Combiner des modificateurs</title>
|
||||
<programlisting>
|
||||
index.php:
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
$smarty = new Smarty;
|
||||
$smarty->assign('titreArticle', 'Les fumeurs sont productifs, mais la mort
|
||||
$smarty->assign('titreArticle', 'Les fumeurs sont productifs, mais la mort
|
||||
tue l'efficacit<69>e.');
|
||||
$smarty->display('index.tpl');
|
||||
|
||||
index.tpl:
|
||||
$smarty->display('index.tpl');
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
<filename>index.tpl</filename> <20>tant :
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{$titreArticle}
|
||||
{$titreArticle|upper|spacify}
|
||||
{$titreArticle|lower|spacify|truncate}
|
||||
{$titreArticle|lower|truncate:30|spacify}
|
||||
{$titreArticle|lower|spacify|truncate:30:". . ."}
|
||||
|
||||
|
||||
SORTIE:
|
||||
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Cela va afficher :
|
||||
</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Les fumeurs sont productifs, mais la mort tue l'efficacit<69>e.
|
||||
L E S F U M E U R S S O N T P R O D U C T I F S , M A I S L A M O R T T U E L ' E F F I C A C I T <20> E .
|
||||
L E S F U M E U R S S O N T P R O D U C T I F S , M A I S L A M...
|
||||
L E S F U M E U R S S O N T P R O D U C T I F S , M A I S L A M...
|
||||
L e s f u m e u r s s o n t p r o d u c t i f s , . . .
|
||||
L e s f u m e u r s s. . .</programlisting>
|
||||
L e s f u m e u r s s. . .
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</chapter>
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
@@ -1,11 +1,13 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
||||
<chapter id="language.custom.functions">
|
||||
<title>Fonctions utilisateur</title>
|
||||
<para>
|
||||
Smarty est livr<76> avec plusieurs fonctions utilisateurs que vous pouvez
|
||||
appeler dans vos templates.
|
||||
</para>
|
||||
|
||||
&designers.language-custom-functions.language-function-assign;
|
||||
&designers.language-custom-functions.language-function-counter;
|
||||
&designers.language-custom-functions.language-function-cycle;
|
||||
@@ -24,6 +26,7 @@
|
||||
&designers.language-custom-functions.language-function-popup-init;
|
||||
&designers.language-custom-functions.language-function-popup;
|
||||
&designers.language-custom-functions.language-function-textformat;
|
||||
|
||||
</chapter>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
||||
<chapter id="language.modifiers">
|
||||
<title>Modificateurs de variables</title>
|
||||
<para>
|
||||
@@ -14,8 +15,9 @@
|
||||
<example>
|
||||
<title>Exemple de modificateur</title>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{* Met le titre en majuscule *}
|
||||
<h2>{$title|upper}</h2>
|
||||
<h2>{$title|upper}</h2>
|
||||
|
||||
{* Tronque le sujet <20> 40 caract<63>res, place des "..." <20> la fin *}
|
||||
Sujet: {$sujet|truncate:40:"..."}
|
||||
@@ -24,7 +26,9 @@ Sujet: {$sujet|truncate:40:"..."}
|
||||
{"now"|date_format:"%Y/%m/%d"}
|
||||
|
||||
{* application d'un modificateur <20> une fonction utilisateur *}
|
||||
{mailto|upper address="me@domain.dom"}</programlisting>
|
||||
{mailto|upper address="me@domain.dom"}
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
<para>
|
||||
Si vous appliquez un modificateur de variable <20> un tableau plut<75>t qu'<27> une
|
||||
|
@@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
||||
<chapter id="language.variables">
|
||||
<title>Variables</title>
|
||||
<para>
|
||||
Smarty poss<73>de diff<66>rents types de variables. Le type de ces variables d<>pend
|
||||
du symbole qui les pr<70>fixe, ou des symboles qui les entourent.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Les variables de Smarty peuvent <20>tre soit affich<63>es directement, soit utilis<69>es
|
||||
comme arguments pour les fonctions et modificateurs, <20> l'int<6E>rieur d'expressions
|
||||
@@ -14,18 +14,20 @@
|
||||
Pour afficher une variable, il suffit de l'entourer par des d<>limiteurs de
|
||||
telle sorte qu'elle soit la seule chose qu'ils contiennent. Exemple :
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{$Nom}
|
||||
|
||||
{$Contacts[enreg].Telephone}
|
||||
|
||||
<body bgcolor="{#bgcolor#}"></programlisting>
|
||||
<body bgcolor="{#bgcolor#}">
|
||||
]]>
|
||||
</programlisting>
|
||||
</para>
|
||||
|
||||
&designers.language-variables.language-assigned-variables;
|
||||
|
||||
&designers.language-variables.language-config-variables;
|
||||
|
||||
&designers.language-variables.language-variables-smarty;
|
||||
|
||||
</chapter>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
Reference in New Issue
Block a user