mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 10:24:26 +02:00
*** empty log message ***
This commit is contained in:
29
docs.sgml
29
docs.sgml
@@ -6250,7 +6250,7 @@ s m o k e r s a r e p. . .
|
|||||||
unregister_* API functions.
|
unregister_* API functions.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
For the plugins are registered at runtime the name of the plugin
|
For the plugins that are registered at runtime, the name of the plugin
|
||||||
function does not have to follow the naming convention.
|
function does not have to follow the naming convention.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
@@ -6260,8 +6260,6 @@ s m o k e r s a r e p. . .
|
|||||||
<programlisting>
|
<programlisting>
|
||||||
require_once SMARTY_DIR . 'plugins/function.html_options.php';
|
require_once SMARTY_DIR . 'plugins/function.html_options.php';
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
As a rule, Smarty object is always passed to the plugins as the last
|
As a rule, Smarty object is always passed to the plugins as the last
|
||||||
parameter.
|
parameter.
|
||||||
</para>
|
</para>
|
||||||
@@ -6298,9 +6296,10 @@ require_once SMARTY_DIR . 'plugins/function.html_options.php';
|
|||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
</para>
|
</para>
|
||||||
<example>
|
<para>
|
||||||
<title>function plugin with output</title>
|
<example>
|
||||||
<programlisting>
|
<title>function plugin with output</title>
|
||||||
|
<programlisting>
|
||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Smarty plugin
|
* Smarty plugin
|
||||||
@@ -6323,9 +6322,19 @@ function smarty_function_eightball($params, &$smarty)
|
|||||||
$result = array_rand($answers);
|
$result = array_rand($answers);
|
||||||
echo $answers[$result];
|
echo $answers[$result];
|
||||||
}
|
}
|
||||||
?&rt;
|
?>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</example>
|
</example>
|
||||||
|
which can be used in the template as:
|
||||||
|
<informalexample>
|
||||||
|
<programlisting>
|
||||||
|
Question:
|
||||||
|
Answer: {eightball}.
|
||||||
|
</programlisting>
|
||||||
|
</informalexample>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
<example>
|
<example>
|
||||||
<title>function plugin without output</title>
|
<title>function plugin without output</title>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
@@ -6355,10 +6364,12 @@ function smarty_function_assign($params, &$smarty)
|
|||||||
|
|
||||||
$smarty->assign($var, $value);
|
$smarty->assign($var, $value);
|
||||||
}
|
}
|
||||||
?&rt;
|
?>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</example>
|
</example>
|
||||||
</sect2>
|
</para>
|
||||||
|
</sect2>
|
||||||
|
|
||||||
<sect2 id="section.plugins.modifiers"><title>modifiers</title>
|
<sect2 id="section.plugins.modifiers"><title>modifiers</title>
|
||||||
<para>
|
<para>
|
||||||
</para>
|
</para>
|
||||||
|
Reference in New Issue
Block a user