mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-02 13:21:36 +01:00
sync with EN & typo
This commit is contained in:
@@ -1,35 +1,34 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
||||
<sect1 id="plugins.inserts"><title>Insertions</title>
|
||||
<para>
|
||||
Les plugins d'insertion sont utilis<69>s pour impl<70>menter les fonctions
|
||||
qui sont appel<65>es par les balises
|
||||
<link linkend="language.function.insert"><command>insert</command></link>
|
||||
dans les templates.
|
||||
</para>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>string <function>smarty_insert_<replaceable>name</replaceable></function></funcdef>
|
||||
<paramdef>array <parameter>$params</parameter></paramdef>
|
||||
<paramdef>object <parameter>&$smarty</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
Le premier param<61>tre pass<73> a la fonction est une tableau associatif
|
||||
d'attributs. Vous pouvez acc<63>der a ces valeurs soit directement, par exemple
|
||||
<varname>$params['start']</varname>, soit en utilisant
|
||||
<varname>extract($params)</varname> pour les importer dans la table
|
||||
des symboles.
|
||||
</para>
|
||||
<para>
|
||||
La fonction d'insertion est suppos<6F>e retourner le r<>sultat qui sera
|
||||
substitu<EFBFBD> a la balise <command>insert</command> dans le template.
|
||||
</para>
|
||||
<example>
|
||||
<title>plugin d'insertion</title>
|
||||
<programlisting>
|
||||
<?php
|
||||
<!-- EN-Revision: 1.2 Maintainer: yannick Status: ready -->
|
||||
<sect1 id="plugins.inserts">
|
||||
<title>Insertions</title>
|
||||
<para>
|
||||
Les plugins d'insertion sont utilis<69>s pour impl<70>menter les fonctions
|
||||
qui sont appel<65>es par les balises
|
||||
<link linkend="language.function.insert"><command>insert</command></link>
|
||||
dans les templates.
|
||||
</para>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>string <function>smarty_insert_<replaceable>name</replaceable></function></funcdef>
|
||||
<paramdef>array <parameter>$params</parameter></paramdef>
|
||||
<paramdef>object <parameter>&$smarty</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
Le premier param<61>tre pass<73> <20> la fonction est une tableau associatif
|
||||
d'attributs.
|
||||
</para>
|
||||
<para>
|
||||
La fonction d'insertion est suppos<6F>e retourner le r<>sultat qui sera
|
||||
substitu<74> <20> la balise <command>insert</command> dans le template.
|
||||
</para>
|
||||
<example>
|
||||
<title>Plugin d'insertion</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/*
|
||||
* Smarty plugin
|
||||
* -------------------------------------------------------------
|
||||
@@ -40,7 +39,7 @@
|
||||
* au format
|
||||
* -------------------------------------------------------------
|
||||
*/
|
||||
function smarty_insert_time($params, &$smarty)
|
||||
function smarty_insert_time($params, &$smarty)
|
||||
{
|
||||
if (empty($params['format'])) {
|
||||
$smarty->trigger_error("insert time: missing 'format' parameter");
|
||||
@@ -50,8 +49,10 @@ function smarty_insert_time($params, &$smarty)
|
||||
$datetime = strftime($params['format']);
|
||||
return $datetime;
|
||||
}
|
||||
?></programlisting>
|
||||
</example>
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</sect1>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
||||
Reference in New Issue
Block a user