mirror of
https://github.com/smarty-php/smarty.git
synced 2025-10-31 20:31:41 +01:00
46 lines
1.4 KiB
XML
46 lines
1.4 KiB
XML
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||
|
|
<!-- $Revision$ -->
|
||
|
|
<sect1 id="plugins.writing">
|
||
|
|
<title>Writing Plugins</title>
|
||
|
|
<para>
|
||
|
|
Plugins can be either loaded by Smarty automatically from the
|
||
|
|
filesystem or they can be registered at runtime via one of the
|
||
|
|
register_* API functions. They can also be unregistered by using
|
||
|
|
unregister_* API functions.
|
||
|
|
</para>
|
||
|
|
<para>
|
||
|
|
For the plugins that are registered at runtime, the name of the plugin
|
||
|
|
function(s) does not have to follow the naming convention.
|
||
|
|
</para>
|
||
|
|
<para>
|
||
|
|
If a plugin depends on some functionality provided by another plugin
|
||
|
|
(as is the case with some plugins bundled with Smarty), then the proper
|
||
|
|
way to load the needed plugin is this:
|
||
|
|
</para>
|
||
|
|
<programlisting>
|
||
|
|
require_once SMARTY_DIR . 'plugins/function.html_options.php';</programlisting>
|
||
|
|
<para>
|
||
|
|
As a general rule, Smarty object is always passed to the plugins as the last
|
||
|
|
parameter (except for modifiers).
|
||
|
|
</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
|
||
|
|
-->
|