cvs: smarty /docs/fr/designers/language-variables language-config-variables.xml language-variables-smarty.xml
"gerald croes" <[email protected]>
| Newsgroups | gmane.comp.php.cvs.smarty |
|---|---|
| Message-ID | <cvsgerald1088935351@cvsserver> |
gerald Sun Jul 4 06:02:31 2004 EDT
Modified files:
/smarty/docs/fr/designers/language-variables
language-config-variables.xml
language-variables-smarty.xml
Log:
added <![CDATA[ tags, synx translation informations. Designers section is now up to date.
http://cvs.php.net/diff.php/smarty/docs/fr/designers/language-variables/language-config-variables.xml?r1=1.2&r2=1.3&ty=u
Index: smarty/docs/fr/designers/language-variables/language-config-variables.xml
diff -u smarty/docs/fr/designers/language-variables/language-config-variables.xml:1.2 smarty/docs/fr/designers/language-variables/language-config-variables.xml:1.3
--- smarty/docs/fr/designers/language-variables/language-config-variables.xml:1.2 Sun May 23 11:50:22 2004
+++ smarty/docs/fr/designers/language-variables/language-config-variables.xml Sun Jul 4 06:02:31 2004
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
-<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
+<!-- $Revision: 1.3 $ -->
+<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
<sect1 id="language.config.variables">
<title>Variables chargées depuis des fichiers de configuration</title>
<para>
@@ -12,62 +12,77 @@
<example>
<title>variables de fichiers de configuration</title>
+<para>
+foo.conf
+</para>
<programlisting>
-foo.conf:
-
+<![CDATA[
pageTitle = "C'est le mien"
bodyBgColor = "#eeeeee"
tableBorderSize = "3"
tableBgColor = "#bbbbbb"
rowBgColor = "#cccccc"
-
+]]>
+</programlisting>
+<para>
index.tpl:
-
+</para>
+<programlisting>
+<![CDATA[
{config_load file="foo.conf"}
-<html>
-<title>{#pageTitle#}</title>
-<body bgcolor="{#bodyBgColor#}">
-<table border="{#tableBorderSize#}" bgcolor="{#tableBgColor#}">
-<tr bgcolor="{#rowBgColor#}">
- <td>First</td>
- <td>Last</td>
- <td>Address</td>
-</tr>
-</table>
-</body>
-</html>
-
+<html>
+<title>{#pageTitle#}</title>
+<body bgcolor="{#bodyBgColor#}">
+<table border="{#tableBorderSize#}" bgcolor="{#tableBgColor#}">
+<tr bgcolor="{#rowBgColor#}">
+ <td>First</td>
+ <td>Last</td>
+ <td>Address</td>
+</tr>
+</table>
+</body>
+</html>
+]]>
+</programlisting>
+<para>
index.tpl: (alternate syntax)
-
+</para>
+<programlisting>
+<![CDATA[
{config_load file="foo.conf"}
-<html>
-<title>{$smarty.config.pageTitle}</title>
-<body bgcolor="{$smarty.config.bodyBgColor}">
-<table border="{$smarty.config.tableBorderSize}" bgcolor="{$smarty.config.tableBgColor}">
-<tr bgcolor="{$smarty.config.rowBgColor}">
- <td>First</td>
- <td>Last</td>
- <td>Address</td>
-</tr>
-</table>
-</body>
-</html>
-
-
-SORTIE: (same for both examples)
-
-<html>
-<title>C'est le mien</title>
-<body bgcolor="#eeeeee">
-<table border="3" bgcolor="#bbbbbb">
-<tr bgcolor="#cccccc">
- <td>First</td>
- <td>Last</td>
- <td>Address</td>
-</tr>
-</table>
-</body>
-</html></programlisting>
+<html>
+<title>{$smarty.config.pageTitle}</title>
+<body bgcolor="{$smarty.config.bodyBgColor}">
+<table border="{$smarty.config.tableBorderSize}" bgcolor="{$smarty.config.tableBgColor}">
+<tr bgcolor="{$smarty.config.rowBgColor}">
+ <td>First</td>
+ <td>Last</td>
+ <td>Address</td>
+</tr>
+</table>
+</body>
+</html>
+]]>
+</programlisting>
+<para>
+Ce qui donne en sortie, pour les deux exemples :
+</para>
+<screen>
+<![CDATA[
+<html>
+<title>C'est le mien</title>
+<body bgcolor="#eeeeee">
+<table border="3" bgcolor="#bbbbbb">
+<tr bgcolor="#cccccc">
+ <td>First</td>
+ <td>Last</td>
+ <td>Address</td>
+</tr>
+</table>
+</body>
+</html>
+]]>
+</screen>
</example>
<para>
Les variables de fichier de configuration ne peuvent être utilisés tant
http://cvs.php.net/diff.php/smarty/docs/fr/designers/language-variables/language-variables-smarty.xml?r1=1.3&r2=1.4&ty=u
Index: smarty/docs/fr/designers/language-variables/language-variables-smarty.xml
diff -u smarty/docs/fr/designers/language-variables/language-variables-smarty.xml:1.3 smarty/docs/fr/designers/language-variables/language-variables-smarty.xml:1.4
--- smarty/docs/fr/designers/language-variables/language-variables-smarty.xml:1.3 Sun May 23 12:32:19 2004
+++ smarty/docs/fr/designers/language-variables/language-variables-smarty.xml Sun Jul 4 06:02:31 2004
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
-<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
+<!-- $Revision: 1.4 $ -->
+<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
<sect1 id="language.variables.smarty">
<title>Variable réservée {$smarty}</title>
<para>
@@ -18,6 +18,7 @@
<title>Afficher des variables de requête</title>
<programlisting>
+<![CDATA[
{* Affiche la valeur de page dans l'url (GET) http://www.domain.com/index.php?page=foo *}
{$smarty.get.page}
@@ -37,7 +38,9 @@
{$smarty.session.id}
{* affiche la variable "utilisateur" du regroupement de get/post/cookies/server/env *}
-{$smarty.request.utilisateur}</programlisting>
+{$smarty.request.utilisateur}
+]]>
+</programlisting>
</example>
</sect2>
@@ -53,8 +56,11 @@
<title>utilisation de {$smarty.now}</title>
<programlisting>
+<![CDATA[
{* utilise le modificateur de variable date_format pour afficher la date et heure *}
-{$smarty.now|date_format:"%d-%m-%Y %H:%M:%S"}</programlisting>
+{$smarty.now|date_format:"%d-%m-%Y %H:%M:%S"}
+]]>
+</programlisting>
</example>
</sect2>
<sect2 id="language.variables.smarty.const">
@@ -66,7 +72,10 @@
<title>Utiliser {$smarty.const}</title>
<programlisting>
-{$smarty.const._MA_CONSTANTE_}</programlisting>
+<![CDATA[
+{$smarty.const._MA_CONSTANTE_}
+]]>
+</programlisting>
</example>
</sect2>
--
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php