mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 19:04:27 +02:00
sync with EN
This commit is contained in:
@@ -1,8 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.3 Maintainer: gerald Status: ready -->
|
<!-- EN-Revision: 1.6 Maintainer: yannick Status: ready -->
|
||||||
|
|
||||||
<sect1 id="language.function.assign">
|
<sect1 id="language.function.assign">
|
||||||
<title>assign</title>
|
<title>{assign}</title>
|
||||||
|
<para>
|
||||||
|
{assign} est utilis<69> pour d<>clarer ou modifier des variables de template.
|
||||||
|
</para>
|
||||||
<informaltable frame="all">
|
<informaltable frame="all">
|
||||||
<tgroup cols="5">
|
<tgroup cols="5">
|
||||||
<colspec colname="param" align="center" />
|
<colspec colname="param" align="center" />
|
||||||
@@ -37,11 +41,8 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
</informaltable>
|
</informaltable>
|
||||||
<para>
|
|
||||||
{assign} est utilis<69> pour d<>clarer ou modifier des variables de template.
|
|
||||||
</para>
|
|
||||||
<example>
|
<example>
|
||||||
<title>assign</title>
|
<title>{assign}</title>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
{assign var="name" value="Bob"}
|
{assign var="name" value="Bob"}
|
||||||
@@ -58,12 +59,69 @@ La valeur de $name est Bob.
|
|||||||
]]>
|
]]>
|
||||||
</screen>
|
</screen>
|
||||||
</example>
|
</example>
|
||||||
|
|
||||||
|
<example>
|
||||||
|
<title>Acc<EFBFBD>s aux variables {assign} depuis un script PHP.</title>
|
||||||
|
<para>
|
||||||
|
Pour acc<63>der aux variables {assign} depuis PHP, utilisez
|
||||||
|
<link linkend="api.get.template.vars">get_template_vars()</link>.
|
||||||
|
Cependant, les variables ne sont disponibles qu'apr<70>s ou pendant l'ex<65>cution du
|
||||||
|
template, comme le montre l'exemple suivant :
|
||||||
|
</para>
|
||||||
|
<programlisting>
|
||||||
|
<![CDATA[
|
||||||
|
{* index.tpl *}
|
||||||
|
{assign var="foo" value="Smarty"}
|
||||||
|
]]>
|
||||||
|
</programlisting>
|
||||||
|
<programlisting role="php">
|
||||||
|
<![CDATA[
|
||||||
|
<?php
|
||||||
|
|
||||||
|
// ceci n'affichera rien car le template n'a pas encore <20>t<EFBFBD> ex<65>cut<75>
|
||||||
|
echo $smarty->get_template_vars('foo');
|
||||||
|
|
||||||
|
// Ex<45>cution du template
|
||||||
|
$dead = $smarty->fetch('index.tpl');
|
||||||
|
|
||||||
|
// Ceci affichera 'smarty' car le template a <20>t<EFBFBD> ex<65>cut<75>
|
||||||
|
echo $smarty->get_template_vars('foo');
|
||||||
|
|
||||||
|
$smarty->assign('foo','Even smarter');
|
||||||
|
|
||||||
|
// Ceci affichera 'Even smarter'
|
||||||
|
echo $smarty->get_template_vars('foo');
|
||||||
|
|
||||||
|
?>
|
||||||
|
]]>
|
||||||
|
</programlisting>
|
||||||
|
</example>
|
||||||
|
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Voir aussi
|
Les fonctions suivantes peuvent <emphasis>optionnellement</emphasis> assigner
|
||||||
|
des variables de template.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
<link linkend="language.function.capture">{capture}</link>,
|
||||||
|
<link linkend="language.function.include">{include}</link>,
|
||||||
|
<link linkend="language.function.include.php">{include_php}</link>,
|
||||||
|
<link linkend="language.function.insert">{insert}</link>,
|
||||||
|
<link linkend="language.function.counter">{counter}</link>,
|
||||||
|
<link linkend="language.function.cycle">{cycle}</link>,
|
||||||
|
<link linkend="language.function.eval">{eval}</link>,
|
||||||
|
<link linkend="language.function.fetch">{fetch}</link>,
|
||||||
|
<link linkend="language.function.math">{math}</link> et
|
||||||
|
<link linkend="language.function.textformat">{textformat}</link>.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Voir aussi
|
||||||
<link linkend="api.assign">assign()</link> et
|
<link linkend="api.assign">assign()</link> et
|
||||||
<link linkend="api.get.template.vars">get_template_vars()</link>.
|
<link linkend="api.get.template.vars">get_template_vars()</link>.
|
||||||
</para>
|
</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:
|
||||||
mode: sgml
|
mode: sgml
|
||||||
@@ -83,4 +141,4 @@ End:
|
|||||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||||
vim: et tw=78 syn=sgml
|
vim: et tw=78 syn=sgml
|
||||||
vi: ts=1 sw=1
|
vi: ts=1 sw=1
|
||||||
-->
|
-->
|
@@ -1,8 +1,22 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.3 Maintainer: gerald Status: ready -->
|
<!-- EN-Revision: 1.5 Maintainer: yannick Status: ready -->
|
||||||
|
|
||||||
<sect1 id="language.function.counter">
|
<sect1 id="language.function.counter">
|
||||||
<title>counter</title>
|
<title>{counter}</title>
|
||||||
|
<para>
|
||||||
|
{counter} affiche un compteur. {counter} retient la valeur
|
||||||
|
du compte <20> chaque it<69>ration. Vous pouvez adapter le nombre, l'intervale
|
||||||
|
et la direction du compteur, ainsi que d<>cider d'afficher ou non
|
||||||
|
les valeurs. Vous pouvez lancer plusieurs compteurs simultan<61>ment en
|
||||||
|
leur donnant des noms uniques. Si vous ne donnez pas de nom <20> un
|
||||||
|
compteur, 'default' sera utilis<69>.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Si vous donnez une valeur <20> l'attribut "assign", alors la sortie de la
|
||||||
|
fonction counter sera assign<67>e <20> la variable de template donn<6E>e plut<75>t
|
||||||
|
que d'<27>tre directement affich<63>e.
|
||||||
|
</para>
|
||||||
<informaltable frame="all">
|
<informaltable frame="all">
|
||||||
<tgroup cols="5">
|
<tgroup cols="5">
|
||||||
<colspec colname="param" align="center" />
|
<colspec colname="param" align="center" />
|
||||||
@@ -66,19 +80,6 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
</informaltable>
|
</informaltable>
|
||||||
<para>
|
|
||||||
counter affiche un compteur. counter retient la valeur
|
|
||||||
du compte <20> chaque it<69>ration. Vous pouvez adapter le nombre, l'intervale
|
|
||||||
et la direction du compteur, ainsi que d<>cider d'afficher ou non
|
|
||||||
les valeurs. Vous pouvez lancer plusieurs compteurs simultan<61>ment en
|
|
||||||
leur donnant des noms uniques. Si vous ne donnez pas de nom <20> un
|
|
||||||
compteur, 'default' sera utilis<69>.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
Si vous donnez une valeur <20> l'attribut "assign", alors la sortie de la
|
|
||||||
fonction counter sera assign<67>e <20> la variable de template donn<6E>e plut<75>t
|
|
||||||
que d'<27>tre directement affich<63>e.
|
|
||||||
</para>
|
|
||||||
<example>
|
<example>
|
||||||
<title>counter</title>
|
<title>counter</title>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
@@ -103,6 +104,7 @@
|
|||||||
</screen>
|
</screen>
|
||||||
</example>
|
</example>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
Local variables:
|
Local variables:
|
||||||
mode: sgml
|
mode: sgml
|
||||||
@@ -122,4 +124,4 @@ End:
|
|||||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||||
vim: et tw=78 syn=sgml
|
vim: et tw=78 syn=sgml
|
||||||
vi: ts=1 sw=1
|
vi: ts=1 sw=1
|
||||||
-->
|
-->
|
@@ -1,8 +1,14 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.2 Maintainer: gerald Status: ready -->
|
<!-- EN-Revision: 1.6 Maintainer: yannick Status: ready -->
|
||||||
|
|
||||||
<sect1 id="language.function.cycle">
|
<sect1 id="language.function.cycle">
|
||||||
<title>cycle</title>
|
<title>{cycle}</title>
|
||||||
|
<para>
|
||||||
|
{cycle} est utilis<69> pour boucler sur un ensemble de valeurs. Tr<54>s pratique
|
||||||
|
pour alterner entre deux ou plusieurs couleurs dans un tableau,
|
||||||
|
ou plus g<>n<EFBFBD>ralement pour boucler sur les valeurs d'un tableau.
|
||||||
|
</para>
|
||||||
<informaltable frame="all">
|
<informaltable frame="all">
|
||||||
<tgroup cols="5">
|
<tgroup cols="5">
|
||||||
<colspec colname="param" align="center" />
|
<colspec colname="param" align="center" />
|
||||||
@@ -65,16 +71,18 @@
|
|||||||
<entry>La variable de template dans laquelle la sortie
|
<entry>La variable de template dans laquelle la sortie
|
||||||
sera assign<67>e</entry>
|
sera assign<67>e</entry>
|
||||||
</row>
|
</row>
|
||||||
|
<row>
|
||||||
|
<entry>reset</entry>
|
||||||
|
<entry>bool<EFBFBD>en</entry>
|
||||||
|
<entry>Non</entry>
|
||||||
|
<entry><emphasis>false</emphasis></entry>
|
||||||
|
<entry>Le cycle sera d<>fini <20> la premi<6D>re valeur</entry>
|
||||||
|
</row>
|
||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
</informaltable>
|
</informaltable>
|
||||||
<para>
|
<para>
|
||||||
cycle est utilis<69> pour boucler sur un ensemble de valeurs. Tr<54>s pratique
|
Vous pouvez d<>finir plusieurs {cycle} dans votre template, en leur
|
||||||
pour alterner entre deux ou plusieurs couleurs dans un tableau,
|
|
||||||
ou plus g<>n<EFBFBD>ralement pour boucler sur les valeurs d'un tableau.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
Vous pouvez d<>finir plusieurs "cycle" dans votre template, en leur
|
|
||||||
donnant des noms uniques (attribut name).
|
donnant des noms uniques (attribut name).
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
@@ -84,14 +92,14 @@
|
|||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
L'attribut advance est utilis<69> pour r<>p<EFBFBD>ter une valeur. Lorsque
|
L'attribut advance est utilis<69> pour r<>p<EFBFBD>ter une valeur. Lorsque
|
||||||
d<>finit <20> false, le prochain appel de cycle ram<61>nera la m<>me valeur.
|
d<>finit <20> false, le prochain appel de {cycle} ram<61>nera la m<>me valeur.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Si vous d<>finissez l'attribut sp<73>cial "assign", la sortie de la fonction
|
Si vous d<>finissez l'attribut sp<73>cial "assign", la sortie de la fonction
|
||||||
cycle y sera assign<67>e plut<75>t que d'<27>tre directement affich<63>e.
|
cycle y sera assign<67>e plut<75>t que d'<27>tre directement affich<63>e.
|
||||||
</para>
|
</para>
|
||||||
<example>
|
<example>
|
||||||
<title>cycle</title>
|
<title>{cycle}</title>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
{section name=rows loop=$data}
|
{section name=rows loop=$data}
|
||||||
@@ -116,6 +124,7 @@
|
|||||||
</screen>
|
</screen>
|
||||||
</example>
|
</example>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
Local variables:
|
Local variables:
|
||||||
mode: sgml
|
mode: sgml
|
||||||
@@ -135,4 +144,4 @@ End:
|
|||||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||||
vim: et tw=78 syn=sgml
|
vim: et tw=78 syn=sgml
|
||||||
vi: ts=1 sw=1
|
vi: ts=1 sw=1
|
||||||
-->
|
-->
|
@@ -1,8 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.4 Maintainer: gerald Status: ready -->
|
<!-- EN-Revision: 1.6 Maintainer: yannick Status: ready -->
|
||||||
|
|
||||||
<sect1 id="language.function.debug">
|
<sect1 id="language.function.debug">
|
||||||
<title>debug</title>
|
<title>{debug}</title>
|
||||||
<informaltable frame="all">
|
<informaltable frame="all">
|
||||||
<tgroup cols="5">
|
<tgroup cols="5">
|
||||||
<colspec colname="param" align="center" />
|
<colspec colname="param" align="center" />
|
||||||
@@ -35,15 +36,16 @@
|
|||||||
quelle que soit la valeur du param<61>tre <link
|
quelle que soit la valeur du param<61>tre <link
|
||||||
linkend="chapter.debugging.console">debug</link> de Smarty.
|
linkend="chapter.debugging.console">debug</link> de Smarty.
|
||||||
Comme ce dernier est appel<65> lors de l'ex<65>cution, il n'est capable
|
Comme ce dernier est appel<65> lors de l'ex<65>cution, il n'est capable
|
||||||
d'afficher que les variables assign<EFBFBD>es au template, et non
|
d'afficher que les variables <link linkend="api.assign">assign<EFBFBD>es</link>
|
||||||
les templates en cours d'utilisation. Toutefois, vous voyez toutes
|
au template, et non les templates en cours d'utilisation. Toutefois, vous
|
||||||
les variables disponibles pour le template courant.
|
voyez toutes les variables disponibles pour le template courant.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Voir aussi
|
Voir aussi
|
||||||
<link linkend="chapter.debugging.console">la console de d<>bogage</link>.
|
<link linkend="chapter.debugging.console">la console de d<>bogage</link>.
|
||||||
</para>
|
</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:
|
||||||
mode: sgml
|
mode: sgml
|
||||||
@@ -63,4 +65,4 @@ End:
|
|||||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||||
vim: et tw=78 syn=sgml
|
vim: et tw=78 syn=sgml
|
||||||
vi: ts=1 sw=1
|
vi: ts=1 sw=1
|
||||||
-->
|
-->
|
@@ -1,8 +1,20 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.2 Maintainer: gerald Status: ready -->
|
<!-- EN-Revision: 1.4 Maintainer: yannick Status: ready -->
|
||||||
|
|
||||||
<sect1 id="language.function.eval">
|
<sect1 id="language.function.eval">
|
||||||
<title>eval</title>
|
<title>{eval}</title>
|
||||||
|
<para>
|
||||||
|
{eval} <20>value une variable comme si cette derni<6E>re <20>tait un template.
|
||||||
|
Peut <20>tre utile pour embarquer des balises de templates ou des variables
|
||||||
|
de template dans des variables ou des balises/variables dans des
|
||||||
|
variables de fichiers de configuration.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Si vous d<>finissez l'attribut "assign", la sortie sera assign<67>e <20> la
|
||||||
|
variable de template d<>sign<67>e plut<75>t que d'<27>tre affich<63>e dans le
|
||||||
|
template.
|
||||||
|
</para>
|
||||||
<informaltable frame="all">
|
<informaltable frame="all">
|
||||||
<tgroup cols="5">
|
<tgroup cols="5">
|
||||||
<colspec colname="param" align="center" />
|
<colspec colname="param" align="center" />
|
||||||
@@ -38,17 +50,6 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
</informaltable>
|
</informaltable>
|
||||||
<para>
|
|
||||||
eval <20>value une variable comme si cette derni<6E>re <20>tait un template.
|
|
||||||
Peut <20>tre utile pour embarquer des balises de templates ou des variables
|
|
||||||
de template dans des variables ou des balises/variables dans des
|
|
||||||
variables de fichiers de configuration.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
Si vous d<>finissez l'attribut "assign", la sortie sera assign<67>e <20> la
|
|
||||||
variable de template d<>sign<67>e plut<75>t que d'<27>tre affich<63>e dans le
|
|
||||||
template.
|
|
||||||
</para>
|
|
||||||
<note>
|
<note>
|
||||||
<title>Note technique</title>
|
<title>Note technique</title>
|
||||||
<para>
|
<para>
|
||||||
@@ -61,12 +62,13 @@
|
|||||||
<title>Note technique</title>
|
<title>Note technique</title>
|
||||||
<para>
|
<para>
|
||||||
Les variables <20>valu<6C>es sont compil<69>es <20> chaque invocation, et la version
|
Les variables <20>valu<6C>es sont compil<69>es <20> chaque invocation, et la version
|
||||||
compil<69>e n'est pas sauvegard<72>e ! Toutefois, si le cache est activ<69>,
|
compil<69>e n'est pas sauvegard<72>e ! Toutefois, si le
|
||||||
la sortie sera plac<61>e en cache avec le reste du template.
|
<link linkend="caching">cache</link> est activ<69>, la sortie sera plac<61>e en
|
||||||
|
cache avec le reste du template.
|
||||||
</para>
|
</para>
|
||||||
</note>
|
</note>
|
||||||
<example>
|
<example>
|
||||||
<title>eval</title>
|
<title>{eval}</title>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
setup.conf
|
setup.conf
|
||||||
@@ -98,7 +100,6 @@ ErrorDept = Vous devez sp
|
|||||||
</para>
|
</para>
|
||||||
<screen>
|
<screen>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
|
|
||||||
Ceci est le contenu de foo.
|
Ceci est le contenu de foo.
|
||||||
Bienvenue sur la homepage de FictifLand.
|
Bienvenue sur la homepage de FictifLand.
|
||||||
Vous devez sp<73>cifier un nom de <strong>ville</strong>.
|
Vous devez sp<73>cifier un nom de <strong>ville</strong>.
|
||||||
@@ -108,6 +109,7 @@ Vous devez sp
|
|||||||
</screen>
|
</screen>
|
||||||
</example>
|
</example>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
Local variables:
|
Local variables:
|
||||||
mode: sgml
|
mode: sgml
|
||||||
@@ -127,4 +129,4 @@ End:
|
|||||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||||
vim: et tw=78 syn=sgml
|
vim: et tw=78 syn=sgml
|
||||||
vi: ts=1 sw=1
|
vi: ts=1 sw=1
|
||||||
-->
|
-->
|
@@ -1,8 +1,23 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.7 Maintainer: gerald Status: ready -->
|
<!-- EN-Revision: 1.9 Maintainer: yannick Status: ready -->
|
||||||
|
|
||||||
<sect1 id="language.function.fetch">
|
<sect1 id="language.function.fetch">
|
||||||
<title>fetch</title>
|
<title>{fetch}</title>
|
||||||
|
<para>
|
||||||
|
{fetch} est utilis<69> pour r<>cup<75>rer des fichiers depuis le syst<73>me de
|
||||||
|
fichier local, depuis un serveur http ou ftp, et en afficher le contenu.
|
||||||
|
Si le nom du fichier commence par "http://", la page internet sera
|
||||||
|
r<>cup<75>r<EFBFBD>e, puis affich<63>e. Si le nom du fichier commence par "ftp://",
|
||||||
|
le fichier sera r<>cup<75>r<EFBFBD> depuis le serveur ftp, et affich<63>.
|
||||||
|
Pour les fichiers du syst<73>me local, le chemin doit <20>tre absolu ou
|
||||||
|
relatif au chemin d'ex<65>cution du script PHP.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Vous pouvez sp<73>cifier l'attribut optionnel "assign"
|
||||||
|
qui d<>fini une variable de template dans laquelle la sortie
|
||||||
|
sera stock<63>e plut<75>t que d'<27>tre affich<63>e (nouveau dans Smarty 1.5.0).
|
||||||
|
</para>
|
||||||
<informaltable frame="all">
|
<informaltable frame="all">
|
||||||
<tgroup cols="5">
|
<tgroup cols="5">
|
||||||
<colspec colname="param" align="center" />
|
<colspec colname="param" align="center" />
|
||||||
@@ -39,20 +54,6 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
</informaltable>
|
</informaltable>
|
||||||
<para>
|
|
||||||
{fetch} est utilis<69> pour r<>cup<75>rer des fichiers depuis le syst<73>me de
|
|
||||||
fichier local, depuis un serveur http ou ftp, et en afficher le contenu.
|
|
||||||
Si le nom du fichier commence par "http://", la page internet sera
|
|
||||||
r<>cup<75>r<EFBFBD>e, puis affich<63>e. Si le nom du fichier commence par "ftp://",
|
|
||||||
le fichier sera r<>cup<75>r<EFBFBD> depuis le serveur ftp, et affich<63>.
|
|
||||||
Pour les fichiers du syst<73>me local, le chemin doit <20>tre absolu ou
|
|
||||||
relatif au chemin d'ex<65>cution du script PHP.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
Vous pouvez sp<73>cifier l'attribut optionnel <emphasis>assign</emphasis>
|
|
||||||
qui d<>fini une variable de template dans laquelle la sortie
|
|
||||||
sera stock<63>e plut<75>t que d'<27>tre affich<63>e (nouveau dans Smarty 1.5.0).
|
|
||||||
</para>
|
|
||||||
<note>
|
<note>
|
||||||
<title>Note technique</title>
|
<title>Note technique</title>
|
||||||
<para>Ne supporte pas les redirections http. Assurez vous d'inclure les
|
<para>Ne supporte pas les redirections http. Assurez vous d'inclure les
|
||||||
@@ -95,6 +96,7 @@
|
|||||||
<link linkend="api.fetch">fetch()</link>.
|
<link linkend="api.fetch">fetch()</link>.
|
||||||
</para>
|
</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:
|
||||||
mode: sgml
|
mode: sgml
|
||||||
@@ -114,4 +116,4 @@ End:
|
|||||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||||
vim: et tw=78 syn=sgml
|
vim: et tw=78 syn=sgml
|
||||||
vi: ts=1 sw=1
|
vi: ts=1 sw=1
|
||||||
-->
|
-->
|
@@ -1,8 +1,17 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.8 Maintainer: gerald Status: ready -->
|
<!-- EN-Revision: 1.11 Maintainer: yannick Status: ready -->
|
||||||
|
|
||||||
<sect1 id="language.function.html.checkboxes">
|
<sect1 id="language.function.html.checkboxes">
|
||||||
<title>html_checkboxes</title>
|
<title>{html_checkboxes}</title>
|
||||||
|
<para>
|
||||||
|
{html_checkboxes} est une
|
||||||
|
<link linkend="language.custom.functions">fonction utilisateur</link>
|
||||||
|
qui cr<63>e un groupe de cases <20> cocher avec les donn<6E>es fournies. Elle prend
|
||||||
|
en compte la liste des <20>l<EFBFBD>ments s<>lectionn<6E>s par d<>faut. Les attributs requis
|
||||||
|
sont values et output, <20> moins que vous n'utilisiez options <20> la place.
|
||||||
|
La sortie g<>n<EFBFBD>r<EFBFBD>e est compatible XHTML.
|
||||||
|
</para>
|
||||||
<informaltable frame="all">
|
<informaltable frame="all">
|
||||||
<tgroup cols="5">
|
<tgroup cols="5">
|
||||||
<colspec colname="param" align="center" />
|
<colspec colname="param" align="center" />
|
||||||
@@ -78,41 +87,35 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
</informaltable>
|
</informaltable>
|
||||||
<para>
|
|
||||||
html_checkboxes est une fonction utilisateur qui cr<63>e un groupe de
|
|
||||||
cases <20> cocher avec les donn<6E>es fournies. Elle prend en compte la liste
|
|
||||||
des <20>l<EFBFBD>ments s<>lectionn<6E>s par d<>faut. Les attributs requis sont
|
|
||||||
values et output, <20> moins que vous n'utilisiez options <20> la place.
|
|
||||||
La sortie g<>n<EFBFBD>r<EFBFBD>e est compatible XHTML.
|
|
||||||
</para>
|
|
||||||
<para>
|
<para>
|
||||||
Tous les param<61>tres qui ne sont pas list<73>s ci-dessus sont affich<63>s
|
Tous les param<61>tres qui ne sont pas list<73>s ci-dessus sont affich<63>s
|
||||||
en tant que paires nom/valeur dans chaque balise <input> cr<63>e.
|
en tant que paires nom/valeur dans chaque balise <input> cr<63>e.
|
||||||
</para>
|
</para>
|
||||||
<example>
|
<example>
|
||||||
<title>html_checkboxes</title>
|
<title>{html_checkboxes}</title>
|
||||||
<para>
|
|
||||||
O<> le code PHP est :
|
|
||||||
</para>
|
|
||||||
<programlisting role="php">
|
<programlisting role="php">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<?php
|
<?php
|
||||||
require('Smarty.class.php');
|
|
||||||
$smarty = new Smarty;
|
|
||||||
$smarty->assign('cust_ids', array(1000,1001,1002,1003));
|
$smarty->assign('cust_ids', array(1000,1001,1002,1003));
|
||||||
$smarty->assign('cust_names', array('Joe Schmoe','Jack Smith','Jane Johnson','Charlie Brown'));
|
$smarty->assign('cust_names', array(
|
||||||
|
'Joe Schmoe',
|
||||||
|
'Jack Smith',
|
||||||
|
'Jane Johnson',
|
||||||
|
'Charlie Brown')
|
||||||
|
);
|
||||||
$smarty->assign('customer_id', 1001);
|
$smarty->assign('customer_id', 1001);
|
||||||
$smarty->display('index.tpl');
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
et index.tpl est:
|
o<EFBFBD> index.tpl est :
|
||||||
</para>
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
{html_checkboxes name="id" values=$cust_ids selected=$customer_id output=$cust_names separator="<br />"}
|
{html_checkboxes name="id" values=$cust_ids output=$cust_names
|
||||||
|
selected=$customer_id separator="<br />"}
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
@@ -122,20 +125,19 @@ $smarty->display('index.tpl');
|
|||||||
<![CDATA[
|
<![CDATA[
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require('Smarty.class.php');
|
|
||||||
$smarty = new Smarty;
|
|
||||||
$smarty->assign('cust_checkboxes', array(
|
$smarty->assign('cust_checkboxes', array(
|
||||||
1000 => 'Joe Schmoe',
|
1000 => 'Joe Schmoe',
|
||||||
1001 => 'Jack Smith',
|
1001 => 'Jack Smith',
|
||||||
1002 => 'Jane Johnson',
|
1002 => 'Jane Johnson',
|
||||||
1003 => 'Charlie Brown'));
|
1003 => 'Charlie Brown')
|
||||||
|
);
|
||||||
$smarty->assign('customer_id', 1001);
|
$smarty->assign('customer_id', 1001);
|
||||||
$smarty->display('index.tpl');
|
|
||||||
?>
|
?>
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
et index.tpl est:
|
et index.tpl est :
|
||||||
</para>
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
@@ -148,13 +150,43 @@ $smarty->display('index.tpl');
|
|||||||
<screen>
|
<screen>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<label><input type="checkbox" name="id[]" value="1000" />Joe Schmoe</label><br />
|
<label><input type="checkbox" name="id[]" value="1000" />Joe Schmoe</label><br />
|
||||||
<label><input type="checkbox" name="id[]" value="1001" checked="checked" />Jack Smith</label><br />
|
<label><input type="checkbox" name="id[]" value="1001" checked="checked" />Jack Smith</label>
|
||||||
|
<br />
|
||||||
<label><input type="checkbox" name="id[]" value="1002" />Jane Johnson</label><br />
|
<label><input type="checkbox" name="id[]" value="1002" />Jane Johnson</label><br />
|
||||||
<label><input type="checkbox" name="id[]" value="1003" />Charlie Brown</label><br />
|
<label><input type="checkbox" name="id[]" value="1003" />Charlie Brown</label><br />
|
||||||
]]>
|
]]>
|
||||||
</screen>
|
</screen>
|
||||||
</example>
|
</example>
|
||||||
|
<example>
|
||||||
|
<title>
|
||||||
|
Exemple avec une base de donn<6E>es (eg PEAR ou ADODB) :
|
||||||
|
</title>
|
||||||
|
<programlisting role="php">
|
||||||
|
<![CDATA[
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$sql = 'select type_id, types from types order by type';
|
||||||
|
$smarty->assign('types',$db->getAssoc($sql));
|
||||||
|
|
||||||
|
$sql = 'select * from contacts where contact_id=12';
|
||||||
|
$smarty->assign('contact',$db->getRow($sql));
|
||||||
|
|
||||||
|
?>
|
||||||
|
]]>
|
||||||
|
</programlisting>
|
||||||
|
<programlisting>
|
||||||
|
<![CDATA[
|
||||||
|
{html_checkboxes name="type" options=$types selected=$contact.type_id separator="<br />"}
|
||||||
|
]]>
|
||||||
|
</programlisting>
|
||||||
|
</example>
|
||||||
|
<para>
|
||||||
|
Voir aussi
|
||||||
|
<link linkend="language.function.html.radios">{html_radios}</link> et
|
||||||
|
<link linkend="language.function.html.options">{html_options}</link>.
|
||||||
|
</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:
|
||||||
mode: sgml
|
mode: sgml
|
||||||
@@ -174,4 +206,4 @@ End:
|
|||||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||||
vim: et tw=78 syn=sgml
|
vim: et tw=78 syn=sgml
|
||||||
vi: ts=1 sw=1
|
vi: ts=1 sw=1
|
||||||
-->
|
-->
|
@@ -1,8 +1,14 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.4 Maintainer: gerald Status: ready -->
|
<!-- EN-Revision: 1.7 Maintainer: yannick Status: ready -->
|
||||||
|
|
||||||
<sect1 id="language.function.html.image">
|
<sect1 id="language.function.html.image">
|
||||||
<title>html_image</title>
|
<title>{html_image}</title>
|
||||||
|
<para>
|
||||||
|
{html_image} est une fonction utilisateur qui g<>n<EFBFBD>re la balise
|
||||||
|
HTML pour une image. La hauteur et la longueur de l'image sont calcul<75>s
|
||||||
|
automatiquement depuis le fichier image si aucune n'est sp<73>cifi<66>e.
|
||||||
|
</para>
|
||||||
<informaltable frame="all">
|
<informaltable frame="all">
|
||||||
<tgroup cols="5">
|
<tgroup cols="5">
|
||||||
<colspec colname="param" align="center" />
|
<colspec colname="param" align="center" />
|
||||||
@@ -56,60 +62,60 @@
|
|||||||
<entry><emphasis>n/a</emphasis></entry>
|
<entry><emphasis>n/a</emphasis></entry>
|
||||||
<entry>lien sur lequel l'image pointe</entry>
|
<entry>lien sur lequel l'image pointe</entry>
|
||||||
</row>
|
</row>
|
||||||
|
<row>
|
||||||
|
<entry>path_prefix</entry>
|
||||||
|
<entry>string</entry>
|
||||||
|
<entry>no</entry>
|
||||||
|
<entry><emphasis>n/a</emphasis></entry>
|
||||||
|
<entry>pr<EFBFBD>fixe pour le chemin de la sortie</entry>
|
||||||
|
</row>
|
||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
</informaltable>
|
</informaltable>
|
||||||
<para>
|
|
||||||
html_image est une fonction utilisateur qui g<>n<EFBFBD>re la balise
|
|
||||||
HTML pour une image. La hauteur et la longueur de l'image sont calcul<75>s
|
|
||||||
automatiquement depuis le fichier image si aucune n'est sp<73>cifi<66>e.
|
|
||||||
</para>
|
|
||||||
<para>
|
<para>
|
||||||
basedir est le r<>pertoire de base depuis lequel seront calcul<75>s les
|
basedir est le r<>pertoire de base depuis lequel seront calcul<75>s les
|
||||||
chemins relatifs. Si non sp<73>cifi<66>, la racine du serveur web est utilis<69>
|
chemins relatifs. Si non sp<73>cifi<66>, la racine du serveur web est utilis<69>
|
||||||
(variable d'environnement DOCUMENT_ROOT). Si la s<>curit<69> est activ<69>e,
|
(variable d'<link linkend="language.variables.smarty">environnement</link>
|
||||||
l'image doit se situer dans un r<>pertoire s<>curis<69>.
|
DOCUMENT_ROOT). Si <link linkend="variable.security">$security</link>
|
||||||
|
est activ<69>, l'image doit se situer dans un r<>pertoire s<>curis<69>.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
link est la valeur <parameter>href</parameter> <20> laquelle lier l'image. Si link est d<>fini,
|
<parameter>href</parameter> est la valeur de l'attribut 'href' <20> laquelle lier l'image. Si link est d<>fini,
|
||||||
une balise <a href="VALEURLINK"><a> est plac<61>e autour de
|
une balise <a href="LINKVALUE"><a> est plac<61>e autour de
|
||||||
l'image.
|
l'image.
|
||||||
</para>
|
</para>
|
||||||
|
<para>
|
||||||
|
<parameter>path_prefix</parameter> est un pr<70>fixe optionnel que vous ouvez donn<6E> pour
|
||||||
|
le chemin de sortie. Ceci est pratique si vous voulez fournir un nom de serveur diff<66>rent
|
||||||
|
pour l'image.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Tous les param<61>tres qui ne sont pas list<73>s ci-dessus seront affich<63>s
|
||||||
|
en tant que paires nom/valeur dans la balise <img> cr<63><72>e.
|
||||||
|
</para>
|
||||||
<note>
|
<note>
|
||||||
<title>Note technique</title>
|
<title>Note technique</title>
|
||||||
<para>
|
<para>
|
||||||
html_image requiert un acc<63>s au disque dur pour lire l'image et
|
{html_image} requiert un acc<63>s au disque dur pour lire l'image et
|
||||||
calculer ses dimensions. Si vous n'utilisez pas un cache, il
|
calculer ses dimensions. Si vous n'utilisez pas un <link linkend="caching">cache</link>,
|
||||||
est g<>n<EFBFBD>ralement pr<70>f<EFBFBD>rable d'<27>viter d'utiliser html_image
|
il est g<>n<EFBFBD>ralement pr<70>f<EFBFBD>rable d'<27>viter d'utiliser html_image
|
||||||
et de laisser les balises images statiques pour de meilleures
|
et de laisser les balises images statiques pour de meilleures
|
||||||
performances.
|
performances.
|
||||||
</para>
|
</para>
|
||||||
</note>
|
</note>
|
||||||
<example>
|
<example>
|
||||||
<title>html_image</title>
|
<title>html_image</title>
|
||||||
<programlisting role="php">
|
|
||||||
<![CDATA[
|
|
||||||
<?php
|
|
||||||
|
|
||||||
require('Smarty.class.php');
|
|
||||||
$smarty = new Smarty;
|
|
||||||
$smarty->display('index.tpl');
|
|
||||||
|
|
||||||
?>
|
|
||||||
]]>
|
|
||||||
</programlisting>
|
|
||||||
<para>
|
|
||||||
o<> index.tpl est:
|
|
||||||
</para>
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
|
O<EFBFBD> index.tpl est :
|
||||||
|
-------------------
|
||||||
{html_image file="pumpkin.jpg"}
|
{html_image file="pumpkin.jpg"}
|
||||||
{html_image file="/path/from/docroot/pumpkin.jpg"}
|
{html_image file="/path/from/docroot/pumpkin.jpg"}
|
||||||
{html_image file="../path/relative/to/currdir/pumpkin.jpg"}
|
{html_image file="../path/relative/to/currdir/pumpkin.jpg"}
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
Une sortie possible est :
|
Sortie possible :
|
||||||
</para>
|
</para>
|
||||||
<screen>
|
<screen>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
@@ -120,6 +126,7 @@ $smarty->display('index.tpl');
|
|||||||
</screen>
|
</screen>
|
||||||
</example>
|
</example>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
Local variables:
|
Local variables:
|
||||||
mode: sgml
|
mode: sgml
|
||||||
@@ -139,4 +146,4 @@ End:
|
|||||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||||
vim: et tw=78 syn=sgml
|
vim: et tw=78 syn=sgml
|
||||||
vi: ts=1 sw=1
|
vi: ts=1 sw=1
|
||||||
-->
|
-->
|
@@ -1,8 +1,16 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.7 Maintainer: gerald Status: ready -->
|
<!-- EN-Revision: 1.12 Maintainer: yannick Status: ready -->
|
||||||
|
|
||||||
<sect1 id="language.function.html.options">
|
<sect1 id="language.function.html.options">
|
||||||
<title>html_options</title>
|
<title>{html_options}</title>
|
||||||
|
<para>
|
||||||
|
{html_options} est une
|
||||||
|
<link linkend="language.custom.functions">fonction personnalis<69>e</link>
|
||||||
|
qui cr<63>e un groupe d'options avec les donn<6E>es fournies. Elle prend en charge
|
||||||
|
les <20>l<EFBFBD>ments s<>lectionn<6E>s par d<>faut. Les attributs requis sont values et output,
|
||||||
|
<20> moins que vous n'utilisiez options <20> la place.
|
||||||
|
</para>
|
||||||
<informaltable frame="all">
|
<informaltable frame="all">
|
||||||
<tgroup cols="5">
|
<tgroup cols="5">
|
||||||
<colspec colname="param" align="center" />
|
<colspec colname="param" align="center" />
|
||||||
@@ -63,86 +71,76 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
</informaltable>
|
</informaltable>
|
||||||
<para>
|
|
||||||
html_options est une fonction utilisateur qui cr<63>e un groupe d'options
|
|
||||||
avec les donn<6E>es fournies. Elle prend en charge les <20>l<EFBFBD>ments
|
|
||||||
s<>lectionn<6E>s par d<>faut. Les attributs requis sont values et output,
|
|
||||||
<20> moins que vous n'utilisiez options <20> la place.
|
|
||||||
</para>
|
|
||||||
<para>
|
<para>
|
||||||
Si la valeur donn<6E>e est un tableau, elle sera trait<69>e comme un
|
Si la valeur donn<6E>e est un tableau, elle sera trait<69>e comme un
|
||||||
OPTGROUP html, et affich<63>e. La r<>cursivit<69> est support<72>e avec
|
<optgroup> html, et affich<63>e. La r<>cursivit<69> est support<72>e avec
|
||||||
OPTGROUP. La sortie est compatible XHTML.
|
<optgroup>. La sortie est compatible XHTML.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Si l'attribut optionnel <emphasis>name</emphasis> est donn<6E>, les
|
Si l'attribut optionnel <emphasis>name</emphasis> est donn<6E>, les
|
||||||
balises <select name="groupname"></select> entoureront la
|
balises <select name="groupname"></select> entoureront la
|
||||||
liste d'options.
|
liste d'options. Sinon, seule la liste <option> sera g<>n<EFBFBD>r<EFBFBD>e.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Tous les param<61>tres qui ne sont pas dans la liste ci-dessus sont
|
Tous les param<61>tres qui ne sont pas dans la liste ci-dessus sont
|
||||||
affich<63>s en tant que paires nom / valeur. Ils sont ignor<6F>s si
|
affich<63>s en tant que paires nom / valeur dans la balise <select>. Ils
|
||||||
le param<61>tre optionnel <emphasis>name</emphasis> n'est pas donn<6E>.
|
sont ignor<6F>s si le param<61>tre optionnel <emphasis>name</emphasis>
|
||||||
|
n'est pas donn<6E>.
|
||||||
</para>
|
</para>
|
||||||
<example>
|
<example>
|
||||||
<title>html_options : Exemple 1</title>
|
<title>{html_options}</title>
|
||||||
<programlisting>
|
<para>
|
||||||
|
<emphasis role="bold">Exemple 1 :</emphasis>
|
||||||
|
</para>
|
||||||
|
<programlisting role="php">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
index.php:
|
<?php
|
||||||
----------
|
|
||||||
|
|
||||||
require('Smarty.class.php');
|
$smarty->assign('cust_ids', array(1000,1001,1002,1003));
|
||||||
$smarty = new Smarty;
|
$smarty->assign('cust_names', array(
|
||||||
$smarty->assign('id_client', array(1000,1001,1002,1003));
|
'Joe Schmoe',
|
||||||
$smarty->assign('nom_client', array('Joe Schmoe','Jack Smith','Jane
|
'Jack Smith',
|
||||||
Johnson','Charlie Brown'));
|
'Jane Johnson',
|
||||||
$smarty->assign('client_id', 1001);
|
'Charlie Brown'));
|
||||||
$smarty->display('index.tpl');
|
$smarty->assign('customer_id', 1001);
|
||||||
|
|
||||||
|
?>
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
O<> index.tpl est :
|
O<> le template est :
|
||||||
</para>
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
|
<select name="customer_id">
|
||||||
<select name=client_id>
|
{html_options values=$cust_ids output=$cust_names selected=$customer_id}
|
||||||
{html_options values=$id_client selected=$client_id output=$nom_client}
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
Exemple 2 :
|
<emphasis role="bold">Exemple 2 :</emphasis>
|
||||||
</para>
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
index.php:
|
<?php
|
||||||
----------
|
|
||||||
|
|
||||||
require('Smarty.class.php');
|
|
||||||
$smarty = new Smarty;
|
|
||||||
$smarty->assign('cust_options', array(
|
$smarty->assign('cust_options', array(
|
||||||
1001 => 'Joe Schmoe',
|
1000 => 'Joe Schmoe',
|
||||||
1002 => 'Jack Smith',
|
1001 => 'Jack Smith',
|
||||||
1003 => 'Jane Johnson',
|
1002 => 'Jane Johnson',
|
||||||
1004 => 'Charlie Brown'));
|
1003 => 'Charlie Brown')
|
||||||
$smarty->assign('client_id', 1001);
|
);
|
||||||
$smarty->display('index.tpl');
|
$smarty->assign('customer_id', 1001);
|
||||||
|
|
||||||
|
?>
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
O<> index.tpl est :
|
O<> le template est :
|
||||||
</para>
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
|
{html_options name=customer_id options=$cust_options selected=$customer_id}
|
||||||
<select name=client_id>
|
|
||||||
{html_options options=$cust_options selected=$client_id}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
@@ -150,17 +148,50 @@ $smarty->display('index.tpl');
|
|||||||
</para>
|
</para>
|
||||||
<screen>
|
<screen>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
|
<select name="customer_id">
|
||||||
<select name=client_id>
|
<option label="Joe Schmoe" value="1000">Joe Schmoe</option>
|
||||||
<option label="Joe Schmoe" value="1000">Joe Schmoe</option>
|
<option label="Jack Smith" value="1001" selected="selected">Jack Smith</option>
|
||||||
<option label="Jack Smith" value="1001" selected="selected"<Jack Smith</option>
|
<option label="Jane Johnson" value="1002">Jane Johnson</option>
|
||||||
<option label="Jane Johnson" value="1002">Jane Johnson</option>
|
<option label="Charlie Brown" value="1003">Charlie Brown</option>
|
||||||
<option label="Charlie Brown" value="1003">Charlie Brown</option>
|
|
||||||
</select>
|
</select>
|
||||||
]]>
|
]]>
|
||||||
</screen>
|
</screen>
|
||||||
</example>
|
</example>
|
||||||
|
<example>
|
||||||
|
<title>{html_options} - Exemple avec une base de donn<6E>es (eg PEAR ou ADODB):</title>
|
||||||
|
<programlisting role="php">
|
||||||
|
<![CDATA[
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$sql = 'select type_id, types from types order by type';
|
||||||
|
$smarty->assign('types',$db->getAssoc($sql));
|
||||||
|
|
||||||
|
$sql = 'select contact_id, name, email, type_id
|
||||||
|
from contacts where contact_id='.$contact_id;
|
||||||
|
$smarty->assign('contact',$db->getRow($sql));
|
||||||
|
|
||||||
|
?>
|
||||||
|
]]>
|
||||||
|
</programlisting>
|
||||||
|
<para>
|
||||||
|
o<> le template est :
|
||||||
|
</para>
|
||||||
|
<programlisting>
|
||||||
|
<![CDATA[
|
||||||
|
<select name="type_id">
|
||||||
|
<option value='null'>-- none --</option>
|
||||||
|
{html_options name="type" options=$types selected=$contact.type_id}
|
||||||
|
</select>
|
||||||
|
]]>
|
||||||
|
</programlisting>
|
||||||
|
</example>
|
||||||
|
<para>
|
||||||
|
Voir aussi
|
||||||
|
<link linkend="language.function.html.checkboxes">{html_checkboxes}</link> et
|
||||||
|
<link linkend="language.function.html.radios">{html_radios}</link>.
|
||||||
|
</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:
|
||||||
mode: sgml
|
mode: sgml
|
||||||
@@ -180,4 +211,4 @@ End:
|
|||||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||||
vim: et tw=78 syn=sgml
|
vim: et tw=78 syn=sgml
|
||||||
vi: ts=1 sw=1
|
vi: ts=1 sw=1
|
||||||
-->
|
-->
|
@@ -1,8 +1,17 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.6 Maintainer: gerald Status: ready -->
|
<!-- EN-Revision: 1.9 Maintainer: yannick Status: ready -->
|
||||||
|
|
||||||
<sect1 id="language.function.html.radios">
|
<sect1 id="language.function.html.radios">
|
||||||
<title>html_radios</title>
|
<title>{html_radios}</title>
|
||||||
|
<para>
|
||||||
|
{html_radio} est une
|
||||||
|
<link linkend="language.custom.functions">fonction personnalis<69>e</link>
|
||||||
|
qui cr<63>e des boutons radio html <20> partir des donn<6E>es fournies. Elle prend en
|
||||||
|
charge les <20>l<EFBFBD>ments s<>lectionn<6E>s par d<>faut. Les attributs requis sont values
|
||||||
|
et output, <20> moins que vous n'utilisiez options <20> la place. La sortie g<>n<EFBFBD>r<EFBFBD>e est
|
||||||
|
compatible XHTML.
|
||||||
|
</para>
|
||||||
<informaltable frame="all">
|
<informaltable frame="all">
|
||||||
<tgroup cols="5">
|
<tgroup cols="5">
|
||||||
<colspec colname="param" align="center" />
|
<colspec colname="param" align="center" />
|
||||||
@@ -69,13 +78,6 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
</informaltable>
|
</informaltable>
|
||||||
<para>
|
|
||||||
html_radio est une fonction utilisateur qui cr<63>e des boutons radio
|
|
||||||
html <20> partir des donn<6E>es fournies. Elle prend en charge les <20>l<EFBFBD>ments
|
|
||||||
s<>lectionn<6E>s par d<>faut. Les attributs requis sont values et output,
|
|
||||||
<20> moins que vous n'utilisiez options <20> la place. La sortie g<>n<EFBFBD>r<EFBFBD>e est
|
|
||||||
compatible XHTML.
|
|
||||||
</para>
|
|
||||||
<para>
|
<para>
|
||||||
Tous les param<61>tres qui ne sont pas dans la liste ci dessus sont
|
Tous les param<61>tres qui ne sont pas dans la liste ci dessus sont
|
||||||
affich<63>s en tant que paires nom / valeur dans chaque balise <input>
|
affich<63>s en tant que paires nom / valeur dans chaque balise <input>
|
||||||
@@ -83,51 +85,48 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<example>
|
<example>
|
||||||
<title>html_radios : Exemple 1</title>
|
<title>{html_radios} : Exemple 1</title>
|
||||||
<programlisting>
|
<programlisting role="php">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
index.php:
|
<?php
|
||||||
----------
|
|
||||||
|
|
||||||
require('Smarty.class.php');
|
$smarty->assign('cust_ids', array(1000,1001,1002,1003));
|
||||||
$smarty = new Smarty;
|
$smarty->assign('cust_names', array(
|
||||||
$smarty->assign('id_client', array(1000,1001,1002,1003));
|
'Joe Schmoe',
|
||||||
$smarty->assign('nom_client', array('Joe Schmoe','Jack Smith','Jane
|
'Jack Smith',
|
||||||
Johnson','Charlie Brown'));
|
'Jane Johnson',
|
||||||
$smarty->assign('client_id', 1001);
|
'Charlie Brown')
|
||||||
$smarty->display('index.tpl');
|
);
|
||||||
|
$smarty->assign('customer_id', 1001);
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
O<> index.tpl est :
|
O<> le template est :
|
||||||
</para>
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
|
{html_radios name="id" values=$cust_ids output=$cust_names
|
||||||
{html_radios name="id" values=$id_client checked=$client_id output=$nom_client separator="<br />"}
|
selected=$customer_id separator="<br />"}
|
||||||
|
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
</example>
|
||||||
Exemple 2 :
|
<example>
|
||||||
</para>
|
<title>{html_radios} : Exemple 2</title>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
index.php:
|
<?php
|
||||||
----------
|
|
||||||
|
|
||||||
require('Smarty.class.php');
|
|
||||||
$smarty = new Smarty;
|
|
||||||
$smarty->assign('cust_radios', array(
|
$smarty->assign('cust_radios', array(
|
||||||
1000 => 'Joe Schmoe',
|
1000 => 'Joe Schmoe',
|
||||||
1001 => 'Jack Smith',
|
1001 => 'Jack Smith',
|
||||||
1002 => 'Jane Johnson',
|
1002 => 'Jane Johnson',
|
||||||
1003 => 'Charlie Brown'));
|
1003 => 'Charlie Brown'));
|
||||||
$smarty->assign('client_id', 1001);
|
$smarty->assign('customer_id', 1001);
|
||||||
$smarty->display('index.tpl');
|
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
@@ -135,10 +134,7 @@ $smarty->display('index.tpl');
|
|||||||
</para>
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
|
{html_radios name="id" options=$cust_radios selected=$customer_id separator="<br />"}
|
||||||
{html_radios name="id" options=$cust_radios checked=$client_id separator="<br />"}
|
|
||||||
|
|
||||||
|
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
@@ -146,15 +142,51 @@ $smarty->display('index.tpl');
|
|||||||
</para>
|
</para>
|
||||||
<screen>
|
<screen>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
|
<label for="id_1000">
|
||||||
<label for="id_1000"><input type="radio" name="id" value="1000" id="id_1000" />Joe Schmoe</label><br />
|
<input type="radio" name="id" value="1000" id="id_1000" />Joe
|
||||||
<label for="id_1001"><input type="radio" name="id" value="1001" id="id_1001" checked="checked" />Jack Smith</label><br />
|
Schmoe</label><br />
|
||||||
<label for="id_1002"><input type="radio" name="id" value="1002" id="id_1002" />Jane Johnson</label><br />
|
<label for="id_1001"><input type="radio" name="id" value="1001" id="id_1001"
|
||||||
<label for="id_1003"><input type="radio" name="id" value="1003" id="id_1003" />Charlie Brown</label><br />
|
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>
|
</screen>
|
||||||
</example>
|
</example>
|
||||||
|
<example>
|
||||||
|
<title>{html_radios} - Exemple avec une base de donn<6E>es (eg PEAR ou ADODB):</title>
|
||||||
|
<programlisting role="php">
|
||||||
|
<![CDATA[
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$sql = 'select type_id, types from types order by type';
|
||||||
|
$smarty->assign('types',$db->getAssoc($sql));
|
||||||
|
|
||||||
|
$sql = 'select contact_id, name, email, type_id
|
||||||
|
from contacts where contact_id='.$contact_id;
|
||||||
|
$smarty->assign('contact',$db->getRow($sql));
|
||||||
|
|
||||||
|
?>
|
||||||
|
]]>
|
||||||
|
</programlisting>
|
||||||
|
<para>
|
||||||
|
et le template :
|
||||||
|
</para>
|
||||||
|
<programlisting>
|
||||||
|
<![CDATA[
|
||||||
|
{html_radios name="type" options=$types selected=$contact.type_id separator="<br />"}
|
||||||
|
]]>
|
||||||
|
</programlisting>
|
||||||
|
</example>
|
||||||
|
<para>
|
||||||
|
Voir aussi
|
||||||
|
<link linkend="language.function.html.checkboxes">{html_checkboxes}</link> et
|
||||||
|
<link linkend="language.function.html.options">{html_options}</link>.
|
||||||
|
</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:
|
||||||
mode: sgml
|
mode: sgml
|
||||||
@@ -174,4 +206,4 @@ End:
|
|||||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||||
vim: et tw=78 syn=sgml
|
vim: et tw=78 syn=sgml
|
||||||
vi: ts=1 sw=1
|
vi: ts=1 sw=1
|
||||||
-->
|
-->
|
@@ -1,8 +1,15 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.6 Maintainer: gerald Status: partial -->
|
<!-- EN-Revision: 1.9 Maintainer: yannick Status: ready -->
|
||||||
|
|
||||||
<sect1 id="language.function.html.select.date">
|
<sect1 id="language.function.html.select.date">
|
||||||
<title>html_select_date</title>
|
<title>{html_select_date}</title>
|
||||||
|
<para>
|
||||||
|
{html_select_date} est une
|
||||||
|
<link linkend="language.custom.functions">fonction personnalis<69>e</link>
|
||||||
|
qui cr<63>e des listes d<>roulantes pour saisir la date. Elle peut afficher n'importe
|
||||||
|
quel jour, mois et ann<6E>e.
|
||||||
|
</para>
|
||||||
<informaltable frame="all">
|
<informaltable frame="all">
|
||||||
<tgroup cols="5">
|
<tgroup cols="5">
|
||||||
<colspec colname="param" align="center" />
|
<colspec colname="param" align="center" />
|
||||||
@@ -237,13 +244,9 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
</informaltable>
|
</informaltable>
|
||||||
<para>
|
|
||||||
{html_select_date} est une fonction utilisateur qui cr<63>e des listes
|
|
||||||
d<>roulantes pour saisir la date. Elle peut afficher n'importe quel
|
|
||||||
jour, mois et ann<6E>e.
|
|
||||||
</para>
|
|
||||||
<example>
|
<example>
|
||||||
<title>html_select_date</title>
|
<title>{html_select_date}</title>
|
||||||
|
<para>Code du template</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
{html_select_date}
|
{html_select_date}
|
||||||
@@ -258,12 +261,7 @@
|
|||||||
<option value="1">January</option>
|
<option value="1">January</option>
|
||||||
<option value="2">February</option>
|
<option value="2">February</option>
|
||||||
<option value="3">March</option>
|
<option value="3">March</option>
|
||||||
<option value="4">April</option>
|
..... coup<75> .....
|
||||||
<option value="5">May</option>
|
|
||||||
<option value="6">June</option>
|
|
||||||
<option value="7">July</option>
|
|
||||||
<option value="8">August</option>
|
|
||||||
<option value="9">September</option>
|
|
||||||
<option value="10">October</option>
|
<option value="10">October</option>
|
||||||
<option value="11">November</option>
|
<option value="11">November</option>
|
||||||
<option value="12" selected="selected">December</option>
|
<option value="12" selected="selected">December</option>
|
||||||
@@ -272,31 +270,13 @@
|
|||||||
<option value="1">01</option>
|
<option value="1">01</option>
|
||||||
<option value="2">02</option>
|
<option value="2">02</option>
|
||||||
<option value="3">03</option>
|
<option value="3">03</option>
|
||||||
<option value="4">04</option>
|
..... coup<75> .....
|
||||||
<option value="5">05</option>
|
|
||||||
<option value="6">06</option>
|
|
||||||
<option value="7">07</option>
|
|
||||||
<option value="8">08</option>
|
|
||||||
<option value="9">09</option>
|
|
||||||
<option value="10">10</option>
|
|
||||||
<option value="11">11</option>
|
<option value="11">11</option>
|
||||||
<option value="12">12</option>
|
<option value="12">12</option>
|
||||||
<option value="13" selected>13</option>
|
<option value="13" selected>13</option>
|
||||||
<option value="14">14</option>
|
<option value="14">14</option>
|
||||||
<option value="15">15</option>
|
<option value="15">15</option>
|
||||||
<option value="16">16</option>
|
..... coup<75> .....
|
||||||
<option value="17">17</option>
|
|
||||||
<option value="18">18</option>
|
|
||||||
<option value="19">19</option>
|
|
||||||
<option value="20">20</option>
|
|
||||||
<option value="21">21</option>
|
|
||||||
<option value="22">22</option>
|
|
||||||
<option value="23">23</option>
|
|
||||||
<option value="24">24</option>
|
|
||||||
<option value="25">25</option>
|
|
||||||
<option value="26">26</option>
|
|
||||||
<option value="27">27</option>
|
|
||||||
<option value="28">28</option>
|
|
||||||
<option value="29">29</option>
|
<option value="29">29</option>
|
||||||
<option value="30">30</option>
|
<option value="30">30</option>
|
||||||
<option value="31">31</option>
|
<option value="31">31</option>
|
||||||
@@ -309,11 +289,12 @@
|
|||||||
</screen>
|
</screen>
|
||||||
</example>
|
</example>
|
||||||
<example>
|
<example>
|
||||||
<title>html_select_date</title>
|
<title>{html_select_date}</title>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
{* le d<>marage et la fin de l'ann<6E>e peuvent <20>tre relatif <20> l'ann<6E>e courante *}
|
{* 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}
|
{html_select_date prefix="StartDate" time=$time start_year="-5"
|
||||||
|
end_year="+1" display_days=false}
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
@@ -355,6 +336,7 @@
|
|||||||
les <link linkend="tips.dates">astuces sur les dates</link>.
|
les <link linkend="tips.dates">astuces sur les dates</link>.
|
||||||
</para>
|
</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:
|
||||||
mode: sgml
|
mode: sgml
|
||||||
@@ -374,4 +356,4 @@ End:
|
|||||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||||
vim: et tw=78 syn=sgml
|
vim: et tw=78 syn=sgml
|
||||||
vi: ts=1 sw=1
|
vi: ts=1 sw=1
|
||||||
-->
|
-->
|
@@ -1,8 +1,15 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.5 Maintainer: gerald Status: ready -->
|
<!-- EN-Revision: 1.7 Maintainer: yannick Status: ready -->
|
||||||
|
|
||||||
<sect1 id="language.function.html.select.time">
|
<sect1 id="language.function.html.select.time">
|
||||||
<title>html_select_time</title>
|
<title>{html_select_time}</title>
|
||||||
|
<para>
|
||||||
|
{html_select_time} est une
|
||||||
|
<link linkend="language.custom.functions">fonction personnalis<69>e</link>
|
||||||
|
qui cr<63>e des listes d<>roulantes pour saisir une heure. Elle prends en charge l'heure,
|
||||||
|
les minutes, les secondes et le m<>ridian.
|
||||||
|
</para>
|
||||||
<informaltable frame="all">
|
<informaltable frame="all">
|
||||||
<tgroup cols="5">
|
<tgroup cols="5">
|
||||||
<colspec colname="param" align="center" />
|
<colspec colname="param" align="center" />
|
||||||
@@ -137,17 +144,16 @@
|
|||||||
</tgroup>
|
</tgroup>
|
||||||
</informaltable>
|
</informaltable>
|
||||||
<para>
|
<para>
|
||||||
{html_select_time} est une fonction utilisateur qui cr<63>e des listes
|
L'attribut 'time' accepte comme param<61>tre diff<66>rents formats. Ils peuvent <20>tre
|
||||||
d<EFBFBD>roulantes pour saisir une heure. Elle prends en charge l'heure,
|
un timestamp unique, une cha<68>ne respectant le format AAAAMMJJHHMMSS ou une cha<68>ne
|
||||||
les minutes, les secondes et le m<>ridian.
|
valide pour la fonction php <ulink url="&url.php-manual;strtotime">strtotime()</ulink>.
|
||||||
Elle accepte comme param<61>tre diff<66>rents formats. Ils peuvent <20>tre
|
|
||||||
un timestamp, une chaine respectant le format AAAAMMJJHHMMSS ou une chaine
|
|
||||||
correcte pour la fonction php <ulink url="&url.php-manual;strtotime">strtotime()</ulink>.
|
|
||||||
</para>
|
</para>
|
||||||
<example>
|
<example>
|
||||||
<title>html_select_time</title>
|
<title>html_select_time</title>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
|
Code du template :
|
||||||
|
----------------------
|
||||||
{html_select_time use_24_hours=true}
|
{html_select_time use_24_hours=true}
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
@@ -316,10 +322,11 @@
|
|||||||
<para>
|
<para>
|
||||||
Voir aussi
|
Voir aussi
|
||||||
<link linkend="language.variables.smarty.now">$smarty.now</link>,
|
<link linkend="language.variables.smarty.now">$smarty.now</link>,
|
||||||
<link linkend="language.function.html.select.date">{html_select_date}</link>
|
<link linkend="language.function.html.select.date">{html_select_date}</link> et
|
||||||
et les <link linkend="tips.dates">astuces sur les dates</link>.
|
les <link linkend="tips.dates">astuces sur les dates</link>.
|
||||||
</para>
|
</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:
|
||||||
mode: sgml
|
mode: sgml
|
||||||
@@ -339,4 +346,4 @@ End:
|
|||||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||||
vim: et tw=78 syn=sgml
|
vim: et tw=78 syn=sgml
|
||||||
vi: ts=1 sw=1
|
vi: ts=1 sw=1
|
||||||
-->
|
-->
|
@@ -1,8 +1,20 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.6 Maintainer: gerald Status: ready -->
|
<!-- EN-Revision: 1.9 Maintainer: yannick Status: ready -->
|
||||||
|
|
||||||
<sect1 id="language.function.html.table">
|
<sect1 id="language.function.html.table">
|
||||||
<title>html_table</title>
|
<title>{html_table}</title>
|
||||||
|
<para>
|
||||||
|
{html_table} est une <link linkend="language.custom.functions">fonction personnalis<69>e</link>
|
||||||
|
qui transforme un tableau de donn<6E>es dans un tabeau HTML. L'attribut
|
||||||
|
<emphasis>cols</emphasis> d<>termine le nombre de colonne du tableau.
|
||||||
|
Les attributs <emphasis>table_attr</emphasis>, <emphasis>tr_attr</emphasis>
|
||||||
|
et <emphasis>td_attr</emphasis> d<>terminent les attributs donn<6E>s aux
|
||||||
|
balises table, tr et td. Si <emphasis>tr_attr</emphasis> ou
|
||||||
|
<emphasis>td_attr</emphasis> sont des tableaux, ils seront parcourus.
|
||||||
|
<emphasis>trailpad</emphasis> est la valeur avec laquelle cera remplit
|
||||||
|
les cellules restantes de la derni<6E>re ligne, s'il y en a.
|
||||||
|
</para>
|
||||||
<informaltable frame="all">
|
<informaltable frame="all">
|
||||||
<tgroup cols="5">
|
<tgroup cols="5">
|
||||||
<colspec colname="param" align="center" />
|
<colspec colname="param" align="center" />
|
||||||
@@ -101,8 +113,8 @@
|
|||||||
<entry>Non</entry>
|
<entry>Non</entry>
|
||||||
<entry><emphasis>right</emphasis></entry>
|
<entry><emphasis>right</emphasis></entry>
|
||||||
<entry>
|
<entry>
|
||||||
Direction du rendu. Les valeurs possibles sont <emphasis>left</emphasis> (left-to-right),
|
Direction du rendu. Les valeurs possibles sont <emphasis>right</emphasis> (left-to-right),
|
||||||
<emphasis>right</emphasis> (right-to-left)
|
<emphasis>left</emphasis> (right-to-left)
|
||||||
</entry>
|
</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
@@ -115,26 +127,16 @@
|
|||||||
<emphasis>down</emphasis> (top-to-bottom), <emphasis>up</emphasis>
|
<emphasis>down</emphasis> (top-to-bottom), <emphasis>up</emphasis>
|
||||||
(bottom-to-top)
|
(bottom-to-top)
|
||||||
</entry>
|
</entry>
|
||||||
</row>
|
</row>
|
||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
</informaltable>
|
</informaltable>
|
||||||
<para>
|
|
||||||
<emphasis>html_table</emphasis> est une fonction utilisateur
|
|
||||||
qui transforme un tableau de donn<6E>es dans un tabeau HTML. L'attribut
|
|
||||||
<emphasis>cols</emphasis> d<>termine le nombre de colonne du tableau.
|
|
||||||
Les attributs <emphasis>table_attr</emphasis>, <emphasis>tr_attr</emphasis>
|
|
||||||
et <emphasis>td_attr</emphasis> d<>terminent les attributs donn<6E>s aux
|
|
||||||
balises table, tr et td. Si <emphasis>tr_attr</emphasis> ou
|
|
||||||
<emphasis>td_attr</emphasis> sont des tableaux, ils seront parcourus.
|
|
||||||
<emphasis>trailpad</emphasis> est la valeur avec laquelle remplir
|
|
||||||
les cellules restantes de la derni<6E>re ligne, s'il y en a une.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<example>
|
<example>
|
||||||
<title>html_table</title>
|
<title>{html_table}</title>
|
||||||
<programlisting role="php">
|
<programlisting role="php">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
|
Code PHP :
|
||||||
|
-------------
|
||||||
<?php
|
<?php
|
||||||
require('Smarty.class.php');
|
require('Smarty.class.php');
|
||||||
$smarty = new Smarty;
|
$smarty = new Smarty;
|
||||||
@@ -146,6 +148,8 @@ $smarty->display('index.tpl');
|
|||||||
</programlisting>
|
</programlisting>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
|
Code du template :
|
||||||
|
----------------------
|
||||||
{html_table loop=$data}
|
{html_table loop=$data}
|
||||||
{html_table loop=$data cols=4 table_attr='border="0"'}
|
{html_table loop=$data cols=4 table_attr='border="0"'}
|
||||||
{html_table loop=$data cols=4 tr_attr=$tr}
|
{html_table loop=$data cols=4 tr_attr=$tr}
|
||||||
@@ -195,4 +199,4 @@ End:
|
|||||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||||
vim: et tw=78 syn=sgml
|
vim: et tw=78 syn=sgml
|
||||||
vi: ts=1 sw=1
|
vi: ts=1 sw=1
|
||||||
-->
|
-->
|
@@ -1,8 +1,14 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.4 Maintainer: gerald Status: ready -->
|
<!-- EN-Revision: 1.6 Maintainer: yannick Status: ready -->
|
||||||
|
|
||||||
<sect1 id="language.function.mailto">
|
<sect1 id="language.function.mailto">
|
||||||
<title>mailto</title>
|
<title>{mailto}</title>
|
||||||
|
<para>
|
||||||
|
{mailto} cr<63>e un lien mailto automatiquement encod<6F> (optionnel).
|
||||||
|
L'encodage rend la t<>che de r<>cup<75>ration des e-mails sur votre
|
||||||
|
site plus difficiles aux "web spiders".
|
||||||
|
</para>
|
||||||
<informaltable frame="all">
|
<informaltable frame="all">
|
||||||
<tgroup cols="5">
|
<tgroup cols="5">
|
||||||
<colspec colname="param" align="center" />
|
<colspec colname="param" align="center" />
|
||||||
@@ -94,11 +100,6 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
</informaltable>
|
</informaltable>
|
||||||
<para>
|
|
||||||
mailto cr<63>e un lien mailto automatiquement encod<6F> (optionnel).
|
|
||||||
L'encodage rend la t<>che de r<>cup<75>ration des e-mails sur votre
|
|
||||||
site plus difficiles aux "web spiders".
|
|
||||||
</para>
|
|
||||||
<note>
|
<note>
|
||||||
<title>Note technique</title>
|
<title>Note technique</title>
|
||||||
<para>
|
<para>
|
||||||
@@ -107,44 +108,49 @@
|
|||||||
</para>
|
</para>
|
||||||
</note>
|
</note>
|
||||||
<example>
|
<example>
|
||||||
<title>mailto</title>
|
<title>{mailto}</title>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
{mailto address="moi@example.com"}
|
{mailto address="moi@example.com"}
|
||||||
{mailto address="moi@example.com" text="send me some mail"}
|
<a href="mailto:moi@example.com" >moi@example.com</a>
|
||||||
|
|
||||||
|
{mailto address="moi@example.com" text="envoie-moi un email"}
|
||||||
|
<a href="mailto:moi@example.com" >envoie-moi un email</a>
|
||||||
|
|
||||||
{mailto address="moi@example.com" encode="javascript"}
|
{mailto address="moi@example.com" encode="javascript"}
|
||||||
|
<script type="text/javascript" language="javascript">
|
||||||
|
eval(unescape('%64%6f% ... coup<75> ...%61%3e%27%29%3b'))
|
||||||
|
</script>
|
||||||
|
|
||||||
{mailto address="moi@example.com" encode="hex"}
|
{mailto address="moi@example.com" encode="hex"}
|
||||||
|
<a href="mailto:%6d%65.. coup<75>..3%6f%6d">m&..coup<75>...#x6f;m</a>
|
||||||
|
|
||||||
{mailto address="moi@example.com" subject="Hello to you!"}
|
{mailto address="moi@example.com" subject="Hello to you!"}
|
||||||
{mailto address="moi@example.com" cc="you@domain.com,they@domain.com"}
|
<a href="mailto:moi@example.com?subject=Hello%20to%20you%21" >me@example.com</a>
|
||||||
|
|
||||||
|
{mailto address="moi@example.com" cc="toi@example.com,eux@example.com"}
|
||||||
|
<a href="mailto:moi@example.com?cc=toi@example.com%2Ceux@example.com" >moi@example.com</a>
|
||||||
|
|
||||||
{mailto address="moi@example.com" extra='class="email"'}
|
{mailto address="moi@example.com" extra='class="email"'}
|
||||||
|
<a href="mailto:moi@example.com" class="email">moi@example.com</a>
|
||||||
|
|
||||||
{mailto address="moi@example.com" encode="javascript_charcode"}
|
{mailto address="moi@example.com" encode="javascript_charcode"}
|
||||||
|
<script type="text/javascript" language="javascript">
|
||||||
|
<!--
|
||||||
|
{document.write(String.fromCharCode(60,97, ... coup<75> ....60,47,97,62))}
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</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" >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>
|
|
||||||
]]>
|
|
||||||
</screen>
|
|
||||||
</example>
|
</example>
|
||||||
|
<para>
|
||||||
|
Voir aussi
|
||||||
|
<link linkend="language.modifier.escape">escape</link>,
|
||||||
|
<link linkend="tips.obfuscating.email">le camouflage des adresses E-mail</link> et
|
||||||
|
<link linkend="language.function.textformat">{textformat}</link>.
|
||||||
|
</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:
|
||||||
mode: sgml
|
mode: sgml
|
||||||
@@ -164,4 +170,4 @@ End:
|
|||||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||||
vim: et tw=78 syn=sgml
|
vim: et tw=78 syn=sgml
|
||||||
vi: ts=1 sw=1
|
vi: ts=1 sw=1
|
||||||
-->
|
-->
|
@@ -1,8 +1,25 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.2 Maintainer: gerald Status: ready -->
|
<!-- EN-Revision: 1.4 Maintainer: yannick Status: ready -->
|
||||||
|
|
||||||
<sect1 id="language.function.math">
|
<sect1 id="language.function.math">
|
||||||
<title>math</title>
|
<title>{math}</title>
|
||||||
|
<para>
|
||||||
|
{math} autorise les designers de templates <20> effectuer des op<6F>rations
|
||||||
|
dans le template. Toute valeur num<75>rique peut <20>tre utilis<69>e dans une
|
||||||
|
op<6F>ration, et le r<>sultat sera affich<63> <20> la place des balises
|
||||||
|
"equation". Les variables utilis<69>es dans l'op<6F>ration sont pass<73>es en
|
||||||
|
tant que param<61>tre, et peuvent <20>tre des variables de templates ou des
|
||||||
|
valeurs statiques. +, -, /, *, abs, ceil, cos,
|
||||||
|
exp, floor, log, log10, max, min, pi, pow, rand, round, sin, sqrt,
|
||||||
|
srans et tan sont tous des op<6F>rateurs valides. Voir la
|
||||||
|
documentation PHP pour plus d'informations sur ces fonctions
|
||||||
|
math<74>matiques.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Si vous sp<73>cifiez l'attribut assign, la sortie sera assign<67>e <20> la variable
|
||||||
|
donn<6E>e plut<75>t que d'<27>tre directement affich<63>e.
|
||||||
|
</para>
|
||||||
<informaltable frame="all">
|
<informaltable frame="all">
|
||||||
<tgroup cols="5">
|
<tgroup cols="5">
|
||||||
<colspec colname="param" align="center" />
|
<colspec colname="param" align="center" />
|
||||||
@@ -59,36 +76,23 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
</informaltable>
|
</informaltable>
|
||||||
<para>
|
|
||||||
math autorise les designers de templates <20> effectuer des op<6F>rations
|
|
||||||
dans le template. Toute valeur num<75>rique peut <20>tre utilis<69>e dans une
|
|
||||||
op<6F>ration, et le r<>sultat sera affich<63> <20> la place des balises
|
|
||||||
"equation". Les variables utilis<69>es dans l'op<6F>ration sont pass<73>es en
|
|
||||||
tant que param<61>tre, et peuvent <20>tre des variables de templates ou des
|
|
||||||
valeurs statiques. +, -, /, *, abs, ceil, cos,
|
|
||||||
exp, floor, log, log10, max, min, pi, pow, rand, round, sin, sqrt,
|
|
||||||
srans et tan sont tous des op<6F>rateurs valides. Voir la
|
|
||||||
documentation PHP pour plus d'informations sur ces fonctions
|
|
||||||
math<74>matiques.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
Si vous sp<73>cifiez l'attribut assign, la sortie sera assign<67>e <20> la variable
|
|
||||||
donn<6E>e plut<75>t que d'<27>tre directement affich<63>e.
|
|
||||||
</para>
|
|
||||||
<note>
|
<note>
|
||||||
<title>Note technique</title>
|
<title>Note technique</title>
|
||||||
<para>
|
<para>
|
||||||
math est une fonction co<63>teuse en terme de performances, du fait
|
{math} est une fonction co<63>teuse en terme de performances, du fait
|
||||||
qu'elle utilise la fonction PHP eval (). Effectuer les calculs
|
qu'elle utilise la fonction PHP <ulink url="&url.php-manual;eval">eval()</ulink>.
|
||||||
dans votre code PHP est beaucoup plus efficient, donc, chaque fois
|
Effectuer les calculs dans votre code PHP est beaucoup plus efficient, donc, chaque fois
|
||||||
que possible, effectuez vos calculs directement dans PHP et assignez
|
que possible, effectuez vos calculs directement dans PHP et <link linkend="api.assign">assignez</link>
|
||||||
le r<>sultat au template. Evitez co<63>t que co<63>t les appels
|
le r<>sultat au template. Evitez co<63>t que co<63>t les appels
|
||||||
r<>p<EFBFBD>titifs <20> la fonction math, comme on pourait le faire une
|
r<>p<EFBFBD>titifs <20> la fonction {math}, comme on pourait le faire une
|
||||||
une boucle section.
|
une boucle <link linkend="language.function.section">{section}</link>.
|
||||||
</para>
|
</para>
|
||||||
</note>
|
</note>
|
||||||
<example>
|
<example>
|
||||||
<title>math</title>
|
<title>{math}</title>
|
||||||
|
<para>
|
||||||
|
<emphasis role="bold">Exemple a :</emphasis>
|
||||||
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
{* $height=4, $width=5 *}
|
{* $height=4, $width=5 *}
|
||||||
@@ -104,6 +108,9 @@
|
|||||||
9
|
9
|
||||||
]]>
|
]]>
|
||||||
</screen>
|
</screen>
|
||||||
|
<para>
|
||||||
|
<emphasis role="bold">Exemple b :</emphasis>
|
||||||
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
{* $row_height = 10, $row_width = 20, #col_div# = 2, assigned in template *}
|
{* $row_height = 10, $row_width = 20, #col_div# = 2, assigned in template *}
|
||||||
@@ -122,6 +129,9 @@
|
|||||||
100
|
100
|
||||||
]]>
|
]]>
|
||||||
</screen>
|
</screen>
|
||||||
|
<para>
|
||||||
|
<emphasis role="bold">Exemple c :</emphasis>
|
||||||
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
{* vous pouvez utiliser des parenth<74>ses *}
|
{* vous pouvez utiliser des parenth<74>ses *}
|
||||||
@@ -137,6 +147,9 @@
|
|||||||
6
|
6
|
||||||
]]>
|
]]>
|
||||||
</screen>
|
</screen>
|
||||||
|
<para>
|
||||||
|
<emphasis role="bold">Exemple d :</emphasis>
|
||||||
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
{* vous pouvez d<>finir un format sprintf pour l'affichage *}
|
{* vous pouvez d<>finir un format sprintf pour l'affichage *}
|
||||||
@@ -155,6 +168,7 @@
|
|||||||
</screen>
|
</screen>
|
||||||
</example>
|
</example>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
Local variables:
|
Local variables:
|
||||||
mode: sgml
|
mode: sgml
|
||||||
@@ -174,4 +188,4 @@ End:
|
|||||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||||
vim: et tw=78 syn=sgml
|
vim: et tw=78 syn=sgml
|
||||||
vi: ts=1 sw=1
|
vi: ts=1 sw=1
|
||||||
-->
|
-->
|
@@ -1,34 +1,36 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.2 Maintainer: gerald Status: ready -->
|
<!-- EN-Revision: 1.4 Maintainer: yannick Status: ready -->
|
||||||
|
|
||||||
<sect1 id="language.function.popup.init">
|
<sect1 id="language.function.popup.init">
|
||||||
<title>popup_init</title>
|
<title>{popup_init}</title>
|
||||||
<para>
|
<para>
|
||||||
popup est une int<6E>gration de overLib, une librairie capable de r<>aliser
|
<link linkend="language.function.popup">{popup}</link>
|
||||||
des fen<65>tres surgissantes. (nous parlerons de "popup").
|
est une int<6E>gration de <ulink url="&url.overLib;">overLib</ulink>,
|
||||||
|
une librairie capable de r<>aliser des fen<65>tres surgissantes (nous parlerons de "popup").
|
||||||
Ce type de fen<65>tre est utilis<69> pour apporter des informations
|
Ce type de fen<65>tre est utilis<69> pour apporter des informations
|
||||||
contextuelles, comme des infobulles d'aides ou astuces.
|
contextuelles, comme des infobulles d'aides ou astuces.
|
||||||
popup_init doit <20>tre appel<65> une fois, en d<>but de page si vous comptez
|
{popup_init} doit <20>tre appel<65> une fois, en d<>but de page si vous comptez
|
||||||
utiliser la fonction <link linkend="language.function.popup">popup</link>.
|
utiliser la fonction <link linkend="language.function.popup">{popup}</link>.
|
||||||
overLib <20> <20>t<EFBFBD> <20>crit par Erik Bosrup. Le site d'overlib est situ<74> <20>
|
|
||||||
l'adresse http://www.bosrup.com/web/overlib/.
|
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Comme dans Smarty 2.1.2, overLib n'est PAS fournie dans la distribution.
|
<ulink url="&url.overLib;">overLib</ulink>
|
||||||
T<EFBFBD>l<EFBFBD>chargez overLib, d<>posez overlib.js dans votre arborescence web et
|
a <20>t<EFBFBD> <20>crit par Erik Bosrup, et le site de l'auteur/le t<>l<EFBFBD>chargement est disponible <20> l'adresse sur
|
||||||
indiquez le chemin relatif <20> ce fichier dans l'attribut src de
|
<ulink url="&url.overLib;">&url.overLib;</ulink>.
|
||||||
popup_init.
|
|
||||||
</para>
|
</para>
|
||||||
<example>
|
<example>
|
||||||
<title>popup_init</title>
|
<title>{popup_init}</title>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
|
<head>
|
||||||
{* popup_init doit <20>tre appel<65> une fois en d<>but de page. *}
|
{* popup_init doit <20>tre appel<65> une fois en d<>but de page. *}
|
||||||
{popup_init src="/javascripts/overlib.js"}
|
{popup_init src="/javascripts/overlib.js"}
|
||||||
|
</head>
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</example>
|
</example>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
Local variables:
|
Local variables:
|
||||||
mode: sgml
|
mode: sgml
|
||||||
@@ -48,4 +50,4 @@ End:
|
|||||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||||
vim: et tw=78 syn=sgml
|
vim: et tw=78 syn=sgml
|
||||||
vi: ts=1 sw=1
|
vi: ts=1 sw=1
|
||||||
-->
|
-->
|
@@ -1,8 +1,14 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.4 Maintainer: gerald Status: ready -->
|
<!-- EN-Revision: 1.6 Maintainer: yannick Status: ready -->
|
||||||
|
|
||||||
<sect1 id="language.function.popup">
|
<sect1 id="language.function.popup">
|
||||||
<title>popup</title>
|
<title>{popup}</title>
|
||||||
|
<para>
|
||||||
|
{popup} est utilis<69> pour cr<63>er une fen<65>tre popup javascript.
|
||||||
|
<link linkend="language.function.popup.init">{popup_init}</link> DOIT <20>tre appel<65> en premier
|
||||||
|
pour que cela fonctionne.
|
||||||
|
</para>
|
||||||
<informaltable frame="all">
|
<informaltable frame="all">
|
||||||
<tgroup cols="5">
|
<tgroup cols="5">
|
||||||
<colspec colname="param" align="center" />
|
<colspec colname="param" align="center" />
|
||||||
@@ -401,11 +407,8 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
</informaltable>
|
</informaltable>
|
||||||
<para>
|
|
||||||
popup est utilis<69> pour cr<63>er une fen<65>tre popup javascript.
|
|
||||||
</para>
|
|
||||||
<example>
|
<example>
|
||||||
<title>popup</title>
|
<title>{popup}</title>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
{* popup_init doit <20>tre appel<65> en haut de votre page *}
|
{* popup_init doit <20>tre appel<65> en haut de votre page *}
|
||||||
@@ -414,17 +417,20 @@
|
|||||||
{* cr<63>ation d'un lien avec une popup qui apparait sur l'<27>v<EFBFBD>nement onMouseOver *}
|
{* cr<63>ation d'un lien avec une popup qui apparait sur l'<27>v<EFBFBD>nement onMouseOver *}
|
||||||
<A href="mypage.html" {popup text="Ce lien vous am<61>ne sur ma page!"}>mypage</A>
|
<A href="mypage.html" {popup text="Ce lien vous am<61>ne sur ma page!"}>mypage</A>
|
||||||
|
|
||||||
{* vous pouvez utiliser du html, des liens, etc dans vos popup *}
|
{* vous pouvez utiliser du html, des liens, etc. dans vos popup *}
|
||||||
<A href="mypage.html" {popup sticky=true caption="mypage contents"
|
<a href="mypage.html" {popup sticky=true caption="mypage contents"
|
||||||
text="<UL><LI>links<LI>pages<LI>images</UL>" snapx=10 snapy=10}>mypage</A>
|
text="<ul><li>links</li><li>pages</li><li>images</li></ul>"
|
||||||
|
snapx=10 snapy=10}>mypage</a>
|
||||||
SORTIE:
|
|
||||||
|
|
||||||
(allez sur le site officiel de Smarty pour des exemples.)
|
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</example>
|
</example>
|
||||||
|
<para>
|
||||||
|
Voir aussi
|
||||||
|
<link linkend="language.function.popup.init">{popup_init}</link> et
|
||||||
|
<ulink url="&url.overLib;">overLib</ulink>.
|
||||||
|
</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:
|
||||||
mode: sgml
|
mode: sgml
|
||||||
@@ -444,4 +450,4 @@ End:
|
|||||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||||
vim: et tw=78 syn=sgml
|
vim: et tw=78 syn=sgml
|
||||||
vi: ts=1 sw=1
|
vi: ts=1 sw=1
|
||||||
-->
|
-->
|
@@ -1,8 +1,22 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.2 Maintainer: gerald Status: ready -->
|
<!-- EN-Revision: 1.4 Maintainer: yannick Status: ready -->
|
||||||
|
|
||||||
<sect1 id="language.function.textformat">
|
<sect1 id="language.function.textformat">
|
||||||
<title>textformat</title>
|
<title>{textformat}</title>
|
||||||
|
<para>
|
||||||
|
{textformat} est une
|
||||||
|
<link linkend="plugins.block.functions">fonction de bloc</link>
|
||||||
|
utilis<69>e pour formater du texte.
|
||||||
|
Elle nettoie la cha<68>ne de ses espaces et caract<63>res sp<73>ciaux, puis
|
||||||
|
formate les paragraphes en ajustant ces derniers <20> une certaine limite,
|
||||||
|
puis en indentant les lignes.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Vous pouvez soit utiliser un style pr<70>d<EFBFBD>fini, soit d<>finir explicitement
|
||||||
|
chaque attribut. Actuellement, seul le style pr<70>d<EFBFBD>fini "email" est
|
||||||
|
disponible.
|
||||||
|
</para>
|
||||||
<informaltable frame="all">
|
<informaltable frame="all">
|
||||||
<tgroup cols="5">
|
<tgroup cols="5">
|
||||||
<colspec colname="param" align="center" />
|
<colspec colname="param" align="center" />
|
||||||
@@ -86,19 +100,8 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
</informaltable>
|
</informaltable>
|
||||||
<para>
|
|
||||||
textformat est une fonction de bloc utilis<69>e pour formater du texte.
|
|
||||||
Elle nettoie la cha<68>ne de ses espaces et caract<63>res sp<73>ciaux, puis
|
|
||||||
formate les paragraphes en ajustant ces derniers <20> une certaine limite,
|
|
||||||
puis en indentant les lignes.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
Vous pouvez soit utiliser un style pr<70>d<EFBFBD>fini, soit d<>finir explicitement
|
|
||||||
chaque attribut. Actuellement, seul le style pr<70>d<EFBFBD>fini "email" est
|
|
||||||
disponible.
|
|
||||||
</para>
|
|
||||||
<example>
|
<example>
|
||||||
<title>textformat</title>
|
<title>{textformat}</title>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
{textformat wrap=40}
|
{textformat wrap=40}
|
||||||
@@ -271,6 +274,11 @@ foo.
|
|||||||
]]>
|
]]>
|
||||||
</screen>
|
</screen>
|
||||||
</example>
|
</example>
|
||||||
|
<para>
|
||||||
|
Voir aussi
|
||||||
|
<link linkend="language.function.strip">{strip}</link> et
|
||||||
|
<link linkend="language.modifier.wordwrap">{wordwrap}</link>.
|
||||||
|
</para>
|
||||||
</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