mirror of
https://github.com/smarty-php/smarty.git
synced 2025-10-04 16:20:55 +02:00
81 lines
2.5 KiB
XML
81 lines
2.5 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision$ -->
|
|
<sect1 id="plugins.naming.conventions">
|
|
<title>Naming Conventions</title>
|
|
<para>
|
|
Plugin files and functions must follow a very specific naming
|
|
convention in order to be located by Smarty.
|
|
</para>
|
|
<para>
|
|
The plugin files must be named as follows:
|
|
<blockquote>
|
|
<para>
|
|
<filename>
|
|
<replaceable>type</replaceable>.<replaceable>name</replaceable>.php
|
|
</filename>
|
|
</para>
|
|
</blockquote>
|
|
</para>
|
|
<para>
|
|
Where <literal>type</literal> is one of these plugin types:
|
|
<itemizedlist spacing="compact">
|
|
<listitem><simpara>function</simpara></listitem>
|
|
<listitem><simpara>modifier</simpara></listitem>
|
|
<listitem><simpara>block</simpara></listitem>
|
|
<listitem><simpara>compiler</simpara></listitem>
|
|
<listitem><simpara>prefilter</simpara></listitem>
|
|
<listitem><simpara>postfilter</simpara></listitem>
|
|
<listitem><simpara>outputfilter</simpara></listitem>
|
|
<listitem><simpara>resource</simpara></listitem>
|
|
<listitem><simpara>insert</simpara></listitem>
|
|
</itemizedlist>
|
|
</para>
|
|
<para>
|
|
And <literal>name</literal> should be a valid identifier (letters,
|
|
numbers, and underscores only).
|
|
</para>
|
|
<para>
|
|
Some examples: <literal>function.html_select_date.php</literal>,
|
|
<literal>resource.db.php</literal>,
|
|
<literal>modifier.spacify.php</literal>.
|
|
</para>
|
|
<para>
|
|
The plugin functions inside the plugin files must be named as follows:
|
|
<blockquote>
|
|
<para>
|
|
<function>smarty_<replaceable>type</replaceable>_<replaceable>name</replaceable></function>
|
|
</para>
|
|
</blockquote>
|
|
</para>
|
|
<para>
|
|
The meanings of <literal>type</literal> and <literal>name</literal> are
|
|
the same as before.
|
|
</para>
|
|
<para>
|
|
Smarty will output appropriate error messages if the plugin file it
|
|
needs is not found, or if the file or the plugin function are named
|
|
improperly.
|
|
</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
|
|
-->
|