sync with en

# there's a little make problem, I'll fix this later
This commit is contained in:
didou
2004-10-27 10:43:43 +00:00
parent d40bcb8883
commit e03a395c38
8 changed files with 160 additions and 144 deletions

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="iso-8859-1"?> <?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ --> <!-- $Revision$ -->
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial --> <!-- EN-Revision: 1.2 Maintainer: didou Status: ready -->
<sect1 id="variable.autoload.filters"> <sect1 id="variable.autoload.filters">
<title>$autoload_filters</title> <title>$autoload_filters</title>
<para> <para>
@@ -10,8 +10,10 @@
tableaux comportant le nom des filtres. tableaux comportant le nom des filtres.
<informalexample> <informalexample>
<programlisting> <programlisting>
$smarty-&gt;autoload_filters = array('pre' =&gt; array('trim', 'stamp'), <![CDATA[
$smarty->autoload_filters = array('pre' => array('trim', 'stamp'),
'output' => array('convert')); 'output' => array('convert'));
]]>
</programlisting> </programlisting>
</informalexample> </informalexample>
</para> </para>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="iso-8859-1"?> <?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ --> <!-- $Revision$ -->
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial --> <!-- EN-Revision: 1.2 Maintainer: didou Status: ready -->
<sect1 id="variable.cache.dir"> <sect1 id="variable.cache.dir">
<title>$cache_dir</title> <title>$cache_dir</title>
<para> <para>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="iso-8859-1"?> <?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ --> <!-- $Revision$ -->
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial --> <!-- EN-Revision: 1.2 Maintainer: didou Status: ready -->
<sect1 id="variable.cache.handler.func"> <sect1 id="variable.cache.handler.func">
<title>$cache_handler_func</title> <title>$cache_handler_func</title>
<para> <para>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="iso-8859-1"?> <?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ --> <!-- $Revision$ -->
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial --> <!-- EN-Revision: 1.2 Maintainer: didou Status: ready -->
<sect1 id="variable.cache.lifetime"> <sect1 id="variable.cache.lifetime">
<title>$cache_lifetime</title> <title>$cache_lifetime</title>
<para> <para>
@@ -19,8 +19,7 @@
d<>sactivant ainsi le cache. Vous pouvez effacer tous les fichiers du cache d<>sactivant ainsi le cache. Vous pouvez effacer tous les fichiers du cache
avec la function avec la function
<link linkend="api.clear.all.cache">clear_all_cache()</link> <link linkend="api.clear.all.cache">clear_all_cache()</link>
ou de faton individuelle (ou group<75>e) ou de faton individuelle (ou group<75>e) avec la fonction <link
avec la fonction <link
linkend="api.clear.cache">clear_cache()</link>. linkend="api.clear.cache">clear_cache()</link>.
</para> </para>
<note> <note>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="iso-8859-1"?> <?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ --> <!-- $Revision$ -->
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial --> <!-- EN-Revision: 1.2 Maintainer: didou Status: ready -->
<sect1 id="variable.cache.modified.check"> <sect1 id="variable.cache.modified.check">
<title>$cache_modified_check</title> <title>$cache_modified_check</title>
<para> <para>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="iso-8859-1"?> <?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ --> <!-- $Revision$ -->
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial --> <!-- EN-Revision: 1.2 Maintainer: didou Status: ready -->
<sect1 id="variable.php.handling"> <sect1 id="variable.php.handling">
<title>$php_handling</title> <title>$php_handling</title>
<para> <para>
@@ -21,12 +21,14 @@
<listitem><para>SMARTY_PHP_ALLOW - Smarty ex<65>cute les balises <listitem><para>SMARTY_PHP_ALLOW - Smarty ex<65>cute les balises
comme du code PHP.</para></listitem> comme du code PHP.</para></listitem>
</itemizedlist> </itemizedlist>
<note>
<para> <para>
NOTE : Int<6E>grer du code PHP dans les templates est vivement Int<6E>grer du code PHP dans les templates est vivement
d<>conseill<6C>. Pr<50>f<EFBFBD>rez les d<>conseill<6C>. Pr<50>f<EFBFBD>rez les
<link linkend="language.custom.functions">fonctions utilisateurs</link> <link linkend="language.custom.functions">fonctions utilisateurs</link>
ou les <link linkend="language.modifiers">modificateurs de variables</link>. ou les <link linkend="language.modifiers">modificateurs de variables</link>.
</para> </para>
</note>
</sect1> </sect1>
<!-- Keep this comment at the end of the file <!-- Keep this comment at the end of the file
Local variables: Local variables:

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="iso-8859-1"?> <?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ --> <!-- $Revision$ -->
<!-- EN-Revision: 1.3 Maintainer: didou Status: ready --> <!-- EN-Revision: 1.5 Maintainer: didou Status: ready -->
<sect1 id="caching.cacheable"> <sect1 id="caching.cacheable">
<title>Contr<EFBFBD>ler la mise en cache des sorties des Plugins</title> <title>Contr<EFBFBD>ler la mise en cache des sorties des Plugins</title>
<para> <para>
@@ -32,9 +32,8 @@
<title>Eviter la mise en cache du r<>sultat d'un plugin</title> <title>Eviter la mise en cache du r<>sultat d'un plugin</title>
<programlisting role="php"> <programlisting role="php">
<![CDATA[ <![CDATA[
index.php:
<?php <?php
require('Smarty.class.php'); require('Smarty.class.php');
$smarty = new Smarty; $smarty = new Smarty;
$smarty->caching = true; $smarty->caching = true;
@@ -56,19 +55,22 @@ if (!$smarty->is_cached('index.tpl')) {
$smarty->display('index.tpl'); $smarty->display('index.tpl');
?> ?>
]]>
</programlisting>
index.tpl: <para>
O<> index.tpl contient :
</para>
<programlisting>
<![CDATA[
Time Remaining: {remain endtime=$obj->endtime} Time Remaining: {remain endtime=$obj->endtime}
]]> ]]>
</programlisting> </programlisting>
<para> <para>
Le nombre de secondes avant que la date de fin de $obj ne soit atteinte change Le nombre de secondes avant que la date de fin de $obj ne soit atteinte
<20> chaque affichage de la page, m<>me si la page est mise en cache. Comme l'attribut change <EFBFBD> chaque affichage de la page, m<>me si la page est mise en cache.
endtime est mis en cache, il n'y a que l'objet qui ait besoin d'<27>tre extrait de la Comme l'attribut endtime est mis en cache, il n'y a que l'objet qui ait
base de donn<6E>es lors de la mise en cache de la page, mais pas lors des affichages besoin d'<27>tre extrait de la base de donn<6E>es lors de la mise en cache de
ult<6C>rieurs de la page. la page, mais pas lors des affichages ult<EFBFBD>rieurs de la page.
</para> </para>
</example> </example>
@@ -76,8 +78,6 @@ Time Remaining: {remain endtime=$obj->endtime}
<title>Eviter la mise en cache d'une portion du template</title> <title>Eviter la mise en cache d'une portion du template</title>
<programlisting role="php"> <programlisting role="php">
<![CDATA[ <![CDATA[
index.php:
<?php <?php
require('Smarty.class.php'); require('Smarty.class.php');
$smarty = new Smarty; $smarty = new Smarty;
@@ -90,10 +90,13 @@ $smarty->register_block('dynamic', 'smarty_block_dynamic', false);
$smarty->display('index.tpl'); $smarty->display('index.tpl');
?> ?>
]]>
</programlisting>
index.tpl: <para>
O<> index.tpl contient :
</para>
<programlisting>
<![CDATA[
Page created: {"0"|date_format:"%D %H:%M:%S"} Page created: {"0"|date_format:"%D %H:%M:%S"}
{dynamic} {dynamic}
@@ -108,10 +111,10 @@ Now is: {"0"|date_format:"%D %H:%M:%S"}
</example> </example>
<para> <para>
Lors du rechargement de la page, vous remarquerez que les deux dates sont diff<EFBFBD>rentes. Lors du rechargement de la page, vous remarquerez que les deux dates sont
L'une est "dynamique" et l'autre est "statique". Vous pouvez faire ce que vous voulez diff<66>rentes. L'une est "dynamique" et l'autre est "statique". Vous pouvez
entre {dynamic}...{/dynamic} et <20>tre s<>rs que cela ne sera pas mis en cache comme le faire ce que vous voulez entre {dynamic}...{/dynamic} et <20>tre s<>rs que
reste de la page. cela ne sera pas mis en cache comme le reste de la page.
</para> </para>
</sect1> </sect1>

View File

@@ -1,12 +1,13 @@
<?xml version="1.0" encoding="iso-8859-1"?> <?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ --> <!-- $Revision$ -->
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial --> <!-- EN-Revision: 1.2 Maintainer: didou Status: ready -->
<sect1 id="caching.multiple.caches"> <sect1 id="caching.multiple.caches">
<title>Caches multiples pour une seule page</title> <title>Caches multiples pour une seule page</title>
<para> <para>
Vous pouvez avoir plusieurs fichiers de caches pour un m<>me appel Vous pouvez avoir plusieurs fichiers de caches pour un m<>me appel
aux fonctions display() ou fetch(). Imaginons qu'un appel a display('index.tpl') aux fonctions display() ou fetch(). Imaginons qu'un appel a
puisse avoir plusieurs r<>sultats, en fonction de certaines conditions, et que display('index.tpl') puisse avoir plusieurs r<>sultats, en fonction de
certaines conditions, et que
vous vouliez des fichiers de cache s<>par<61>s pour chacun d'eux. Vous vous vouliez des fichiers de cache s<>par<61>s pour chacun d'eux. Vous
pouvez faire cela en passant un identifiant de cache (cache_id) en pouvez faire cela en passant un identifiant de cache (cache_id) en
deuxi<78>me param<61>tre a l'appel de fonction. deuxi<78>me param<61>tre a l'appel de fonction.
@@ -14,6 +15,7 @@
<example> <example>
<title>Passage d'un cache_id a display()</title> <title>Passage d'un cache_id a display()</title>
<programlisting> <programlisting>
<![CDATA[
require('Smarty.class.php'); require('Smarty.class.php');
$smarty = new Smarty; $smarty = new Smarty;
@@ -21,7 +23,9 @@ $smarty->caching = true;
$my_cache_id = $_GET['article_id']; $my_cache_id = $_GET['article_id'];
$smarty->display('index.tpl',$my_cache_id);</programlisting> $smarty->display('index.tpl',$my_cache_id);
]]>
</programlisting>
</example> </example>
<para> <para>
Nous passons ci-dessus la variable $my_cache_id a display() comme Nous passons ci-dessus la variable $my_cache_id a display() comme
@@ -55,6 +59,7 @@ $smarty->display('index.tpl',$my_cache_id);</programlisting>
<example> <example>
<title>passer un cache_id a is_cached()</title> <title>passer un cache_id a is_cached()</title>
<programlisting> <programlisting>
<![CDATA[
require('Smarty.class.php'); require('Smarty.class.php');
$smarty = new Smarty; $smarty = new Smarty;
@@ -68,7 +73,9 @@ if(!$smarty->is_cached('index.tpl',$my_cache_id)) {
$smarty->assign($contents); $smarty->assign($contents);
} }
$smarty->display('index.tpl',$my_cache_id);</programlisting> $smarty->display('index.tpl',$my_cache_id);
]]>
</programlisting>
</example> </example>
<para> <para>
Vous pouvez effacer tous les fichiers de cache pour un identifiant Vous pouvez effacer tous les fichiers de cache pour un identifiant
@@ -78,6 +85,7 @@ $smarty->display('index.tpl',$my_cache_id);</programlisting>
<example> <example>
<title>effacement de tous les fichiers de cache pour un identifiant de cache particulier</title> <title>effacement de tous les fichiers de cache pour un identifiant de cache particulier</title>
<programlisting> <programlisting>
<![CDATA[
require('Smarty.class.php'); require('Smarty.class.php');
$smarty = new Smarty; $smarty = new Smarty;
@@ -86,7 +94,9 @@ $smarty->caching = true;
// efface tous les fichiers de cache avec "sports" comme identifiant // efface tous les fichiers de cache avec "sports" comme identifiant
$smarty->clear_cache(null,"sports"); $smarty->clear_cache(null,"sports");
$smarty->display('index.tpl',"sports");</programlisting> $smarty->display('index.tpl',"sports");
]]>
</programlisting>
</example> </example>
<para> <para>
De cette mani<6E>re vous pouvez "grouper" vos fichiers de cache en leur De cette mani<6E>re vous pouvez "grouper" vos fichiers de cache en leur