fix ws and translate a bit..

This commit is contained in:
tony2001
2004-05-28 20:49:29 +00:00
parent e18e97b872
commit 7210e41c82
6 changed files with 209 additions and 197 deletions

View File

@@ -1,17 +1,13 @@
<?xml version="1.0" encoding="iso-8859-1"?> <?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision$ --> <!-- $Revision$ -->
<chapter id="advanced.features"> <chapter id="advanced.features">
<title>Advanced Features</title> <title>Advanced Features</title>
&programmers.advanced-features.advanced-features-objects; &programmers.advanced-features.advanced-features-objects;
&programmers.advanced-features.advanced-features-prefilters; &programmers.advanced-features.advanced-features-prefilters;
&programmers.advanced-features.advanced-features-postfilters;
&programmers.advanced-features.advanced-features-postfilters; &programmers.advanced-features.advanced-features-outputfilters;
&programmers.advanced-features.section-template-cache-handler-func;
&programmers.advanced-features.advanced-features-outputfilters; &programmers.advanced-features.template-resources;
&programmers.advanced-features.section-template-cache-handler-func;
&programmers.advanced-features.template-resources;
</chapter> </chapter>
<!-- 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,44 +1,64 @@
<?xml version="1.0" encoding="iso-8859-1"?> <?xml version="1.0" encoding="windows-1251"?>
<!-- $Revision$ --> <!-- $Revision$ -->
<chapter id="api.functions"> <chapter id="api.functions">
<title>Methods</title> <title>Methods</title>
&programmers.api-functions.api-append; &programmers.api-functions.api-append;
&programmers.api-functions.api-append-by-ref; &programmers.api-functions.api-append-by-ref;
&programmers.api-functions.api-assign; &programmers.api-functions.api-assign;
&programmers.api-functions.api-assign-by-ref; &programmers.api-functions.api-assign-by-ref;
&programmers.api-functions.api-clear-all-assign; &programmers.api-functions.api-clear-all-assign;
&programmers.api-functions.api-clear-all-cache; &programmers.api-functions.api-clear-all-cache;
&programmers.api-functions.api-clear-assign; &programmers.api-functions.api-clear-assign;
&programmers.api-functions.api-clear-cache; &programmers.api-functions.api-clear-cache;
&programmers.api-functions.api-clear-compiled-tpl; &programmers.api-functions.api-clear-compiled-tpl;
&programmers.api-functions.api-clear-config; &programmers.api-functions.api-clear-config;
&programmers.api-functions.api-config-load; &programmers.api-functions.api-config-load;
&programmers.api-functions.api-display; &programmers.api-functions.api-display;
&programmers.api-functions.api-fetch; &programmers.api-functions.api-fetch;
&programmers.api-functions.api-get-config-vars; &programmers.api-functions.api-get-config-vars;
&programmers.api-functions.api-get-registered-object; &programmers.api-functions.api-get-registered-object;
&programmers.api-functions.api-get-template-vars; &programmers.api-functions.api-get-template-vars;
&programmers.api-functions.api-is-cached; &programmers.api-functions.api-is-cached;
&programmers.api-functions.api-load-filter; &programmers.api-functions.api-load-filter;
&programmers.api-functions.api-register-block; &programmers.api-functions.api-register-block;
&programmers.api-functions.api-register-compiler-function; &programmers.api-functions.api-register-compiler-function;
&programmers.api-functions.api-register-function; &programmers.api-functions.api-register-function;
&programmers.api-functions.api-register-modifier; &programmers.api-functions.api-register-modifier;
&programmers.api-functions.api-register-object; &programmers.api-functions.api-register-object;
&programmers.api-functions.api-register-outputfilter; &programmers.api-functions.api-register-outputfilter;
&programmers.api-functions.api-register-postfilter; &programmers.api-functions.api-register-postfilter;
&programmers.api-functions.api-register-prefilter; &programmers.api-functions.api-register-prefilter;
&programmers.api-functions.api-register-resource; &programmers.api-functions.api-register-resource;
&programmers.api-functions.api-trigger-error; &programmers.api-functions.api-trigger-error;
&programmers.api-functions.api-template-exists; &programmers.api-functions.api-template-exists;
&programmers.api-functions.api-unregister-block; &programmers.api-functions.api-unregister-block;
&programmers.api-functions.api-unregister-compiler-function; &programmers.api-functions.api-unregister-compiler-function;
&programmers.api-functions.api-unregister-function; &programmers.api-functions.api-unregister-function;
&programmers.api-functions.api-unregister-modifier; &programmers.api-functions.api-unregister-modifier;
&programmers.api-functions.api-unregister-object; &programmers.api-functions.api-unregister-object;
&programmers.api-functions.api-unregister-outputfilter; &programmers.api-functions.api-unregister-outputfilter;
&programmers.api-functions.api-unregister-postfilter; &programmers.api-functions.api-unregister-postfilter;
&programmers.api-functions.api-unregister-prefilter; &programmers.api-functions.api-unregister-prefilter;
&programmers.api-functions.api-unregister-resource; &programmers.api-functions.api-unregister-resource;
</chapter> </chapter>
<!-- 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
-->

View File

@@ -1,42 +1,41 @@
<?xml version="1.0" encoding="iso-8859-1"?> <?xml version="1.0" encoding="windows-1251"?>
<!-- $Revision$ --> <!-- $Revision$ -->
<chapter id="api.variables"> <chapter id="api.variables">
<title>Variables</title> <title><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></title>
&programmers.api-variables.variable-template-dir;
&programmers.api-variables.variable-template-dir; &programmers.api-variables.variable-compile-dir;
&programmers.api-variables.variable-compile-dir; &programmers.api-variables.variable-config-dir;
&programmers.api-variables.variable-config-dir; &programmers.api-variables.variable-plugins-dir;
&programmers.api-variables.variable-plugins-dir; &programmers.api-variables.variable-debugging;
&programmers.api-variables.variable-debugging; &programmers.api-variables.variable-debug-tpl;
&programmers.api-variables.variable-debug-tpl; &programmers.api-variables.variable-debugging-ctrl;
&programmers.api-variables.variable-debugging-ctrl; &programmers.api-variables.variable-global-assign;
&programmers.api-variables.variable-global-assign; &programmers.api-variables.variable-undefined;
&programmers.api-variables.variable-undefined; &programmers.api-variables.variable-autoload-filters;
&programmers.api-variables.variable-autoload-filters; &programmers.api-variables.variable-compile-check;
&programmers.api-variables.variable-compile-check; &programmers.api-variables.variable-force-compile;
&programmers.api-variables.variable-force-compile; &programmers.api-variables.variable-caching;
&programmers.api-variables.variable-caching; &programmers.api-variables.variable-cache-dir;
&programmers.api-variables.variable-cache-dir; &programmers.api-variables.variable-cache-lifetime;
&programmers.api-variables.variable-cache-lifetime; &programmers.api-variables.variable-cache-handler-func;
&programmers.api-variables.variable-cache-handler-func; &programmers.api-variables.variable-cache-modified-check;
&programmers.api-variables.variable-cache-modified-check; &programmers.api-variables.variable-config-overwrite;
&programmers.api-variables.variable-config-overwrite; &programmers.api-variables.variable-config-booleanize;
&programmers.api-variables.variable-config-booleanize; &programmers.api-variables.variable-config-read-hidden;
&programmers.api-variables.variable-config-read-hidden; &programmers.api-variables.variable-config-fix-newlines;
&programmers.api-variables.variable-config-fix-newlines; &programmers.api-variables.variable-default-template-handler-func;
&programmers.api-variables.variable-default-template-handler-func; &programmers.api-variables.variable-php-handling;
&programmers.api-variables.variable-php-handling; &programmers.api-variables.variable-security;
&programmers.api-variables.variable-security; &programmers.api-variables.variable-secure-dir;
&programmers.api-variables.variable-secure-dir; &programmers.api-variables.variable-security-settings;
&programmers.api-variables.variable-security-settings; &programmers.api-variables.variable-trusted-dir;
&programmers.api-variables.variable-trusted-dir; &programmers.api-variables.variable-left-delimiter;
&programmers.api-variables.variable-left-delimiter; &programmers.api-variables.variable-right-delimiter;
&programmers.api-variables.variable-right-delimiter; &programmers.api-variables.variable-compiler-class;
&programmers.api-variables.variable-compiler-class; &programmers.api-variables.variable-request-vars-order;
&programmers.api-variables.variable-request-vars-order; &programmers.api-variables.variable-compile-id;
&programmers.api-variables.variable-compile-id; &programmers.api-variables.variable-use-sub-dirs;
&programmers.api-variables.variable-use-sub-dirs; &programmers.api-variables.variable-default-modifiers;
&programmers.api-variables.variable-default-modifiers;
</chapter> </chapter>
<!-- 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,28 +1,30 @@
<?xml version="1.0" encoding="iso-8859-1"?> <?xml version="1.0" encoding="windows-1251"?>
<!-- $Revision$ --> <!-- $Revision$ -->
<chapter id="caching"> <chapter id="caching">
<title>Caching</title> <title>Caching</title>
<para> <para>
Caching is used to speed up a call to <link Caching is used to speed up a call to
linkend="api.display">display()</link> or <link <link linkend="api.display">display()</link> or
linkend="api.fetch">fetch()</link> by saving its output to a file. If a <link linkend="api.fetch">fetch()</link> by saving its output to a file.
cached version of the call is available, that is displayed instead of If a cached version of the call is available, that is displayed instead of
regenerating the output. Caching can speed things up tremendously, regenerating the output. Caching can speed things up tremendously,
especially templates with longer computation times. Since the output of especially templates with longer computation times. Since the output of
display() or fetch() is cached, one cache file could conceivably be made up display() or fetch() is cached, one cache file could conceivably be made up
of several template files, config files, etc. of several template files, config files, etc.
</para> </para>
<para> <para>
Since templates are dynamic, it is important to be careful what you are Since templates are dynamic, it is important to be careful what you are
caching and for how long. For instance, if you are displaying the front page caching and for how long. For instance, if you are displaying the front page
of your website that does not change its content very often, it might work of your website that does not change its content very often, it might work
well to cache this page for an hour or more. On the other hand, if you are well to cache this page for an hour or more. On the other hand, if you are
displaying a page with a weather map containing new information by the displaying a page with a weather map containing new information by the
minute, it would not make sense to cache this page. minute, it would not make sense to cache this page.
</para> </para>
&programmers.caching.caching-setting-up;
&programmers.caching.caching-multiple-caches; &programmers.caching.caching-setting-up;
&programmers.caching.caching-groups; &programmers.caching.caching-multiple-caches;
&programmers.caching.caching-groups;
</chapter> </chapter>
<!-- 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,70 +1,61 @@
<?xml version="1.0" encoding="iso-8859-1"?> <?xml version="1.0" encoding="windows-1251"?>
<!-- $Revision$ --> <!-- $Revision$ -->
<chapter id="plugins"> <chapter id="plugins">
<title>Extending Smarty With Plugins</title> <title>Extending Smarty With Plugins</title>
<para>
Version 2.0 introduced the plugin architecture that is used
for almost all the customizable functionality of Smarty. This includes:
<itemizedlist spacing="compact">
<listitem><simpara>functions</simpara></listitem>
<listitem><simpara>modifiers</simpara></listitem>
<listitem><simpara>block functions</simpara></listitem>
<listitem><simpara>compiler functions</simpara></listitem>
<listitem><simpara>prefilters</simpara></listitem>
<listitem><simpara>postfilters</simpara></listitem>
<listitem><simpara>outputfilters</simpara></listitem>
<listitem><simpara>resources</simpara></listitem>
<listitem><simpara>inserts</simpara></listitem>
</itemizedlist>
With the exception of resources, backwards compatibility with the old
way of registering handler functions via register_* API is preserved. If
you did not use the API but instead modified the class variables
<literal>$custom_funcs</literal>, <literal>$custom_mods</literal>, and
other ones directly, then you will need to adjust your scripts to either
use the API or convert your custom functionality into plugins.
</para>
<sect1>
<title>How Plugins Work</title>
<para> <para>
Version 2.0 introduced the plugin architecture that is used Plugins are always loaded on demand. Only the specific modifiers,
for almost all the customizable functionality of Smarty. This includes: functions, resources, etc invoked in the templates scripts will be
<itemizedlist spacing="compact"> loaded. Moreover, each plugin is loaded only once, even if you have
<listitem><simpara>functions</simpara></listitem> several different instances of Smarty running within the same request.
<listitem><simpara>modifiers</simpara></listitem>
<listitem><simpara>block functions</simpara></listitem>
<listitem><simpara>compiler functions</simpara></listitem>
<listitem><simpara>prefilters</simpara></listitem>
<listitem><simpara>postfilters</simpara></listitem>
<listitem><simpara>outputfilters</simpara></listitem>
<listitem><simpara>resources</simpara></listitem>
<listitem><simpara>inserts</simpara></listitem>
</itemizedlist>
With the exception of resources, backwards compatibility with the old
way of registering handler functions via register_* API is preserved. If
you did not use the API but instead modified the class variables
<literal>$custom_funcs</literal>, <literal>$custom_mods</literal>, and
other ones directly, then you will need to adjust your scripts to either
use the API or convert your custom functionality into plugins.
</para> </para>
<para>
Pre/postfilters and output filters are a bit of a special case. Since
they are not mentioned in the templates, they must be registered or
loaded explicitly via API functions before the template is processed.
The order in which multiple filters of the same type are executed
depends on the order in which they are registered or loaded.
</para>
<para>
There is only one plugins directory (for performance reasons). To
install a plugin, simply place it in the directory and Smarty will use
it automatically.
</para>
</sect1>
<sect1> &programmers.plugins.plugins-naming-conventions;
<title>How Plugins Work</title> &programmers.plugins.plugins-writing;
<para> &programmers.plugins.plugins-functions;
Plugins are always loaded on demand. Only the specific modifiers, &programmers.plugins.plugins-modifiers;
functions, resources, etc invoked in the templates scripts will be &programmers.plugins.plugins-block-functions;
loaded. Moreover, each plugin is loaded only once, even if you have &programmers.plugins.plugins-compiler-functions;
several different instances of Smarty running within the same request. &programmers.plugins.plugins-prefilters-postfilters;
</para> &programmers.plugins.plugins-outputfilters;
<para> &programmers.plugins.plugins-resources;
Pre/postfilters and output filters are a bit of a special case. Since &programmers.plugins.plugins-inserts;
they are not mentioned in the templates, they must be registered or
loaded explicitly via API functions before the template is processed.
The order in which multiple filters of the same type are executed
depends on the order in which they are registered or loaded.
</para>
<para>
There is only one plugins directory (for performance reasons). To
install a plugin, simply place it in the directory and Smarty will use
it automatically.
</para>
</sect1>
&programmers.plugins.plugins-naming-conventions;
&programmers.plugins.plugins-writing;
&programmers.plugins.plugins-functions;
&programmers.plugins.plugins-modifiers;
&programmers.plugins.plugins-block-functions;
&programmers.plugins.plugins-compiler-functions;
&programmers.plugins.plugins-prefilters-postfilters;
&programmers.plugins.plugins-outputfilters;
&programmers.plugins.plugins-resources;
&programmers.plugins.plugins-inserts;
</chapter> </chapter>
<!-- 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,26 +1,30 @@
<?xml version="1.0" encoding="iso-8859-1"?> <?xml version="1.0" encoding="windows-1251"?>
<!-- $Revision$ --> <!-- $Revision$ -->
<chapter id="smarty.constants"> <chapter id="smarty.constants">
<title>Constants</title> <title><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></title>
<para></para> <para></para>
<sect1 id="constant.smarty.dir">
<title>SMARTY_DIR</title>
<para>
<20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
<20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
</para>
<example>
<title>SMARTY_DIR</title>
<programlisting>
<![CDATA[
<sect1 id="constant.smarty.dir">
<title>SMARTY_DIR</title>
<para>
This should be the full system path to the location of the Smarty
class files. If this is not defined, then Smarty will attempt to
determine the appropriate value automatically. If defined, the path
must end with a slash.
</para>
<example>
<title>SMARTY_DIR</title>
<programlisting>
// set path to Smarty directory // set path to Smarty directory
define("SMARTY_DIR","/usr/local/lib/php/Smarty/"); define("SMARTY_DIR","/usr/local/lib/php/Smarty/");
require_once(SMARTY_DIR."Smarty.class.php");
require_once(SMARTY_DIR."Smarty.class.php");</programlisting> ]]>
</example> </programlisting>
</sect1> </example>
</sect1>
</chapter> </chapter>
<!-- Keep this comment at the end of the file <!-- Keep this comment at the end of the file
Local variables: Local variables: