mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
sync with en
# there's a little make problem, I'll fix this later
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
||||
<!-- EN-Revision: 1.2 Maintainer: didou Status: ready -->
|
||||
<sect1 id="variable.autoload.filters">
|
||||
<title>$autoload_filters</title>
|
||||
<para>
|
||||
@@ -9,10 +9,12 @@
|
||||
variable. Les types de filtres et les valeurs sont des
|
||||
tableaux comportant le nom des filtres.
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
$smarty->autoload_filters = array('pre' => array('trim', 'stamp'),
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
$smarty->autoload_filters = array('pre' => array('trim', 'stamp'),
|
||||
'output' => array('convert'));
|
||||
</programlisting>
|
||||
]]>
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
</sect1>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
||||
<!-- EN-Revision: 1.2 Maintainer: didou Status: ready -->
|
||||
<sect1 id="variable.cache.dir">
|
||||
<title>$cache_dir</title>
|
||||
<para>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
||||
<!-- EN-Revision: 1.2 Maintainer: didou Status: ready -->
|
||||
<sect1 id="variable.cache.handler.func">
|
||||
<title>$cache_handler_func</title>
|
||||
<para>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
||||
<!-- EN-Revision: 1.2 Maintainer: didou Status: ready -->
|
||||
<sect1 id="variable.cache.lifetime">
|
||||
<title>$cache_lifetime</title>
|
||||
<para>
|
||||
@@ -19,38 +19,37 @@
|
||||
d<>sactivant ainsi le cache. Vous pouvez effacer tous les fichiers du cache
|
||||
avec la function
|
||||
<link linkend="api.clear.all.cache">clear_all_cache()</link>
|
||||
ou de faton individuelle (ou group<75>e)
|
||||
avec la fonction <link
|
||||
linkend="api.clear.cache">clear_cache()</link>.
|
||||
ou de faton individuelle (ou group<75>e) avec la fonction <link
|
||||
linkend="api.clear.cache">clear_cache()</link>.
|
||||
</para>
|
||||
<note>
|
||||
<title>Note technique</title>
|
||||
<para>
|
||||
Si vous souhaitez donner a certains templates leur propre dur<75>e de vie
|
||||
en cache, vous pouvez le faire en r<>glant
|
||||
<link linkend="variable.caching">$caching</link> a 2,
|
||||
puis $cache_lifetime a une unique valeur juste avant d'appeler
|
||||
display ou fetch().
|
||||
</para>
|
||||
<note>
|
||||
<title>Note technique</title>
|
||||
<para>
|
||||
Si vous souhaitez donner a certains templates leur propre dur<75>e de vie
|
||||
en cache, vous pouvez le faire en r<>glant
|
||||
<link linkend="variable.caching">$caching</link> a 2,
|
||||
puis $cache_lifetime a une unique valeur juste avant d'appeler
|
||||
display ou fetch().
|
||||
</para>
|
||||
</note>
|
||||
</sect1>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
</note>
|
||||
</sect1>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
||||
<!-- EN-Revision: 1.2 Maintainer: didou Status: ready -->
|
||||
<sect1 id="variable.cache.modified.check">
|
||||
<title>$cache_modified_check</title>
|
||||
<para>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
||||
<!-- EN-Revision: 1.2 Maintainer: didou Status: ready -->
|
||||
<sect1 id="variable.php.handling">
|
||||
<title>$php_handling</title>
|
||||
<para>
|
||||
@@ -9,42 +9,44 @@
|
||||
d<>faut SMARTY_PHP_PASSTHRU. Notez que cela n'affecte PAS le code
|
||||
PHP entour<75> des balises
|
||||
<link linkend="language.function.php">{php}{/php}</link>
|
||||
dans le template.
|
||||
</para>
|
||||
<itemizedlist>
|
||||
<listitem><para>SMARTY_PHP_PASSTHRU - Smarty <20>crit les balises
|
||||
dans le template.
|
||||
</para>
|
||||
<itemizedlist>
|
||||
<listitem><para>SMARTY_PHP_PASSTHRU - Smarty <20>crit les balises
|
||||
telles quelles.</para></listitem>
|
||||
<listitem><para>SMARTY_PHP_QUOTE - Smarty transforme les balises
|
||||
<listitem><para>SMARTY_PHP_QUOTE - Smarty transforme les balises
|
||||
en entit<69>s HTML.</para></listitem>
|
||||
<listitem><para>SMARTY_PHP_REMOVE - Smarty supprime les balises
|
||||
<listitem><para>SMARTY_PHP_REMOVE - Smarty supprime les balises
|
||||
des templates.</para></listitem>
|
||||
<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>
|
||||
</itemizedlist>
|
||||
</itemizedlist>
|
||||
<note>
|
||||
<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
|
||||
<link linkend="language.custom.functions">fonctions utilisateurs</link>
|
||||
ou les <link linkend="language.modifiers">modificateurs de variables</link>.
|
||||
</para>
|
||||
</sect1>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
ou les <link linkend="language.modifiers">modificateurs de variables</link>.
|
||||
</para>
|
||||
</note>
|
||||
</sect1>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.3 Maintainer: didou Status: ready -->
|
||||
<!-- EN-Revision: 1.5 Maintainer: didou Status: ready -->
|
||||
<sect1 id="caching.cacheable">
|
||||
<title>Contr<EFBFBD>ler la mise en cache des sorties des Plugins</title>
|
||||
<para>
|
||||
@@ -32,9 +32,8 @@
|
||||
<title>Eviter la mise en cache du r<>sultat d'un plugin</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
index.php:
|
||||
|
||||
<?php
|
||||
|
||||
require('Smarty.class.php');
|
||||
$smarty = new Smarty;
|
||||
$smarty->caching = true;
|
||||
@@ -56,19 +55,22 @@ if (!$smarty->is_cached('index.tpl')) {
|
||||
|
||||
$smarty->display('index.tpl');
|
||||
?>
|
||||
|
||||
|
||||
index.tpl:
|
||||
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
O<> index.tpl contient :
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
Time Remaining: {remain endtime=$obj->endtime}
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Le nombre de secondes avant que la date de fin de $obj ne soit atteinte change
|
||||
<20> chaque affichage de la page, m<>me si la page est mise en cache. Comme l'attribut
|
||||
endtime est mis en cache, il n'y a que l'objet qui ait besoin d'<27>tre extrait de la
|
||||
base de donn<6E>es lors de la mise en cache de la page, mais pas lors des affichages
|
||||
ult<6C>rieurs de la page.
|
||||
Le nombre de secondes avant que la date de fin de $obj ne soit atteinte
|
||||
change <EFBFBD> chaque affichage de la page, m<>me si la page est mise en cache.
|
||||
Comme l'attribut endtime est mis en cache, il n'y a que l'objet qui ait
|
||||
besoin d'<27>tre extrait de la base de donn<6E>es lors de la mise en cache de
|
||||
la page, mais pas lors des affichages ult<EFBFBD>rieurs de la page.
|
||||
</para>
|
||||
</example>
|
||||
|
||||
@@ -76,8 +78,6 @@ Time Remaining: {remain endtime=$obj->endtime}
|
||||
<title>Eviter la mise en cache d'une portion du template</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
index.php:
|
||||
|
||||
<?php
|
||||
require('Smarty.class.php');
|
||||
$smarty = new Smarty;
|
||||
@@ -90,10 +90,13 @@ $smarty->register_block('dynamic', 'smarty_block_dynamic', false);
|
||||
|
||||
$smarty->display('index.tpl');
|
||||
?>
|
||||
|
||||
|
||||
index.tpl:
|
||||
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
O<> index.tpl contient :
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
Page created: {"0"|date_format:"%D %H:%M:%S"}
|
||||
|
||||
{dynamic}
|
||||
@@ -108,10 +111,10 @@ Now is: {"0"|date_format:"%D %H:%M:%S"}
|
||||
</example>
|
||||
|
||||
<para>
|
||||
Lors du rechargement de la page, vous remarquerez que les deux dates sont diff<EFBFBD>rentes.
|
||||
L'une est "dynamique" et l'autre est "statique". Vous pouvez faire ce que vous voulez
|
||||
entre {dynamic}...{/dynamic} et <20>tre s<>rs que cela ne sera pas mis en cache comme le
|
||||
reste de la page.
|
||||
Lors du rechargement de la page, vous remarquerez que les deux dates sont
|
||||
diff<66>rentes. L'une est "dynamique" et l'autre est "statique". Vous pouvez
|
||||
faire ce que vous voulez entre {dynamic}...{/dynamic} et <20>tre s<>rs que
|
||||
cela ne sera pas mis en cache comme le reste de la page.
|
||||
</para>
|
||||
|
||||
</sect1>
|
||||
|
@@ -1,19 +1,21 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
||||
<!-- EN-Revision: 1.2 Maintainer: didou Status: ready -->
|
||||
<sect1 id="caching.multiple.caches">
|
||||
<title>Caches multiples pour une seule page</title>
|
||||
<para>
|
||||
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')
|
||||
puisse avoir plusieurs r<>sultats, en fonction de certaines conditions, et que
|
||||
aux fonctions display() ou fetch(). Imaginons qu'un appel a
|
||||
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
|
||||
pouvez faire cela en passant un identifiant de cache (cache_id) en
|
||||
deuxi<78>me param<61>tre a l'appel de fonction.
|
||||
</para>
|
||||
<example>
|
||||
<title>Passage d'un cache_id a display()</title>
|
||||
<programlisting>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
require('Smarty.class.php');
|
||||
$smarty = new Smarty;
|
||||
|
||||
@@ -21,7 +23,9 @@ $smarty->caching = true;
|
||||
|
||||
$my_cache_id = $_GET['article_id'];
|
||||
|
||||
$smarty->display('index.tpl',$my_cache_id);</programlisting>
|
||||
$smarty->display('index.tpl',$my_cache_id);
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
<para>
|
||||
Nous passons ci-dessus la variable $my_cache_id a display() comme
|
||||
@@ -50,11 +54,12 @@ $smarty->display('index.tpl',$my_cache_id);</programlisting>
|
||||
<para>
|
||||
Assurez-vous de bien passer le m<>me identifiant aux fonctions
|
||||
<link linkend="api.is.cached">is_cached()</link> et
|
||||
<link linkend="api.clear.cache">clear_cache()</link>.
|
||||
</para>
|
||||
<example>
|
||||
<title>passer un cache_id a is_cached()</title>
|
||||
<programlisting>
|
||||
<link linkend="api.clear.cache">clear_cache()</link>.
|
||||
</para>
|
||||
<example>
|
||||
<title>passer un cache_id a is_cached()</title>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
require('Smarty.class.php');
|
||||
$smarty = new Smarty;
|
||||
|
||||
@@ -68,16 +73,19 @@ if(!$smarty->is_cached('index.tpl',$my_cache_id)) {
|
||||
$smarty->assign($contents);
|
||||
}
|
||||
|
||||
$smarty->display('index.tpl',$my_cache_id);</programlisting>
|
||||
</example>
|
||||
<para>
|
||||
Vous pouvez effacer tous les fichiers de cache pour un identifiant
|
||||
de cache particulier en passant null en tant que premier param<61>tre
|
||||
a clear_cache().
|
||||
</para>
|
||||
<example>
|
||||
<title>effacement de tous les fichiers de cache pour un identifiant de cache particulier</title>
|
||||
<programlisting>
|
||||
$smarty->display('index.tpl',$my_cache_id);
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
<para>
|
||||
Vous pouvez effacer tous les fichiers de cache pour un identifiant
|
||||
de cache particulier en passant null en tant que premier param<61>tre
|
||||
a clear_cache().
|
||||
</para>
|
||||
<example>
|
||||
<title>effacement de tous les fichiers de cache pour un identifiant de cache particulier</title>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
require('Smarty.class.php');
|
||||
$smarty = new Smarty;
|
||||
|
||||
@@ -86,30 +94,32 @@ $smarty->caching = true;
|
||||
// efface tous les fichiers de cache avec "sports" comme identifiant
|
||||
$smarty->clear_cache(null,"sports");
|
||||
|
||||
$smarty->display('index.tpl',"sports");</programlisting>
|
||||
</example>
|
||||
<para>
|
||||
De cette mani<6E>re vous pouvez "grouper" vos fichiers de cache en leur
|
||||
donnant le m<>me identifiant.
|
||||
</para>
|
||||
</sect1>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
$smarty->display('index.tpl',"sports");
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
<para>
|
||||
De cette mani<6E>re vous pouvez "grouper" vos fichiers de cache en leur
|
||||
donnant le m<>me identifiant.
|
||||
</para>
|
||||
</sect1>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
Reference in New Issue
Block a user