mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 10:54:27 +02:00
sync with EN
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.2 Maintainer: yannick Status: ready -->
|
||||
<!-- EN-Revision: 1.3 Maintainer: yannick Status: ready -->
|
||||
|
||||
<sect1 id="advanced.features.prefilters">
|
||||
<title>Filtres de pr<70>-compilation</title>
|
||||
<para>
|
||||
@@ -12,9 +13,9 @@
|
||||
<para>
|
||||
Les filtre de pr<70>-compilations peuvent <20>tre soit
|
||||
<link linkend="api.register.prefilter">d<EFBFBD>clar<EFBFBD>s</link>, soit charg<72>s
|
||||
<20> partir des r<EFBFBD>pertoires de plugins en utilisant la fonction
|
||||
<link linkend="api.load.filter">load_filter()</link> ou en r<>glant
|
||||
la variable
|
||||
<20> partir des <link linkend="variable.plugins.dir">r<EFBFBD>pertoires de plugins</link>
|
||||
en utilisant la fonction <link linkend="api.load.filter">load_filter()</link> ou
|
||||
en r<>glant la variable
|
||||
<link linkend="variable.autoload.filters">$autoload_filters</link>.
|
||||
</para>
|
||||
<para>
|
||||
@@ -23,26 +24,33 @@
|
||||
</para>
|
||||
<example>
|
||||
<title>Utilisation un filtre de pr<70>-compilation de template</title>
|
||||
<para>
|
||||
Ceci va effacer tous les commentaires de la source du template.
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
<?php
|
||||
// mettre ceci dans votre application
|
||||
function remove_dw_comments($tpl_source, &$smarty)
|
||||
{
|
||||
return preg_replace("/<!--#.*-->/U","",$tpl_source);
|
||||
return preg_replace("/<!--#.*-->/U",'',$tpl_source);
|
||||
}
|
||||
|
||||
// enregistrer le filtre de pr<70>-compilation
|
||||
$smarty->register_prefilter("remove_dw_comments");
|
||||
$smarty->display("index.tpl");
|
||||
$smarty->register_prefilter('remove_dw_comments');
|
||||
$smarty->display('index.tpl');
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Ceci effacera tous les commentaires de la source du template.
|
||||
</para>
|
||||
</example>
|
||||
<para>
|
||||
Voir aussi
|
||||
<link linkend="api.register.prefilter">register_prefilter()</link>,
|
||||
les <link linkend="advanced.features.postfilters">post-filtres</link> et
|
||||
<link linkend="api.load.filter">load_filter()</link>.
|
||||
</para>
|
||||
</sect1>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
@@ -62,4 +70,4 @@ 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