mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 10:54:27 +02:00
sync with EN
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
|
||||
<!-- EN-Revision: 1.2 Maintainer: gerald Status: ready -->
|
||||
<sect1 id="language.function.assign">
|
||||
<title>assign</title>
|
||||
<informaltable frame="all">
|
||||
@@ -42,14 +42,20 @@
|
||||
</para>
|
||||
<example>
|
||||
<title>assign</title>
|
||||
<programlisting>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{assign var="name" value="Bob"}
|
||||
|
||||
La valeur de $name est {$name}.
|
||||
|
||||
SORTIE:
|
||||
|
||||
La valeur de $name est Bob.</programlisting>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
L'exemple ci-dessus affichera :
|
||||
</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
La valeur de $name est Bob.]]>
|
||||
</screen>
|
||||
</example>
|
||||
</sect1>
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.2 Maintainer: gerald Status: ready -->
|
||||
<!-- EN-Revision: 1.3 Maintainer: gerald Status: ready -->
|
||||
<sect1 id="language.function.counter">
|
||||
<title>counter</title>
|
||||
<informaltable frame="all">
|
||||
@@ -81,7 +81,7 @@
|
||||
</para>
|
||||
<example>
|
||||
<title>counter</title>
|
||||
<programlisting>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{* initialisation du compteur *}
|
||||
{counter start=0 skip=2}<br />
|
||||
@@ -90,8 +90,9 @@
|
||||
{counter}<br />
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>SORTIE:</para>
|
||||
|
||||
<para>
|
||||
L'exemple ci-dessus affichera :
|
||||
</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
0<br />
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
|
||||
<!-- EN-Revision: 1.2 Maintainer: gerald Status: ready -->
|
||||
<sect1 id="language.function.eval">
|
||||
<title>eval</title>
|
||||
<informaltable frame="all">
|
||||
@@ -67,20 +67,23 @@
|
||||
</note>
|
||||
<example>
|
||||
<title>eval</title>
|
||||
<programlisting>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
setup.conf
|
||||
----------
|
||||
|
||||
emphstart = <b>
|
||||
emphend = </b>
|
||||
emphstart = <strong>
|
||||
emphend = </strong>
|
||||
titre = Bienvenue sur la homepage de {$company} !
|
||||
ErrorVille = Vous devez sp<73>cifier un nom de {#emphstart#}ville{#emphend#}.
|
||||
ErrorDept = Vous devez sp<73>cifier un {#emphstart#}d<>partement{#emphend#}.
|
||||
|
||||
|
||||
index.tpl
|
||||
---------
|
||||
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
O<> index.tpl est :
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{config_load file="setup.conf"}
|
||||
|
||||
{eval var=$foo}
|
||||
@@ -88,15 +91,21 @@ index.tpl
|
||||
{eval var=#ErrorVille#}
|
||||
{eval var=#ErrorDept# assign="state_error"}
|
||||
{$state_error}
|
||||
|
||||
SORTIE:
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
L'exemple ci-dessus affichera :
|
||||
</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
|
||||
Ceci est le contenu de foo.
|
||||
Bienvenue sur la homepage de FictifLand.
|
||||
Vous devez sp<73>cifier un nom de <b>ville</b>.
|
||||
Vous devez sp<73>cifier un <b>d<EFBFBD>partement</b>.
|
||||
Vous devez sp<73>cifier un nom de <strong>ville</strong>.
|
||||
Vous devez sp<73>cifier un <strong>d<>partement</strong>.
|
||||
|
||||
</programlisting>
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</sect1>
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.4 Maintainer: gerald Status: ready -->
|
||||
<!-- EN-Revision: 1.5 Maintainer: gerald Status: ready -->
|
||||
<sect1 id="language.function.fetch">
|
||||
<title>fetch</title>
|
||||
<informaltable frame="all">
|
||||
@@ -69,7 +69,7 @@
|
||||
</note>
|
||||
<example>
|
||||
<title>fetch</title>
|
||||
<programlisting>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{* Inclus du javascript dans votre template *}
|
||||
{fetch file="/export/httpd/www.example.com/docs/navbar.js"}
|
||||
@@ -86,7 +86,7 @@
|
||||
<b>{$weather}</b>
|
||||
{/if}
|
||||
]]>
|
||||
</programlisting>
|
||||
</programlisting>
|
||||
</example>
|
||||
</sect1>
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.7 Maintainer: gerald Status: ready -->
|
||||
<!-- EN-Revision: 1.8 Maintainer: gerald Status: ready -->
|
||||
<sect1 id="language.function.html.checkboxes">
|
||||
<title>html_checkboxes</title>
|
||||
<informaltable frame="all">
|
||||
@@ -106,7 +106,7 @@ $smarty->display('index.tpl');
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</programlisting>
|
||||
<para>
|
||||
et index.tpl est:
|
||||
</para>
|
||||
@@ -125,10 +125,10 @@ $smarty->display('index.tpl');
|
||||
require('Smarty.class.php');
|
||||
$smarty = new Smarty;
|
||||
$smarty->assign('cust_checkboxes', array(
|
||||
1000 => 'Joe Schmoe',
|
||||
1001 => 'Jack Smith',
|
||||
1002 => 'Jane Johnson',
|
||||
1003 => 'Charlie Brown'));
|
||||
1000 => 'Joe Schmoe',
|
||||
1001 => 'Jack Smith',
|
||||
1002 => 'Jane Johnson',
|
||||
1003 => 'Charlie Brown'));
|
||||
$smarty->assign('customer_id', 1001);
|
||||
$smarty->display('index.tpl');
|
||||
?>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.3 Maintainer: gerald Status: ready -->
|
||||
<!-- EN-Revision: 1.4 Maintainer: gerald Status: ready -->
|
||||
<sect1 id="language.function.html.image">
|
||||
<title>html_image</title>
|
||||
<informaltable frame="all">
|
||||
@@ -15,7 +15,7 @@
|
||||
<entry>Nom attribut</entry>
|
||||
<entry>Type</entry>
|
||||
<entry>Requis</entry>
|
||||
<entry>Defaut</entry>
|
||||
<entry>D<EFBFBD>faut</entry>
|
||||
<entry>Description</entry>
|
||||
</row>
|
||||
</thead>
|
||||
@@ -87,7 +87,7 @@
|
||||
</note>
|
||||
<example>
|
||||
<title>html_image</title>
|
||||
<programlisting role="php">
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
@@ -97,27 +97,27 @@ $smarty->display('index.tpl');
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
ou index.tpl est:
|
||||
</para>
|
||||
<programlisting>
|
||||
</programlisting>
|
||||
<para>
|
||||
o<EFBFBD> index.tpl est:
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{html_image file="pumpkin.jpg"}
|
||||
{html_image file="/path/from/docroot/pumpkin.jpg"}
|
||||
{html_image file="../path/relative/to/currdir/pumpkin.jpg"}
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Une sortie possible est :
|
||||
</para>
|
||||
<screen>
|
||||
</programlisting>
|
||||
<para>
|
||||
Une sortie possible est :
|
||||
</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
<img src="pumpkin.jpg" alt="" width="44" height="68" />
|
||||
<img src="/path/from/docroot/pumpkin.jpg" alt="" width="44" height="68" />
|
||||
<img src="../path/relative/to/currdir/pumpkin.jpg" alt="" width="44" height="68" />
|
||||
]]>
|
||||
</screen>
|
||||
</screen>
|
||||
</example>
|
||||
</sect1>
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.5 Maintainer: gerald Status: ready -->
|
||||
<!-- EN-Revision: 1.7 Maintainer: gerald Status: ready -->
|
||||
<sect1 id="language.function.html.options">
|
||||
<title>html_options</title>
|
||||
<informaltable frame="all">
|
||||
@@ -85,13 +85,11 @@
|
||||
le param<61>tre optionnel <emphasis>name</emphasis> n'est pas donn<6E>.
|
||||
</para>
|
||||
<example>
|
||||
<title>html_options</title>
|
||||
<title>html_options : Exemple 1</title>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
EXEMPLE 1
|
||||
---------
|
||||
|
||||
index.php:
|
||||
index.php:
|
||||
----------
|
||||
|
||||
require('Smarty.class.php');
|
||||
$smarty = new Smarty;
|
||||
@@ -101,16 +99,27 @@ Johnson','Charlie Brown'));
|
||||
$smarty->assign('client_id', 1001);
|
||||
$smarty->display('index.tpl');
|
||||
|
||||
index.tpl:
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
O<> index.tpl est :
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
|
||||
<select name=client_id>
|
||||
{html_options values=$id_client selected=$client_id output=$nom_client}
|
||||
</select>
|
||||
|
||||
EXEMPLE 2
|
||||
---------
|
||||
|
||||
index.php:
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Exemple 2 :
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
index.php:
|
||||
----------
|
||||
|
||||
require('Smarty.class.php');
|
||||
$smarty = new Smarty;
|
||||
@@ -122,15 +131,25 @@ $smarty->assign('cust_options', array(
|
||||
$smarty->assign('client_id', 1001);
|
||||
$smarty->display('index.tpl');
|
||||
|
||||
index.tpl:
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
O<> index.tpl est :
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
|
||||
<select name=client_id>
|
||||
{html_options options=$cust_options selected=$client_id}
|
||||
</select>
|
||||
|
||||
|
||||
SORTIE: (valable pour les deux exemples)
|
||||
-----------------------
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Les deux exemples afficheront :
|
||||
</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
|
||||
<select name=client_id>
|
||||
<option label="Joe Schmoe" value="1000">Joe Schmoe</option>
|
||||
@@ -139,7 +158,7 @@ SORTIE: (valable pour les deux exemples)
|
||||
<option label="Charlie Brown" value="1003">Charlie Brown</option>
|
||||
</select>
|
||||
]]>
|
||||
</programlisting>
|
||||
</screen>
|
||||
</example>
|
||||
</sect1>
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.4 Maintainer: gerald Status: ready -->
|
||||
<!-- EN-Revision: 1.6 Maintainer: gerald Status: ready -->
|
||||
<sect1 id="language.function.html.radios">
|
||||
<title>html_radios</title>
|
||||
<informaltable frame="all">
|
||||
@@ -81,50 +81,78 @@
|
||||
affich<63>s en tant que paires nom / valeur dans chaque balise <input>
|
||||
cr<63><72>e.
|
||||
</para>
|
||||
|
||||
|
||||
<example>
|
||||
<title>html_radios</title>
|
||||
<title>html_radios : Exemple 1</title>
|
||||
<programlisting>
|
||||
index.php:
|
||||
<![CDATA[
|
||||
index.php:
|
||||
----------
|
||||
|
||||
require('Smarty.class.php');
|
||||
$smarty = new Smarty;
|
||||
$smarty->assign('id_client', array(1000,1001,1002,1003));
|
||||
$smarty->assign('nom_client', array('Joe Schmoe','Jack Smith','Jane
|
||||
$smarty->assign('id_client', array(1000,1001,1002,1003));
|
||||
$smarty->assign('nom_client', array('Joe Schmoe','Jack Smith','Jane
|
||||
Johnson','Charlie Brown'));
|
||||
$smarty->assign('client_id', 1001);
|
||||
$smarty->display('index.tpl');
|
||||
$smarty->assign('client_id', 1001);
|
||||
$smarty->display('index.tpl');
|
||||
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
O<> index.tpl est :
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
|
||||
index.tpl:
|
||||
{html_radios name="id" values=$id_client checked=$client_id output=$nom_client separator="<br />"}
|
||||
|
||||
{html_radios name="id" values=$id_client checked=$client_id output=$nom_client separator="<br />"}
|
||||
|
||||
|
||||
index.php:
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Exemple 2 :
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
index.php:
|
||||
----------
|
||||
|
||||
require('Smarty.class.php');
|
||||
$smarty = new Smarty;
|
||||
$smarty->assign('cust_radios', array(
|
||||
1000 => 'Joe Schmoe',
|
||||
1001 => 'Jack Smith',
|
||||
1002 => 'Jane Johnson',
|
||||
1003 => 'Charlie Brown'));
|
||||
$smarty->assign('client_id', 1001);
|
||||
$smarty->display('index.tpl');
|
||||
$smarty->assign('cust_radios', array(
|
||||
1000 => 'Joe Schmoe',
|
||||
1001 => 'Jack Smith',
|
||||
1002 => 'Jane Johnson',
|
||||
1003 => 'Charlie Brown'));
|
||||
$smarty->assign('client_id', 1001);
|
||||
$smarty->display('index.tpl');
|
||||
|
||||
|
||||
index.tpl:
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
O<> index.tpl est :
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
|
||||
{html_radios name="id" options=$cust_radios checked=$client_id separator="<br />"}
|
||||
{html_radios name="id" options=$cust_radios checked=$client_id separator="<br />"}
|
||||
|
||||
|
||||
SORTIE: (pour les deux exemples)
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Les deux exemples ci-dessus afficheront :
|
||||
</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
|
||||
<label for="id_1000"><input type="radio" name="id" value="1000" id="id_1000" />Joe Schmoe</label><br />
|
||||
<label for="id_1001"><input type="radio" name="id" value="1001" id="id_1001" checked="checked" />Jack Smith</label><br />
|
||||
<label for="id_1002"><input type="radio" name="id" value="1002" id="id_1002" />Jane Johnson</label><br />
|
||||
<label for="id_1003"><input type="radio" name="id" value="1003" id="id_1003" />Charlie Brown</label><br /></programlisting>
|
||||
<label for="id_1000"><input type="radio" name="id" value="1000" id="id_1000" />Joe Schmoe</label><br />
|
||||
<label for="id_1001"><input type="radio" name="id" value="1001" id="id_1001" checked="checked" />Jack Smith</label><br />
|
||||
<label for="id_1002"><input type="radio" name="id" value="1002" id="id_1002" />Jane Johnson</label><br />
|
||||
<label for="id_1003"><input type="radio" name="id" value="1003" id="id_1003" />Charlie Brown</label><br />
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</sect1>
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.4 Maintainer: gerald Status: partial -->
|
||||
<!-- EN-Revision: 1.5 Maintainer: gerald Status: partial -->
|
||||
<sect1 id="language.function.html.select.date">
|
||||
<title>html_select_date</title>
|
||||
<informaltable frame="all">
|
||||
@@ -15,7 +15,7 @@
|
||||
<entry>Nom attribut</entry>
|
||||
<entry>Type</entry>
|
||||
<entry>Requis</entry>
|
||||
<entry>Defaut</entry>
|
||||
<entry>D<EFBFBD>faut</entry>
|
||||
<entry>Description</entry>
|
||||
</row>
|
||||
</thead>
|
||||
@@ -210,7 +210,6 @@
|
||||
affiche le texte donn<6E> en tant que libell<6C> et dispose de la valeur "".
|
||||
Utile par exemple lorsque vous souhaitez que la boite de s<>lection affiche
|
||||
"S<>lectionnez une ann<6E>e".
|
||||
|
||||
A savoir que vous pouvez sp<73>cifier des valeurs de la forme "-MM-JJ" pour
|
||||
l'attribut time afin d'indiquer une ann<6E>e non s<>lectionn<6E>e.</entry>
|
||||
</row>
|
||||
@@ -221,7 +220,6 @@
|
||||
<entry>null</entry>
|
||||
<entry>S'il est renseign<67>, le premier <20>l<EFBFBD>ment de la boite de s<>lection
|
||||
affiche le texte donn<6E> en tant que libell<6C> et dispose de la valeur "".
|
||||
|
||||
A savoir que vous pouvez sp<73>cifier des valeurs de la forme "AAAA--JJ" pour
|
||||
l'attribut time afin d'indiquer qu'il manque le moi.</entry>
|
||||
</row>
|
||||
@@ -232,7 +230,6 @@
|
||||
<entry>null</entry>
|
||||
<entry>S'il est renseign<67>, le premier <20>l<EFBFBD>ment de la boite de s<>lection
|
||||
affiche le texte donn<6E> en tant que libell<6C> et dispose de la valeur "".
|
||||
|
||||
A savoir que vous pouvez sp<73>cifier des valeurs de la forme "AAAA-MM-" pour
|
||||
l'attribut time afin d'indiquer qu'il manque le jour.
|
||||
</entry>
|
||||
@@ -247,15 +244,15 @@
|
||||
</para>
|
||||
<example>
|
||||
<title>html_select_date</title>
|
||||
<programlisting>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{html_select_date}
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Ce qui donne en sortie :
|
||||
</para>
|
||||
<screen>
|
||||
</programlisting>
|
||||
<para>
|
||||
Ce qui donne en sortie :
|
||||
</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
<select name="Date_Month">
|
||||
<option value="1">January</option>
|
||||
@@ -309,20 +306,20 @@ Ce qui donne en sortie :
|
||||
</select>
|
||||
|
||||
]]>
|
||||
</screen>
|
||||
</screen>
|
||||
</example>
|
||||
<example>
|
||||
<title>html_select_date</title>
|
||||
<programlisting>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{* le d<>marage et la fin de l'ann<6E>e peuvent <20>tre relatif <20> l'ann<6E>e courante *}
|
||||
{html_select_date prefix="StartDate" time=$time start_year="-5" end_year="+1" display_days=false}
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Ce qui donne en sortie: (L'ann<6E>e courante est 2000)
|
||||
</para>
|
||||
<screen>
|
||||
</programlisting>
|
||||
<para>
|
||||
Ce qui donne en sortie: (L'ann<6E>e courante est 2000)
|
||||
</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
<select name="StartDateMonth">
|
||||
<option value="1">January</option>
|
||||
@@ -348,8 +345,15 @@ Ce qui donne en sortie: (L'ann
|
||||
<option value="2001">2001</option>
|
||||
</select>
|
||||
]]>
|
||||
</screen>
|
||||
</screen>
|
||||
</example>
|
||||
<para>
|
||||
Voir aussi
|
||||
<link linkend="language.function.html.select.time">html_select_time</link>,
|
||||
<link linkend="language.modifier.date.format">date_format</link>,
|
||||
<link linkend="language.variables.smarty.now">$smarty.now</link> et
|
||||
les <link linkend="tips.dates">astuces sur les dates</link>.
|
||||
</para>
|
||||
</sect1>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.3 Maintainer: gerald Status: ready -->
|
||||
<!-- EN-Revision: 1.4 Maintainer: gerald Status: ready -->
|
||||
<sect1 id="language.function.html.select.time">
|
||||
<title>html_select_time</title>
|
||||
<informaltable frame="all">
|
||||
@@ -15,7 +15,7 @@
|
||||
<entry>Nom attribut</entry>
|
||||
<entry>Type</entry>
|
||||
<entry>Requis</entry>
|
||||
<entry>Defaut</entry>
|
||||
<entry>D<EFBFBD>faut</entry>
|
||||
<entry>Description</entry>
|
||||
</row>
|
||||
</thead>
|
||||
@@ -152,7 +152,7 @@
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Donne <20> l'<27>cran:
|
||||
L'exemple ci-dessus affichera :
|
||||
</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.3 Maintainer: gerald Status: ready -->
|
||||
<!-- EN-Revision: 1.4 Maintainer: gerald Status: ready -->
|
||||
<sect1 id="language.function.mailto">
|
||||
<title>mailto</title>
|
||||
<informaltable frame="all">
|
||||
@@ -102,13 +102,14 @@
|
||||
<note>
|
||||
<title>Note technique</title>
|
||||
<para>
|
||||
javascript n'est certainement pas la forme d'encodage la plus robuste.
|
||||
Javascript n'est certainement pas la forme d'encodage la plus robuste.
|
||||
Vous pouvez <20>galement utiliser un encodage hexad<61>cimal.
|
||||
</para>
|
||||
</note>
|
||||
<example>
|
||||
<title>mailto</title>
|
||||
<programlisting>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{mailto address="moi@example.com"}
|
||||
{mailto address="moi@example.com" text="send me some mail"}
|
||||
{mailto address="moi@example.com" encode="javascript"}
|
||||
@@ -116,26 +117,32 @@
|
||||
{mailto address="moi@example.com" subject="Hello to you!"}
|
||||
{mailto address="moi@example.com" cc="you@domain.com,they@domain.com"}
|
||||
{mailto address="moi@example.com" extra='class="email"'}
|
||||
{mailto address="me@example.com" encode="javascript_charcode"}
|
||||
|
||||
SORTIE:
|
||||
|
||||
<a href="mailto:moi@example.com" >moi@example.com</a>
|
||||
<a href="mailto:moi@example.com" >send me some mail</a>
|
||||
<script type="text/javascript" language="javascript">eval(unescape('%64%6f%63%75%6d%65%6e%74%2e%77%72%6
|
||||
{mailto address="moi@example.com" encode="javascript_charcode"}
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
L'exemple ci-dessus affichera :
|
||||
</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
<a href="mailto:moi@example.com" >moi@example.com</a>
|
||||
<a href="mailto:moi@example.com" >send me some mail</a>
|
||||
<script type="text/javascript" language="javascript">eval(unescape('%64%6f%63%75%6d%65%6e%74%2e%77%72%6
|
||||
9%74%65%28%27%3c%61%20%68%72%65%66%3d%22%6d%61%69%6c%74%6f%3a%6d%65%40%64%6f%6d%
|
||||
61%69%6e%2e%63%6f%6d%22%20%3e%6d%65%40%64%6f%6d%61%69%6e%2e%63%6f%6d%3c%2f%61%3e
|
||||
%27%29%3b'))</script>
|
||||
<a href="mailto:%6d%65@%64%6f%6d%61%69%6e.%63%6f%6d" >&#x6d;&#x65;&#x40;&#x64;&
|
||||
#x6f;&#x6d;&#x61;&#x69;&#x6e;&#x2e;&#x63;&#x6f;&#x6d;</a>
|
||||
<a href="mailto:moi@example.com?subject=Hello%20to%20you%21" >moi@example.com</a>
|
||||
<a href="mailto:moi@example.com?cc=you@example.com%2Cthey@example.com" >moi@example.com</a>
|
||||
<a href="mailto:me@example.com" class="email">me@example.com</a>
|
||||
<script type="text/javascript" language="javascript">
|
||||
<!--
|
||||
%27%29%3b'))</script>
|
||||
<a href="mailto:%6d%65@%64%6f%6d%61%69%6e.%63%6f%6d" >me@d&
|
||||
#x6f;main.com</a>
|
||||
<a href="mailto:moi@example.com?subject=Hello%20to%20you%21" >moi@example.com</a>
|
||||
<a href="mailto:moi@example.com?cc=you@example.com%2Cthey@example.com" >moi@example.com</a>
|
||||
<a href="mailto:moi@example.com" class="email">moi@example.com</a>
|
||||
<script type="text/javascript" language="javascript">
|
||||
<!--
|
||||
{document.write(String.fromCharCode(60,97,32,104,114,101,102,61,34,109,97,105,108,116,111,58,109,101,64,101,120,97,109,112,108,101,46,99,111,109,34,32,62,109,101,64,101,120,97,109,112,108,101,46,99,111,109,60,47,97,62))}
|
||||
//-->
|
||||
</script></programlisting>
|
||||
//-->
|
||||
</script>
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</sect1>
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
|
||||
<!-- EN-Revision: 1.2 Maintainer: gerald Status: ready -->
|
||||
<sect1 id="language.function.math">
|
||||
<title>math</title>
|
||||
<informaltable frame="all">
|
||||
@@ -15,7 +15,7 @@
|
||||
<entry>Nom attribut</entry>
|
||||
<entry>Type</entry>
|
||||
<entry>Requis</entry>
|
||||
<entry>Defaut</entry>
|
||||
<entry>D<EFBFBD>faut</entry>
|
||||
<entry>Description</entry>
|
||||
</row>
|
||||
</thead>
|
||||
@@ -89,44 +89,70 @@
|
||||
</note>
|
||||
<example>
|
||||
<title>math</title>
|
||||
<programlisting>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{* $height=4, $width=5 *}
|
||||
|
||||
{math equation="x + y" x=$height y=$width}
|
||||
|
||||
SORTIE:
|
||||
|
||||
9
|
||||
|
||||
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
L'exemple ci-dessus affichera :
|
||||
</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
9
|
||||
]]>
|
||||
</screen>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{* $row_height = 10, $row_width = 20, #col_div# = 2, assigned in template *}
|
||||
|
||||
{math equation="height * width / division"
|
||||
height=$row_height
|
||||
width=$row_width
|
||||
division=#col_div#}
|
||||
|
||||
SORTIE:
|
||||
|
||||
100
|
||||
|
||||
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
L'exemple ci-dessus affichera :
|
||||
</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
100
|
||||
]]>
|
||||
</screen>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{* vous pouvez utiliser des parenth<74>ses *}
|
||||
|
||||
{math equation="(( x + y ) / z )" x=2 y=10 z=2}
|
||||
|
||||
SORTIE:
|
||||
|
||||
6
|
||||
|
||||
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
L'exemple ci-dessus affichera :
|
||||
</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
6
|
||||
]]>
|
||||
</screen>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{* vous pouvez d<>finir un format sprintf pour l'affichage *}
|
||||
|
||||
{math equation="x + y" x=4.4444 y=5.0000 format="%.2f"}
|
||||
|
||||
SORTIE:
|
||||
|
||||
9.44</programlisting>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
L'exemple ci-dessus affichera :
|
||||
</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
9.44
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</sect1>
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
Reference in New Issue
Block a user