cvs: smarty /docs/en/programmers/api-functions api-append-by-ref.xml api-append.xml api-assign-by-ref.xml api-assign.xml api-clear-all-assign.xml api-clear-all-cache.xml api-clear-assign.xml api-clear-cache.xml api-clear-compiled-tpl.xml api-clear-config.xml api-config-load.xml api-display.xml api-fetch.xml api-get-config-vars.xml api-get-registered-object.xml api-get-template-vars.xml api-is-cached.xml api-load-filter.xml api-register-block.xml api-register-compiler-function.xml api-register-function.xml api-register-modifier.xml api-register-object.xml api-register-outputfilter.xml api-register-postfilter.xml api-register-prefilter.xml api-register-resource.xml api-template-exists.xml api-trigger-error.xml api-unregister-block.xml api-unregister-compiler-function.xml api-unregister-function.xml api-unregister-modifier.xml api-unregister-object.xml api-unregister-outputfilter.xml api-unregister-postfilter.xml api-unregister-prefilter.xml api-unregister-resource.xml!
[email protected] ("Peter 'Mash' Morgan") Tue, 26 Sep 2006 23:29:02 -0000
| Newsgroups | php.smarty.cvs |
|---|---|
| Message-ID | <cvspete_morgan1159313342@cvsserver> |
pete_morgan Tue Sep 26 23:29:02 2006 UTC
Modified files:
/smarty/docs/en/programmers/api-functions api-append-by-ref.xml
api-append.xml
api-assign-by-ref.xml
api-assign.xml
api-clear-all-assign.xml
api-clear-all-cache.xml
api-clear-assign.xml
api-clear-cache.xml
api-clear-compiled-tpl.xml
api-clear-config.xml
api-config-load.xml
api-display.xml
api-fetch.xml
api-get-config-vars.xml
api-get-registered-object.xml
api-get-template-vars.xml
api-is-cached.xml
api-load-filter.xml
api-register-block.xml
api-register-compiler-function.xml
api-register-function.xml
api-register-modifier.xml
api-register-object.xml
api-register-outputfilter.xml
api-register-postfilter.xml
api-register-prefilter.xml
api-register-resource.xml
api-template-exists.xml
api-trigger-error.xml
api-unregister-block.xml
api-unregister-compiler-function.xml
api-unregister-function.xml
api-unregister-modifier.xml
api-unregister-object.xml
api-unregister-outputfilter.xml
api-unregister-postfilter.xml
api-unregister-prefilter.xml
api-unregister-resource.xml
Log:
Tidy up formatting and examples
pete_morgan-20060926232902.txt
(text/plain, 81.1 KB)
http://cvs.php.net/viewvc.cgi/smarty/docs/en/programmers/api-functions/api-append-by-ref.xml?r1=1.5&r2=1.6&diff_format=u
Index: smarty/docs/en/programmers/api-functions/api-append-by-ref.xml
diff -u smarty/docs/en/programmers/api-functions/api-append-by-ref.xml:1.5 smarty/docs/en/programmers/api-functions/api-append-by-ref.xml:1.6
--- smarty/docs/en/programmers/api-functions/api-append-by-ref.xml:1.5 Fri May 27 16:25:02 2005
+++ smarty/docs/en/programmers/api-functions/api-append-by-ref.xml Tue Sep 26 23:29:02 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
<refentry id="api.append.by.ref">
<refnamediv>
<refname>append_by_ref()</refname>
@@ -15,13 +15,15 @@
</methodsynopsis>
<para>
This is used to
- <link linkend="api.append">append</link> values to the templates by reference.
+ <link linkend="api.append"><varname>append()</varname></link> values
+ to the templates by reference.
If you append a variable by reference then change its
value, the appended value sees the change as well. For
<link linkend="advanced.features.objects">objects</link>,
- append_by_ref() also avoids an in-memory copy of the appended object.
+ <varname>append_by_ref()</varname> also avoids an in-memory copy of the
+ appended object.
See the PHP manual on variable referencing for an in-depth
- explanation. If you pass the optional third parameter of true,
+ explanation. If you pass the optional third parameter of &true;,
the value will be merged with the current array instead of appended.
</para>
¬e.parameter.merge;
@@ -38,8 +40,11 @@
</programlisting>
</example>
<para>
- See also <link linkend="api.append">append()</link> and
- <link linkend="api.assign">assign()</link>.
+ See also
+ <link linkend="api.append"><varname>append()</varname></link>,
+ <link linkend="api.assign"><varname>assign()</varname></link>
+ and
+ <link linkend="api.get.template.vars"><varname>get_template_vars()</varname></link>.
</para>
</refsect1>
http://cvs.php.net/viewvc.cgi/smarty/docs/en/programmers/api-functions/api-append.xml?r1=1.5&r2=1.6&diff_format=u
Index: smarty/docs/en/programmers/api-functions/api-append.xml
diff -u smarty/docs/en/programmers/api-functions/api-append.xml:1.5 smarty/docs/en/programmers/api-functions/api-append.xml:1.6
--- smarty/docs/en/programmers/api-functions/api-append.xml:1.5 Fri May 27 16:25:02 2005
+++ smarty/docs/en/programmers/api-functions/api-append.xml Tue Sep 26 23:29:02 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
<refentry id="api.append">
<refnamediv>
<refname>append()</refname>
@@ -22,7 +22,7 @@
to a string value, it is converted to an array value and then
appended to. You can explicitly pass name/value pairs, or associative
arrays containing the name/value pairs. If you pass the optional third
- parameter of true, the value will be merged with the current array
+ parameter of &true;, the value will be merged with the current array
instead of appended.
</para>
¬e.parameter.merge;
@@ -31,9 +31,16 @@
<programlisting role="php">
<![CDATA[
<?php
-// passing name/value pairs
-$smarty->append("Name", "Fred");
-$smarty->append("Address", $address);
+// This is effectively the same as assign()
+$smarty->append('foo', 'Fred');
+// After this line, foo will now be seen as an array in the template
+$smarty->append('foo', 'Albert');
+
+$array = array(1 => 'one', 2 => 'two');
+$smarty->append('X', $array);
+$array2 = array(3 => 'three', 4 => 'four');
+// The following line will add a second element to the X array
+$smarty->append('X', $array2);
// passing an associative array
$smarty->append(array('city' => 'Lincoln', 'state' => 'Nebraska'));
@@ -42,10 +49,10 @@
</programlisting>
</example>
<para>See also
- <link linkend="api.append.by.ref">append_by_ref()</link>,
- <link linkend="api.assign">assign()</link>
+ <link linkend="api.append.by.ref"><varname>append_by_ref()</varname></link>,
+ <link linkend="api.assign"><varname>assign()</varname></link>
and
- <link linkend="api.get.template.vars">get_template_vars()</link>
+ <link linkend="api.get.template.vars"><varname>get_template_vars()</varname></link>
</para>
</refsect1>
</refentry>
http://cvs.php.net/viewvc.cgi/smarty/docs/en/programmers/api-functions/api-assign-by-ref.xml?r1=1.5&r2=1.6&diff_format=u
Index: smarty/docs/en/programmers/api-functions/api-assign-by-ref.xml
diff -u smarty/docs/en/programmers/api-functions/api-assign-by-ref.xml:1.5 smarty/docs/en/programmers/api-functions/api-assign-by-ref.xml:1.6
--- smarty/docs/en/programmers/api-functions/api-assign-by-ref.xml:1.5 Fri May 27 16:25:02 2005
+++ smarty/docs/en/programmers/api-functions/api-assign-by-ref.xml Tue Sep 26 23:29:02 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
<refentry id="api.assign.by.ref">
<refnamediv>
<refname>assign_by_ref()</refname>
@@ -13,7 +13,7 @@
<methodparam><type>mixed</type><parameter>var</parameter></methodparam>
</methodsynopsis>
<para>
- This is used to <link linkend="api.assign">assign()</link>
+ This is used to <link linkend="api.assign"><varname>assign()</varname></link>
values to the templates by reference instead of
making a copy. See the PHP manual on variable referencing for an explanation.
</para>
@@ -24,7 +24,8 @@
If you assign a variable by reference then change its
value, the assigned value sees the change as well. For
<link linkend="advanced.features.objects">objects</link>,
- assign_by_ref() also avoids an in-memory copy of the assigned object.
+ <varname>assign_by_ref()</varname> also avoids an in-memory copy of the
+ assigned object.
See the PHP manual on variable referencing for an in-depth
explanation.
</para>
@@ -42,10 +43,13 @@
</programlisting>
</example>
<para>
- See also <link linkend="api.assign">assign()</link>,
- <link linkend="api.clear.all.assign">clear_all_assign()</link>,
- <link linkend="api.append">append()</link>
- and <link linkend="language.function.assign">{assign}</link>
+ See also
+ <link linkend="api.assign"><varname>assign()</varname></link>,
+ <link linkend="api.clear.all.assign"><varname>clear_all_assign()</varname></link>,
+ <link linkend="api.append"><varname>append()</varname></link>,
+ <link linkend="language.function.assign"><varname>{assign}</varname></link>
+ and
+ <link linkend="api.get.template.vars"><varname>get_template_vars()</varname></link>.
</para>
</refsect1>
http://cvs.php.net/viewvc.cgi/smarty/docs/en/programmers/api-functions/api-assign.xml?r1=1.6&r2=1.7&diff_format=u
Index: smarty/docs/en/programmers/api-functions/api-assign.xml
diff -u smarty/docs/en/programmers/api-functions/api-assign.xml:1.6 smarty/docs/en/programmers/api-functions/api-assign.xml:1.7
--- smarty/docs/en/programmers/api-functions/api-assign.xml:1.6 Sat Sep 10 12:24:50 2005
+++ smarty/docs/en/programmers/api-functions/api-assign.xml Tue Sep 26 23:29:02 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<refentry id="api.assign">
<refnamediv>
<refname>assign()</refname>
@@ -32,6 +32,10 @@
// passing an associative array
$smarty->assign(array('city' => 'Lincoln', 'state' => 'Nebraska'));
+// passing an array
+$myArray = array('no' => 10, 'label' => 'Peanuts');
+$smarty->assign('foo',$myArray);
+
// passing a row from a database (eg adodb)
$sql = 'select id, name, email from contacts where contact ='.$id;
$smarty->assign('contact', $db->getRow($sql));
@@ -39,7 +43,7 @@
]]>
</programlisting>
<para>
- Access these in the template with
+ These are accessed in the template with
</para>
<programlisting>
<![CDATA[
@@ -49,24 +53,26 @@
{$city}
{$state}
+{$foo.no}, {$foo.label}
{$contact.id}, {$contact.name},{$contact.email}
]]>
</programlisting>
</example>
<para>
- For more complex array assignments see
- <link linkend="language.function.foreach">{foreach}</link>
+ To access more complex array assignments see
+ <link linkend="language.function.foreach"><varname>{foreach}</varname></link>
and
- <link linkend="language.function.section">{section}</link>
+ <link linkend="language.function.section"><varname>{section}</varname></link>
</para>
<para>
- See also <link linkend="api.assign.by.ref">assign_by_ref()</link>,
- <link linkend="api.get.template.vars">get_template_vars()</link>,
- <link linkend="api.clear.assign">clear_assign()</link>,
- <link linkend="api.append">append()</link>
+ See also
+ <link linkend="api.assign.by.ref"><varname>assign_by_ref()</varname></link>,
+ <link linkend="api.get.template.vars"><varname>get_template_vars()</varname></link>,
+ <link linkend="api.clear.assign"><varname>clear_assign()</varname></link>,
+ <link linkend="api.append"><varname>append()</varname></link>
and
- <link linkend="language.function.assign">{assign}</link>
+ <link linkend="language.function.assign"><varname>{assign}</varname></link>
</para>
</refsect1>
</refentry>
http://cvs.php.net/viewvc.cgi/smarty/docs/en/programmers/api-functions/api-clear-all-assign.xml?r1=1.4&r2=1.5&diff_format=u
Index: smarty/docs/en/programmers/api-functions/api-clear-all-assign.xml
diff -u smarty/docs/en/programmers/api-functions/api-clear-all-assign.xml:1.4 smarty/docs/en/programmers/api-functions/api-clear-all-assign.xml:1.5
--- smarty/docs/en/programmers/api-functions/api-clear-all-assign.xml:1.4 Fri May 27 16:25:02 2005
+++ smarty/docs/en/programmers/api-functions/api-clear-all-assign.xml Tue Sep 26 23:29:02 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<refentry id="api.clear.all.assign">
<refnamediv>
<refname>clear_all_assign()</refname>
@@ -35,10 +35,11 @@
</example>
<para>
See also
- <link linkend="api.clear.assign">clear_assign()</link>,
- <link linkend="api.clear.config">clear_config()</link>,
- <link linkend="api.assign">assign()</link>
- and <link linkend="api.append">append()</link>
+ <link linkend="api.clear.assign"><varname>clear_assign()</varname></link>,
+ <link linkend="api.clear.config"><varname>clear_config()</varname></link>,
+ <link linkend="api.get.template.vars"><varname>get_template_vars()</varname></link>,
+ <link linkend="api.assign"><varname>assign()</varname></link>
+ and <link linkend="api.append"><varname>append()</varname></link>
</para>
</refsect1>
</refentry>
http://cvs.php.net/viewvc.cgi/smarty/docs/en/programmers/api-functions/api-clear-all-cache.xml?r1=1.4&r2=1.5&diff_format=u
Index: smarty/docs/en/programmers/api-functions/api-clear-all-cache.xml
diff -u smarty/docs/en/programmers/api-functions/api-clear-all-cache.xml:1.4 smarty/docs/en/programmers/api-functions/api-clear-all-cache.xml:1.5
--- smarty/docs/en/programmers/api-functions/api-clear-all-cache.xml:1.4 Fri May 27 16:25:02 2005
+++ smarty/docs/en/programmers/api-functions/api-clear-all-cache.xml Tue Sep 26 23:29:02 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<refentry id="api.clear.all.cache">
<refnamediv>
<refname>clear_all_cache()</refname>
@@ -23,16 +23,19 @@
<?php
// clear the entire cache
$smarty->clear_all_cache();
+
+// clears all files over one hour old
+$smarty->clear_all_cache(3600);
?>
]]>
</programlisting>
</example>
<para>
See also
- <link linkend="api.clear.cache">clear_cache()</link>,
- <link linkend="api.is.cached">is_cached()</link>
- and
- <link linkend="caching">caching</link>
+ <link linkend="api.clear.cache"><varname>clear_cache()</varname></link>,
+ <link linkend="api.is.cached"><varname>is_cached()</varname></link>
+ and the
+ <link linkend="caching">caching</link> page.
</para>
</refsect1>
</refentry>
http://cvs.php.net/viewvc.cgi/smarty/docs/en/programmers/api-functions/api-clear-assign.xml?r1=1.4&r2=1.5&diff_format=u
Index: smarty/docs/en/programmers/api-functions/api-clear-assign.xml
diff -u smarty/docs/en/programmers/api-functions/api-clear-assign.xml:1.4 smarty/docs/en/programmers/api-functions/api-clear-assign.xml:1.5
--- smarty/docs/en/programmers/api-functions/api-clear-assign.xml:1.4 Fri May 27 16:25:02 2005
+++ smarty/docs/en/programmers/api-functions/api-clear-assign.xml Tue Sep 26 23:29:02 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<refentry id="api.clear.assign">
<refnamediv>
<refname>clear_assign()</refname>
@@ -30,11 +30,11 @@
</example>
<para>
See also
- <link linkend="api.clear.all.assign">clear_all_assign()</link>,
- <link linkend="api.clear.config">clear_config()</link>,
- <link linkend="api.get.template.vars">get_template_vars()</link>,
- <link linkend="api.assign">assign()</link>
- and <link linkend="api.append">append()</link>
+ <link linkend="api.clear.all.assign"><varname>clear_all_assign()</varname></link>,
+ <link linkend="api.clear.config"><varname>clear_config()</varname></link>,
+ <link linkend="api.get.template.vars"><varname>get_template_vars()</varname></link>,
+ <link linkend="api.assign"><varname>assign()</varname></link>
+ and <link linkend="api.append"><varname>append()</varname></link>
</para>
</refsect1>
</refentry>
http://cvs.php.net/viewvc.cgi/smarty/docs/en/programmers/api-functions/api-clear-cache.xml?r1=1.4&r2=1.5&diff_format=u
Index: smarty/docs/en/programmers/api-functions/api-clear-cache.xml
diff -u smarty/docs/en/programmers/api-functions/api-clear-cache.xml:1.4 smarty/docs/en/programmers/api-functions/api-clear-cache.xml:1.5
--- smarty/docs/en/programmers/api-functions/api-clear-cache.xml:1.4 Fri May 27 16:25:02 2005
+++ smarty/docs/en/programmers/api-functions/api-clear-cache.xml Tue Sep 26 23:29:02 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<refentry id="api.clear.cache">
<refnamediv>
<refname>clear_cache()</refname>
@@ -15,21 +15,30 @@
</methodparam>
<methodparam choice="opt"><type>int</type><parameter>expire_time</parameter></methodparam>
</methodsynopsis>
- <para>
+
+ <itemizedlist>
+ <listitem><para>
If you have <link linkend="caching.multiple.caches">multiple caches</link>
for a template, you can clear a specific
cache by supplying the <parameter>cache_id</parameter> as the second
parameter.
+ </para></listitem>
+ <listitem><para>
You can also pass a
<link linkend="variable.compile.id"><parameter>$compile_id</parameter></link>
as a third parameter.
- You can <link linkend="caching.groups">"group"</link> templates
- together so they can be removed as a group. See the
+ You can <link linkend="caching.groups">group templates together</link>
+ so they can be removed as a group, see the
<link linkend="caching">caching section</link> for more
- information. As an optional fourth parameter, you can supply a
+ information.
+ </para></listitem>
+ <listitem><para>
+ As an optional fourth parameter, you can supply a
minimum age in seconds the cache file must be before it will
get cleared.
- </para>
+ </para></listitem>
+ </itemizedlist>
+
<example>
<title>clear_cache()</title>
<programlisting role="php">
@@ -39,16 +48,16 @@
$smarty->clear_cache('index.tpl');
// clear the cache for a particular cache id in an multiple-cache template
-$smarty->clear_cache('index.tpl', 'CACHEID');
+$smarty->clear_cache('index.tpl', 'MY_CACHE_ID');
?>
]]>
</programlisting>
</example>
<para>
See also
- <link linkend="api.clear.all.cache">clear_all_cache()</link>
+ <link linkend="api.clear.all.cache"><varname>clear_all_cache()</varname></link>
and
- <link linkend="caching">caching</link>.
+ <link linkend="caching"><varname>caching</varname></link> section.
</para>
</refsect1>
</refentry>
http://cvs.php.net/viewvc.cgi/smarty/docs/en/programmers/api-functions/api-clear-compiled-tpl.xml?r1=1.3&r2=1.4&diff_format=u
Index: smarty/docs/en/programmers/api-functions/api-clear-compiled-tpl.xml
diff -u smarty/docs/en/programmers/api-functions/api-clear-compiled-tpl.xml:1.3 smarty/docs/en/programmers/api-functions/api-clear-compiled-tpl.xml:1.4
--- smarty/docs/en/programmers/api-functions/api-clear-compiled-tpl.xml:1.3 Fri May 27 16:25:02 2005
+++ smarty/docs/en/programmers/api-functions/api-clear-compiled-tpl.xml Tue Sep 26 23:29:02 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<refentry id="api.clear.compiled.tpl">
<refnamediv>
<refname>clear_compiled_tpl()</refname>
@@ -17,12 +17,13 @@
<para>
This clears the compiled version of the specified template
resource, or all compiled template files if one is not specified.
- If you pass a <link linkend="variable.compile.id">$compile_id</link>
- only the compiled template for this
- specific <link linkend="variable.compile.id">$compile_id</link>
- is cleared. if you pass an exp_time, then only
- compiled templates older than exp_time seconds are cleared, by
- default all compiled templates are cleared regardless of their age.
+ If you pass a
+ <link linkend="variable.compile.id"><parameter>$compile_id</parameter></link>
+ only the compiled template for this specific
+ <link linkend="variable.compile.id"><parameter>$compile_id</parameter></link>
+ is cleared. If you pass an exp_time, then only
+ compiled templates older than <parameter>exp_time</parameter> seconds are
+ cleared, by default all compiled templates are cleared regardless of their age.
This function is for advanced use only, not normally needed.
</para>
<example>
@@ -31,7 +32,7 @@
<![CDATA[
<?php
// clear a specific template resource
-$smarty->clear_compiled_tpl("index.tpl");
+$smarty->clear_compiled_tpl('index.tpl');
// clear entire compile directory
$smarty->clear_compiled_tpl();
@@ -39,6 +40,9 @@
]]>
</programlisting>
</example>
+ <para>See also
+ <link linkend="api.clear.cache"><varname>clear_cache()</varname></link>.
+ </para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
http://cvs.php.net/viewvc.cgi/smarty/docs/en/programmers/api-functions/api-clear-config.xml?r1=1.4&r2=1.5&diff_format=u
Index: smarty/docs/en/programmers/api-functions/api-clear-config.xml
diff -u smarty/docs/en/programmers/api-functions/api-clear-config.xml:1.4 smarty/docs/en/programmers/api-functions/api-clear-config.xml:1.5
--- smarty/docs/en/programmers/api-functions/api-clear-config.xml:1.4 Fri May 27 16:25:02 2005
+++ smarty/docs/en/programmers/api-functions/api-clear-config.xml Tue Sep 26 23:29:02 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<refentry id="api.clear.config">
<refnamediv>
<refname>clear_config()</refname>
@@ -33,13 +33,13 @@
</example>
<para>
See also
- <link linkend="api.get.config.vars">get_config_vars()</link>,
- <link linkend="language.config.variables">config variables</link>,
- <link linkend="config.files">config files</link>,
- <link linkend="language.function.config.load">{config_load}</link>,
- <link linkend="api.config.load">config_load()</link>
+ <link linkend="api.get.config.vars"><varname>get_config_vars()</varname></link>,
+ <link linkend="language.config.variables"><varname>config variables</varname></link>,
+ <link linkend="config.files"><varname>config files</varname></link>,
+ <link linkend="language.function.config.load"><varname>{config_load}</varname></link>,
+ <link linkend="api.config.load"><varname>config_load()</varname></link>
and
- <link linkend="api.clear.assign">clear_assign()</link>
+ <link linkend="api.clear.assign"><varname>clear_assign()</varname></link>.
</para>
</refsect1>
</refentry>
http://cvs.php.net/viewvc.cgi/smarty/docs/en/programmers/api-functions/api-config-load.xml?r1=1.4&r2=1.5&diff_format=u
Index: smarty/docs/en/programmers/api-functions/api-config-load.xml
diff -u smarty/docs/en/programmers/api-functions/api-config-load.xml:1.4 smarty/docs/en/programmers/api-functions/api-config-load.xml:1.5
--- smarty/docs/en/programmers/api-functions/api-config-load.xml:1.4 Fri May 27 16:25:02 2005
+++ smarty/docs/en/programmers/api-functions/api-config-load.xml Tue Sep 26 23:29:02 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<refentry id="api.config.load">
<refnamediv>
<refname>config_load()</refname>
@@ -16,22 +16,24 @@
This loads
<link linkend="config.files">config file</link>
data and assigns it to
- the template. This works identical to the template <link
- linkend="language.function.config.load">{config_load}</link>
- function.
+ the template. This works identically to the template
+ <link linkend="language.function.config.load">
+ <varname>{config_load}</varname></link> function.
</para>
<note>
<title>Technical Note</title>
<para>
As of Smarty 2.4.0, assigned template variables are kept across
invocations of
- <link linkend="api.fetch">fetch()</link>
- and <link linkend="api.display">display()</link>.
+ <link linkend="api.fetch"><varname>fetch()</varname></link>
+ and <link linkend="api.display"><varname>display()</varname></link>.
Config vars loaded from
- config_load() are always global scope. Config files are also
- compiled for faster execution, and respect the <link
- linkend="variable.force.compile">$force_compile</link> and <link
- linkend="variable.compile.check">$compile_check</link> settings.
+ <varname>config_load()</varname> are always global in scope.
+ Config files are also compiled for faster execution, and respect the
+ <link linkend="variable.force.compile">
+ <parameter>$force_compile</parameter></link> and
+ <link linkend="variable.compile.check">
+ <parameter>$compile_check</parameter></link> settings.
</para>
</note>
<example>
@@ -50,11 +52,11 @@
</example>
<para>
See also
- <link linkend="language.function.config.load">{config_load}</link>,
- <link linkend="api.get.config.vars">get_config_vars()</link>,
- <link linkend="api.clear.config">clear_config()</link>,
+ <link linkend="language.function.config.load"><varname>{config_load}</varname></link>,
+ <link linkend="api.get.config.vars"><varname>get_config_vars()</varname></link>,
+ <link linkend="api.clear.config"><varname>clear_config()</varname></link>,
and
- <link linkend="language.config.variables">config variables</link>
+ <link linkend="language.config.variables"><varname>config variables</varname></link>
</para>
</refsect1>
</refentry>
http://cvs.php.net/viewvc.cgi/smarty/docs/en/programmers/api-functions/api-display.xml?r1=1.6&r2=1.7&diff_format=u
Index: smarty/docs/en/programmers/api-functions/api-display.xml
diff -u smarty/docs/en/programmers/api-functions/api-display.xml:1.6 smarty/docs/en/programmers/api-functions/api-display.xml:1.7
--- smarty/docs/en/programmers/api-functions/api-display.xml:1.6 Fri May 27 16:25:02 2005
+++ smarty/docs/en/programmers/api-functions/api-display.xml Tue Sep 26 23:29:02 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<refentry id="api.display">
<refnamediv>
<refname>display()</refname>
@@ -16,13 +16,12 @@
</methodsynopsis>
<para>
This displays the template unlike
- <link linkend="api.fetch">fetch()</link>.
+ <link linkend="api.fetch"><varname>fetch()</varname></link>.
Supply a valid <link
linkend="template.resources">template resource</link>
type and path. As an optional second parameter, you can pass a
- $cache id.
- See the <link linkend="caching">caching
- section</link> for more information.
+ <parameter>$cache id</parameter>, see the
+ <link linkend="caching">caching section</link> for more information.
</para>
¶meter.compileid;
<example>
@@ -30,12 +29,12 @@
<programlisting role="php">
<![CDATA[
<?php
-include("Smarty.class.php");
-$smarty = new Smarty;
+include(SMARTY_DIR.'Smarty.class.php');
+$smarty = new Smarty();
$smarty->caching = true;
// only do db calls if cache doesn't exist
-if(!$smarty->is_cached("index.tpl")) {
+if(!$smarty->is_cached('index.tpl')) {
// dummy up some data
$address = "245 N 50th";
@@ -47,24 +46,26 @@
$smarty->assign("Name","Fred");
$smarty->assign("Address",$address);
- $smarty->assign($db_data);
+ $smarty->assign('data', $db_data);
}
// display the output
-$smarty->display("index.tpl");
+$smarty->display('index.tpl');
?>
]]>
</programlisting>
</example>
- <para>
+
+ <example>
+ <title>Other display() template resource examples</title>
+ <para>
Use the syntax for <link
linkend="template.resources">template resources</link> to
display files outside of the
- <link linkend="variable.template.dir">$template_dir</link> directory.
+ <link linkend="variable.template.dir">
+ <parameter>$template_dir</parameter></link> directory.
</para>
- <example>
- <title>function display() template resource examples</title>
<programlisting role="php">
<![CDATA[
<?php
@@ -84,8 +85,8 @@
</programlisting>
</example>
<para>
- See also <link linkend="api.fetch">fetch()</link> and
- <link linkend="api.template.exists">template_exists()</link>.
+ See also <link linkend="api.fetch"><varname>fetch()</varname></link> and
+ <link linkend="api.template.exists"><varname>template_exists()</varname></link>.
</para>
</refsect1>
</refentry>
http://cvs.php.net/viewvc.cgi/smarty/docs/en/programmers/api-functions/api-fetch.xml?r1=1.7&r2=1.8&diff_format=u
Index: smarty/docs/en/programmers/api-functions/api-fetch.xml
diff -u smarty/docs/en/programmers/api-functions/api-fetch.xml:1.7 smarty/docs/en/programmers/api-functions/api-fetch.xml:1.8
--- smarty/docs/en/programmers/api-functions/api-fetch.xml:1.7 Sun Jun 5 15:47:24 2005
+++ smarty/docs/en/programmers/api-functions/api-fetch.xml Tue Sep 26 23:29:02 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.7 $ -->
+<!-- $Revision: 1.8 $ -->
<refentry id="api.fetch">
<refnamediv>
<refname>fetch()</refname>
@@ -20,7 +20,7 @@
Supply a valid <link
linkend="template.resources">template resource</link>
type and path. As an optional second parameter, you can pass a
- cache id. See the <link linkend="caching">caching
+ <parameter>$cache id</parameter>, see the <link linkend="caching">caching
section</link> for more information.
</para>
¶meter.compileid;
@@ -57,7 +57,6 @@
$output = $smarty->fetch('index.tpl');
// do something with $output here
-
echo $output;
?>
]]>
@@ -69,7 +68,7 @@
<example>
<title>Using fetch() to send an email</title>
<para>
- The email_body.tpl template
+ The <filename>email_body.tpl</filename> template
</para>
<programlisting>
<![CDATA[
@@ -80,17 +79,18 @@
Click on the link below to login with your user name of '{$contact.login_id}'
so you can post in our forums.
-http://{$smarty.server.SERVER_NAME}/index.php?page=login
+http://{$smarty.server.SERVER_NAME}/login/
List master
Some user group
-{include file="email_disclaimer.tpl"}
+{include file='email_disclaimer.tpl'}
]]>
</programlisting>
<para>
- The email_disclaimer.tpl template which uses the
- <link linkend="language.function.textformat">{textformat}</link> modifier.
+ The <filename>email_disclaimer.tpl</filename> template which uses the
+ <link linkend="language.function.textformat">
+ <varname>{textformat}</varname></link> modifier.
</para>
<programlisting>
<![CDATA[
@@ -103,8 +103,9 @@
]]>
</programlisting>
<para>
- and the php script using the PHP
- <ulink url="&url.php-manual;function.mail">mail()</ulink> function
+ The php script using the PHP
+ <ulink url="&url.php-manual;function.mail">
+ <varname>mail()</varname></ulink> function
</para>
<programlisting role="php">
<![CDATA[
@@ -125,11 +126,11 @@
<para>
See also
- <link linkend="language.function.fetch">{fetch}</link>
- <link linkend="api.display">display()</link>,
- <link linkend="language.function.eval">{eval}</link>,
+ <link linkend="language.function.fetch"><varname>{fetch}</varname></link>
+ <link linkend="api.display"><varname>display()</varname></link>,
+ <link linkend="language.function.eval"><varname>{eval}</varname></link>,
and
- <link linkend="api.template.exists">template_exists()</link>.
+ <link linkend="api.template.exists"><varname>template_exists()</varname></link>.
</para>
</refsect1>
</refentry>
http://cvs.php.net/viewvc.cgi/smarty/docs/en/programmers/api-functions/api-get-config-vars.xml?r1=1.5&r2=1.6&diff_format=u
Index: smarty/docs/en/programmers/api-functions/api-get-config-vars.xml
diff -u smarty/docs/en/programmers/api-functions/api-get-config-vars.xml:1.5 smarty/docs/en/programmers/api-functions/api-get-config-vars.xml:1.6
--- smarty/docs/en/programmers/api-functions/api-get-config-vars.xml:1.5 Fri May 27 16:25:02 2005
+++ smarty/docs/en/programmers/api-functions/api-get-config-vars.xml Tue Sep 26 23:29:02 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
<refentry id="api.get.config.vars">
<refnamediv>
<refname>get_config_vars()</refname>
@@ -22,25 +22,25 @@
<![CDATA[
<?php
-// get loaded config template var 'foo'
-$foo = $smarty->get_config_vars('foo');
+// get loaded config template var #foo#
+$myVar = $smarty->get_config_vars('foo');
// get all loaded config template vars
-$config_vars = $smarty->get_config_vars();
+$all_config_vars = $smarty->get_config_vars();
// take a look at them
-print_r($config_vars);
+print_r($all_config_vars);
?>
]]>
</programlisting>
</example>
<para>
See also
- <link linkend="api.clear.config">clear_config()</link>,
- <link linkend="language.function.config.load">{config_load}</link>,
- <link linkend="api.config.load">config_load()</link>
+ <link linkend="api.clear.config"><varname>clear_config()</varname></link>,
+ <link linkend="language.function.config.load"><varname>{config_load}</varname></link>,
+ <link linkend="api.config.load"><varname>config_load()</varname></link>
and
- <link linkend="api.get.template.vars">get_template_vars()</link>.
+ <link linkend="api.get.template.vars"><varname>get_template_vars()</varname></link>.
</para>
</refsect1>
</refentry>
http://cvs.php.net/viewvc.cgi/smarty/docs/en/programmers/api-functions/api-get-registered-object.xml?r1=1.3&r2=1.4&diff_format=u
Index: smarty/docs/en/programmers/api-functions/api-get-registered-object.xml
diff -u smarty/docs/en/programmers/api-functions/api-get-registered-object.xml:1.3 smarty/docs/en/programmers/api-functions/api-get-registered-object.xml:1.4
--- smarty/docs/en/programmers/api-functions/api-get-registered-object.xml:1.3 Fri May 27 16:25:02 2005
+++ smarty/docs/en/programmers/api-functions/api-get-registered-object.xml Tue Sep 26 23:29:02 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<refentry id="api.get.registered.object">
<refnamediv>
<refname>get_registered_object()</refname>
@@ -14,8 +14,8 @@
<para>
This is useful
from within a custom function when you need direct access to a
- <link linkend="api.register.object">registered object</link>. See
- <link linkend="advanced.features.objects">objects</link> for more info.
+ <link linkend="api.register.object">registered object</link>. See the
+ <link linkend="advanced.features.objects">objects</link> page for more info.
</para>
<example>
<title>get_registered_object()</title>
@@ -36,10 +36,10 @@
</example>
<para>
See also
- <link linkend="api.register.object">register_object()</link>,
- <link linkend="api.unregister.object">unregister_object()</link>
+ <link linkend="api.register.object"><varname>register_object()</varname></link>,
+ <link linkend="api.unregister.object"><varname>unregister_object()</varname></link>
and
- <link linkend="advanced.features.objects">objects section</link>
+ <link linkend="advanced.features.objects">objects page</link>
</para>
</refsect1>
</refentry>
http://cvs.php.net/viewvc.cgi/smarty/docs/en/programmers/api-functions/api-get-template-vars.xml?r1=1.4&r2=1.5&diff_format=u
Index: smarty/docs/en/programmers/api-functions/api-get-template-vars.xml
diff -u smarty/docs/en/programmers/api-functions/api-get-template-vars.xml:1.4 smarty/docs/en/programmers/api-functions/api-get-template-vars.xml:1.5
--- smarty/docs/en/programmers/api-functions/api-get-template-vars.xml:1.4 Fri May 27 16:25:02 2005
+++ smarty/docs/en/programmers/api-functions/api-get-template-vars.xml Tue Sep 26 23:29:02 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<refentry id="api.get.template.vars">
<refnamediv>
<refname>get_template_vars()</refname>
@@ -22,26 +22,25 @@
<![CDATA[
<?php
// get assigned template var 'foo'
-$foo = $smarty->get_template_vars('foo');
+$myVar = $smarty->get_template_vars('foo');
// get all assigned template vars
-$tpl_vars = $smarty->get_template_vars();
+$all_tpl_vars = $smarty->get_template_vars();
// take a look at them
-print_r($tpl_vars);
+print_r($all_tpl_vars);
?>
]]>
</programlisting>
</example>
<para>
- See also <link linkend="api.assign">assign()</link>,
- <link linkend="language.function.assign">{assign}</link>,
- <link linkend="api.assign.by.ref">assign_by_ref()</link>,
- <link linkend="api.append">append()</link>,
- <link linkend="api.clear.assign">clear_assign()</link>,
- <link linkend="api.clear.all.assign">clear_all_assign()</link>
+ See also <link linkend="api.assign"><varname>assign()</varname></link>,
+ <link linkend="language.function.assign"><varname>{assign}</varname></link>,
+ <link linkend="api.append"><varname>append()</varname></link>,
+ <link linkend="api.clear.assign"><varname>clear_assign()</varname></link>,
+ <link linkend="api.clear.all.assign"><varname>clear_all_assign()</varname></link>
and
- <link linkend="api.get.config.vars">get_config_vars()</link>
+ <link linkend="api.get.config.vars"><varname>get_config_vars()</varname></link>
</para>
</refsect1>
http://cvs.php.net/viewvc.cgi/smarty/docs/en/programmers/api-functions/api-is-cached.xml?r1=1.6&r2=1.7&diff_format=u
Index: smarty/docs/en/programmers/api-functions/api-is-cached.xml
diff -u smarty/docs/en/programmers/api-functions/api-is-cached.xml:1.6 smarty/docs/en/programmers/api-functions/api-is-cached.xml:1.7
--- smarty/docs/en/programmers/api-functions/api-is-cached.xml:1.6 Sat Feb 18 13:18:01 2006
+++ smarty/docs/en/programmers/api-functions/api-is-cached.xml Tue Sep 26 23:29:02 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<refentry id="api.is.cached">
<refnamediv>
<refname>is_cached()</refname>
@@ -14,11 +14,56 @@
<methodparam choice="opt"><type>string</type><parameter>compile_id</parameter>
</methodparam>
</methodsynopsis>
+
+ <itemizedlist>
+ <listitem><para>
+ This only works if <link linkend="variable.caching">
+ <parameter>$caching</parameter></link> is set to &true;, see the
+ <link linkend="caching">caching section</link> for more info.
+ </para></listitem>
+
+ <listitem><para>
+ You can also pass a <parameter>$cache_id</parameter> as an optional second
+ parameter in case you want
+ <link linkend="caching.multiple.caches">multiple caches</link>
+ for the given template.
+ </para></listitem>
+
+ <listitem><para>
+ You can supply a
+ <link linkend="variable.compile.id"><parameter>$compile id</parameter></link>
+ as an optional third parameter. If you omit that parameter the persistent
+ <link linkend="variable.compile.id">
+ <parameter>$compile_id</parameter></link> is used if its set.
+ </para></listitem>
+
+ <listitem><para>
+ If you do not want to pass a <parameter>$cache_id</parameter> but want to
+ pass a <link linkend="variable.compile.id">
+ <parameter>$compile_id</parameter></link> you have to pass
+ &null; as a <parameter>$cache_id</parameter>.
+ </para></listitem>
+ </itemizedlist>
+
+ <note>
+ <title>Technical Note</title>
<para>
- This only works if <link
- linkend="variable.caching">$caching</link> is set to true; see the
- <link linkend="caching">caching section</link>.
+ If <varname>is_cached()</varname> returns &true; it actually loads the
+ cached output and stores it internally. Any subsequent call to
+ <link linkend="api.display"><varname>display()</varname></link> or
+ <link linkend="api.fetch"><varname>fetch()</varname></link>
+ will return this internally stored output and does not try to reload
+ the cache file. This prevents a race condition that may occur when a
+ second process clears the cache between the calls to
+ <varname>is_cached()</varname> and to
+ <link linkend="api.display"><varname>display()</varname></link>
+ in the example above. This also means calls to
+ <link linkend="api.clear.cache"><varname>clear_cache()</varname></link>
+ and other changes of the cache-settings may have no effect after
+ <varname>is_cached()</varname> returned &true;.
</para>
+ </note>
+
<example>
<title>is_cached()</title>
<programlisting role="php">
@@ -35,24 +80,7 @@
]]>
</programlisting>
</example>
- <para>
- You can also pass a $cache id as an optional second parameter
- in case you want
- <link linkend="caching.multiple.caches">multiple caches</link>
- for the given template.
- </para>
- <para>
- You can supply a
- <link linkend="variable.compile.id">$compile id</link>
- as an optional third parameter.
- If you omit that parameter the persistent
- <link linkend="variable.compile.id">$compile_id</link> is used.
- </para>
- <para>
- If you do not want to pass a cache id but want to pass a
- <link linkend="variable.compile.id">$compile_id</link>
- you have to pass <emphasis>null</emphasis> as cache id.
- </para>
+
<example>
<title>is_cached() with multiple-cache template</title>
<programlisting role="php">
@@ -71,28 +99,10 @@
</example>
- <note>
- <title>Technical Note</title>
- <para>
- If <literal>is_cached()</literal> returns true it actually loads the
- cached output and stores it internally. Any subsequent call to
- <link linkend="api.display">display()</link> or
- <link linkend="api.fetch">fetch()</link>
- will return this internally stored output and does not try to reload
- the cache file. This prevents a race condition that may occur when a
- second process clears the cache between the calls to is_cached() and to
- <link linkend="api.display">display()</link>
- in the example above. This also means calls to
- <link linkend="api.clear.cache">clear_cache()</link>
- and other changes of the cache-settings may have no effect after
- is_cached() returned true.
- </para>
- </note>
-
<para>
See also
- <link linkend="api.clear.cache">clear_cache()</link>,
- <link linkend="api.clear.all.cache">clear_all_cache()</link>,
+ <link linkend="api.clear.cache"><varname>clear_cache()</varname></link>,
+ <link linkend="api.clear.all.cache"><varname>clear_all_cache()</varname></link>,
and
<link linkend="caching">caching section</link>.
</para>
http://cvs.php.net/viewvc.cgi/smarty/docs/en/programmers/api-functions/api-load-filter.xml?r1=1.4&r2=1.5&diff_format=u
Index: smarty/docs/en/programmers/api-functions/api-load-filter.xml
diff -u smarty/docs/en/programmers/api-functions/api-load-filter.xml:1.4 smarty/docs/en/programmers/api-functions/api-load-filter.xml:1.5
--- smarty/docs/en/programmers/api-functions/api-load-filter.xml:1.4 Sun Jun 5 15:47:24 2005
+++ smarty/docs/en/programmers/api-functions/api-load-filter.xml Tue Sep 26 23:29:02 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<refentry id="api.load.filter">
<refnamediv>
<refname>load_filter()</refname>
@@ -13,13 +13,14 @@
<methodparam><type>string</type><parameter>name</parameter></methodparam>
</methodsynopsis>
<para>
- The first
- argument specifies the type of the filter to load and can be one
- of the following: 'pre', 'post', or 'output'. The second argument
- specifies the name of the filter plugin, for example, 'trim'.
+ The first argument specifies the type of the filter to load and can be one
+ of the following: <literal>pre</literal>, <literal>post</literal> or
+ <literal>output</literal>.
+ The second argument specifies the <parameter>name</parameter> of the
+ filter plugin.
</para>
<example>
- <title>loading filter plugins</title>
+ <title>Loading filter plugins</title>
<programlisting role="php">
<![CDATA[
<?php
@@ -39,12 +40,12 @@
</example>
<para>
See also
- <link linkend="api.register.prefilter">register_prefilter()</link>,
- <link linkend="api.register.postfilter">register_postfilter()</link>,
- <link linkend="api.register.outputfilter">register_outputfilter()</link>,
- <link linkend="variable.autoload.filters">$autoload_filters</link>
+ <link linkend="api.register.prefilter"><varname>register_prefilter()</varname></link>,
+ <link linkend="api.register.postfilter"><varname>register_postfilter()</varname></link>,
+ <link linkend="api.register.outputfilter"><varname>register_outputfilter()</varname></link>,
+ <link linkend="variable.autoload.filters"><parameter>$autoload_filters</parameter></link>
and
- <link linkend="advanced.features">Advanced features</link>.
+ <link linkend="advanced.features">advanced features</link>.
</para>
</refsect1>
</refentry>
http://cvs.php.net/viewvc.cgi/smarty/docs/en/programmers/api-functions/api-register-block.xml?r1=1.5&r2=1.6&diff_format=u
Index: smarty/docs/en/programmers/api-functions/api-register-block.xml
diff -u smarty/docs/en/programmers/api-functions/api-register-block.xml:1.5 smarty/docs/en/programmers/api-functions/api-register-block.xml:1.6
--- smarty/docs/en/programmers/api-functions/api-register-block.xml:1.5 Fri Dec 2 16:35:30 2005
+++ smarty/docs/en/programmers/api-functions/api-register-block.xml Tue Sep 26 23:29:02 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
<refentry id="api.register.block">
<refnamediv>
<refname>register_block()</refname>
@@ -14,37 +14,27 @@
<methodparam><type>bool</type><parameter>cacheable</parameter></methodparam>
<methodparam><type>mixed</type><parameter>cache_attrs</parameter></methodparam>
</methodsynopsis>
+
<para>
Use this to dynamically register
- <link linkend="plugins.block.functions">block functions plugins</link>.
- Pass in the block function name, followed by the PHP
- function callback that implements it.
- </para>
- <para>
- The php-function callback <parameter>impl</parameter> can be either (a) a string
- containing the function name or (b) an array of the form
- <literal>array(&$object, $method)</literal> with
- <literal>&$object</literal> being a reference to an
- object and <literal>$method</literal> being a string
- containing the method-name or (c) an array of the form
- <literal>array(&$class, $method)</literal> with
- <literal>$class</literal> being a classname and
- <literal>$method</literal> being a class method of that
- class.
+ <link linkend="plugins.block.functions">block function plugins</link>.
+ Pass in the block function <parameter>name</parameter>, followed by the PHP
+ function's name that implements it.
</para>
+ &api.register.snippet;
+
<para>
<parameter>cacheable</parameter> and <parameter>cache_attrs</parameter>
can be omitted in most cases. See <link
- linkend="caching.cacheable">Controlling Cacheability of Plugins' Output</link>
- on how to use them properly.
+ linkend="caching.cacheable">controlling cacheability of plugins' output</link>
+ section on how to implement them properly.
</para>
<example>
<title>register_block()</title>
<programlisting role="php">
<![CDATA[
<?php
-$smarty->register_block('translate', 'do_translation');
-
+// function declaration
function do_translation ($params, $content, &$smarty, &$repeat)
{
if (isset($content)) {
@@ -53,27 +43,27 @@
return $translation;
}
}
+
+// register with smarty
+$smarty->register_block('translate', 'do_translation');
?>
]]>
</programlisting>
<para>
- where the template is:
+ Where the template is:
</para>
<programlisting>
<![CDATA[
-{* template *}
-{translate lang="br"}
-Hello, world!
-{/translate}
+{translate lang='br'}Hello, world!{/translate}
]]>
</programlisting>
</example>
<para>
See also
- <link linkend="api.unregister.block">unregister_block()</link>
- and
- <link linkend="plugins.block.functions">Plugin Block Functions</link>.
+ <link linkend="api.unregister.block"><varname>unregister_block()</varname></link>
+ and the
+ <link linkend="plugins.block.functions">plugin block functions</link> page.
</para>
</refsect1>
http://cvs.php.net/viewvc.cgi/smarty/docs/en/programmers/api-functions/api-register-compiler-function.xml?r1=1.5&r2=1.6&diff_format=u
Index: smarty/docs/en/programmers/api-functions/api-register-compiler-function.xml
diff -u smarty/docs/en/programmers/api-functions/api-register-compiler-function.xml:1.5 smarty/docs/en/programmers/api-functions/api-register-compiler-function.xml:1.6
--- smarty/docs/en/programmers/api-functions/api-register-compiler-function.xml:1.5 Fri Dec 2 16:35:30 2005
+++ smarty/docs/en/programmers/api-functions/api-register-compiler-function.xml Tue Sep 26 23:29:02 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
<refentry id="api.register.compiler.function">
<refnamediv>
<refname>register_compiler_function()</refname>
@@ -18,42 +18,20 @@
<link linkend="plugins.compiler.functions">compiler function</link> name,
followed by the PHP function that implements it.
</para>
- <para>
- The php-function callback <parameter>impl</parameter> can be either:
- </para>
- <orderedlist numeration="loweralpha">
- <listitem>
- <para>
- a string containing the function name
- </para>
- </listitem><listitem>
- <para>an array of the form <literal>array(&$object, $method)</literal> with
- <literal>&$object</literal> being a reference to an
- object and <literal>$method</literal> being a string
- containing the method-name
- </para>
- </listitem><listitem>
- <para>an array of the form
- <literal>array(&$class, $method)</literal> with
- <literal>$class</literal> being a classname and
- <literal>$method</literal> being a class method of that
- class.
- </para>
- </listitem>
- </orderedlist>
- <para>
+ &api.register.snippet;
+
+ <para>
<parameter>cacheable</parameter> can be omitted in
- most cases. See <link linkend="caching.cacheable">Controlling
- Cacheability of Plugins' Output</link> on how to use it properly.
+ most cases. See <link linkend="caching.cacheable">controlling
+ cacheability of plugin output</link> on how to use it properly.
</para>
<para>
See also
-<link
-linkend="api.unregister.compiler.function">unregister_compiler_function()
-</link>
-and
-<link linkend="plugins.compiler.functions">Plugin Compiler Functions</link>.
+<link linkend="api.unregister.compiler.function">
+<varname>unregister_compiler_function()</varname></link>
+and the
+<link linkend="plugins.compiler.functions">plugin compiler functions</link> section.
</para>
</refsect1>
http://cvs.php.net/viewvc.cgi/smarty/docs/en/programmers/api-functions/api-register-function.xml?r1=1.8&r2=1.9&diff_format=u
Index: smarty/docs/en/programmers/api-functions/api-register-function.xml
diff -u smarty/docs/en/programmers/api-functions/api-register-function.xml:1.8 smarty/docs/en/programmers/api-functions/api-register-function.xml:1.9
--- smarty/docs/en/programmers/api-functions/api-register-function.xml:1.8 Fri Dec 2 16:35:30 2005
+++ smarty/docs/en/programmers/api-functions/api-register-function.xml Tue Sep 26 23:29:02 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.8 $ -->
+<!-- $Revision: 1.9 $ -->
<refentry id="api.register.function">
<refnamediv>
<refname>register_function()</refname>
@@ -19,36 +19,13 @@
Pass in the <link linkend="plugins.functions">template function</link>
name, followed by the PHP function name that implements it.
</para>
- <para>
- The php-function callback <parameter>impl</parameter> can be either
- </para>
- <orderedlist numeration="loweralpha">
- <listitem>
- <para>
- a string containing the function name
- </para>
- </listitem><listitem>
- <para>
- an array of the form
- <literal>array(&$object, $method)</literal> with
- <literal>&$object</literal> being a reference to an
- object and <literal>$method</literal> being a string
- containing the method-name
- </para>
- </listitem><listitem>
- <para>
- an array of the form <literal>array(&$class, $method)</literal>
- with <literal>$class</literal> being a classname and
- <literal>$method</literal> being a class method of that
- class.
- </para>
- </listitem>
- </orderedlist>
+ &api.register.snippet;
+
<para>
<parameter>cacheable</parameter> and <parameter>cache_attrs</parameter> can be
omitted in most cases. See <link
- linkend="caching.cacheable">Controlling Cacheability of Plugins' Output</link>
+ linkend="caching.cacheable">controlling cacheability of plugins output</link>
on how to use them properly.
</para>
<example>
@@ -85,10 +62,9 @@
<para>
See also
-<link linkend="api.unregister.function">unregister_function()</link>
-and
-<link linkend="plugins.functions">Plugin functions</link>
-.
+<link linkend="api.unregister.function"><varname>unregister_function()</varname></link>
+and the
+<link linkend="plugins.functions">plugin functions</link> section.
</para>
</refsect1>
http://cvs.php.net/viewvc.cgi/smarty/docs/en/programmers/api-functions/api-register-modifier.xml?r1=1.6&r2=1.7&diff_format=u
Index: smarty/docs/en/programmers/api-functions/api-register-modifier.xml
diff -u smarty/docs/en/programmers/api-functions/api-register-modifier.xml:1.6 smarty/docs/en/programmers/api-functions/api-register-modifier.xml:1.7
--- smarty/docs/en/programmers/api-functions/api-register-modifier.xml:1.6 Fri Dec 2 16:35:31 2005
+++ smarty/docs/en/programmers/api-functions/api-register-modifier.xml Tue Sep 26 23:29:02 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<refentry id="api.register.modifier">
<refnamediv>
<refname>register_modifier()</refname>
@@ -13,34 +13,11 @@
<methodparam><type>mixed</type><parameter>impl</parameter></methodparam>
</methodsynopsis>
<para>
- Pass in the
- template modifier name, followed by the PHP function that it
+ Pass in the template modifier name, followed by the PHP function that it
implements it.
</para>
- <para>
- The php-function callback <parameter>impl</parameter> can be either
- </para>
- <orderedlist numeration="loweralpha">
- <listitem>
- <para>a string containing the function name
- </para>
- </listitem><listitem>
- <para>an array of the form <literal>array(&$object,
- $method)</literal> with <literal>&$object</literal>
- being a reference to an
- object and <literal>$method</literal> being a string
- containing the method-name
- </para>
- </listitem><listitem>
- <para>
- an array of the form
- <literal>array(&$class, $method)</literal> with
- <literal>$class</literal> being a classname and
- <literal>$method</literal> being a class method of that
- class.
- </para>
- </listitem>
- </orderedlist>
+ &api.register.snippet;
+
<example>
<title>register_modifier()</title>
@@ -49,17 +26,16 @@
<?php
// let's map PHP's stripslashes function to a Smarty modifier.
-$smarty->register_modifier('sslash', 'stripslashes');
+$smarty->register_modifier('ss', 'stripslashes');
?>
]]>
</programlisting>
-<para>template</para>
+<para>In the template, use <literal>ss</literal> to strip slashes.</para>
<programlisting>
<![CDATA[
<?php
-{* use 'sslash' to strip slashes from variables *}
-{$var|sslash}
+{$var|ss}
?>
]]>
</programlisting>
@@ -67,12 +43,12 @@
</example>
<para>
See also
- <link linkend="api.unregister.modifier">unregister_modifier()</link>,
- <link linkend="api.register.function">register_function()</link>,
- <link linkend="language.modifiers">modifiers</link>,
- <link linkend="plugins">Extending Smarty with plugins</link>
+ <link linkend="api.unregister.modifier"><varname>unregister_modifier()</varname></link>,
+ <link linkend="api.register.function"><varname>register_function()</varname></link>,
+ <link linkend="language.modifiers">modifiers</link> section,
+ <link linkend="plugins">extending Smarty with plugins</link>
and
- <link linkend="plugins.modifiers">Creating Plugin modifiers</link>,
+ <link linkend="plugins.modifiers">creating plugin modifiers</link>,
</para>
</refsect1>
</refentry>
http://cvs.php.net/viewvc.cgi/smarty/docs/en/programmers/api-functions/api-register-object.xml?r1=1.8&r2=1.9&diff_format=u
Index: smarty/docs/en/programmers/api-functions/api-register-object.xml
diff -u smarty/docs/en/programmers/api-functions/api-register-object.xml:1.8 smarty/docs/en/programmers/api-functions/api-register-object.xml:1.9
--- smarty/docs/en/programmers/api-functions/api-register-object.xml:1.8 Sun Jun 5 15:47:25 2005
+++ smarty/docs/en/programmers/api-functions/api-register-object.xml Tue Sep 26 23:29:02 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.8 $ -->
+<!-- $Revision: 1.9 $ -->
<refentry id="api.register.object">
<refnamediv>
<refname>register_object()</refname>
@@ -19,13 +19,13 @@
<para>
See the
<link linkend="advanced.features.objects">objects section</link>
- for examples.
+ for more information.
</para>
<para>
See also
- <link linkend="api.get.registered.object">get_registered_object()</link>,
+ <link linkend="api.get.registered.object"><varname>get_registered_object()</varname></link>,
and
- <link linkend="api.unregister.object">unregister_object()</link>.
+ <link linkend="api.unregister.object"><varname>unregister_object()</varname></link>.
</para>
</refsect1>
</refentry>
http://cvs.php.net/viewvc.cgi/smarty/docs/en/programmers/api-functions/api-register-outputfilter.xml?r1=1.5&r2=1.6&diff_format=u
Index: smarty/docs/en/programmers/api-functions/api-register-outputfilter.xml
diff -u smarty/docs/en/programmers/api-functions/api-register-outputfilter.xml:1.5 smarty/docs/en/programmers/api-functions/api-register-outputfilter.xml:1.6
--- smarty/docs/en/programmers/api-functions/api-register-outputfilter.xml:1.5 Fri Dec 2 16:35:31 2005
+++ smarty/docs/en/programmers/api-functions/api-register-outputfilter.xml Tue Sep 26 23:29:02 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
<refentry id="api.register.outputfilter">
<refnamediv>
<refname>register_outputfilter()</refname>
@@ -20,42 +20,17 @@
filters</link>
for more information on how to set up an output filter function.
</para>
- <para>
- The php-function callback <parameter>function</parameter> can be either
- </para>
- <orderedlist numeration="loweralpha">
- <listitem>
- <para>
- a string containing the function name
- </para>
- </listitem><listitem>
- <para>
- an array of the form
- <literal>array(&$object, $method)</literal> with
- <literal>&$object</literal> being a reference to an
- object and <literal>$method</literal> being a string
- containing the method-name
- </para>
- </listitem><listitem>
- <para>
- an array of the form
- <literal>array(&$class, $method)</literal> with
- <literal>$class</literal> being a classname and
- <literal>$method</literal> being a class method of that
- class.
- </para>
- </listitem>
- </orderedlist>
+ &api.register.snippet;
+
<para>
See also
-<link linkend="api.unregister.outputfilter">unregister_outputfilter()</link>,
-<link linkend="api.register.prefilter">register_prefilter()</link>,
-<link linkend="api.register.postfilter">register_postfilter()</link>,
-<link linkend="api.load.filter">load_filter()</link>,
-<link linkend="variable.autoload.filters">$autoload_filters</link>
-and
-<link linkend="advanced.features.outputfilters">template
-output filters</link>.
+<link linkend="api.unregister.outputfilter"><varname>unregister_outputfilter()</varname></link>,
+
+<link linkend="api.load.filter"><varname>load_filter()</varname></link>,
+<link linkend="variable.autoload.filters"><parameter>$autoload_filters</parameter></link>
+and the
+<link linkend="advanced.features.outputfilters">template output filters</link>
+section.
</para>
</refsect1>
</refentry>
http://cvs.php.net/viewvc.cgi/smarty/docs/en/programmers/api-functions/api-register-postfilter.xml?r1=1.5&r2=1.6&diff_format=u
Index: smarty/docs/en/programmers/api-functions/api-register-postfilter.xml
diff -u smarty/docs/en/programmers/api-functions/api-register-postfilter.xml:1.5 smarty/docs/en/programmers/api-functions/api-register-postfilter.xml:1.6
--- smarty/docs/en/programmers/api-functions/api-register-postfilter.xml:1.5 Fri Dec 2 16:35:31 2005
+++ smarty/docs/en/programmers/api-functions/api-register-postfilter.xml Tue Sep 26 23:29:02 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
<refentry id="api.register.postfilter">
<refnamediv>
<refname>register_postfilter()</refname>
@@ -18,42 +18,20 @@
linkend="advanced.features.postfilters">template postfilters</link> for
more information on how to setup a postfiltering function.
</para>
- <para>
- The php-function callback <parameter>function</parameter> can be either
- </para>
- <orderedlist numeration="loweralpha">
- <listitem>
- <para>
- a string containing the function name
- </para>
- </listitem><listitem>
- <para>
- an array of the form
- <literal>array(&$object, $method)</literal> with
- <literal>&$object</literal> being a reference to an
- object and <literal>$method</literal> being a string
- containing the method-name
- </para>
- </listitem><listitem>
- <para>
- an array of the form
- <literal>array(&$class, $method)</literal> with
- <literal>$class</literal> being a classname and
- <literal>$method</literal> being a class method of that
- class.
- </para>
- </listitem>
- </orderedlist>
+ &api.register.snippet;
+
<para>
See also
- <link linkend="api.unregister.postfilter">unregister_postfilter()</link>,
- <link linkend="api.register.prefilter">register_prefilter()</link>,
- <link linkend="api.register.outputfilter">register_ouputfilter()</link>,
- <link linkend="api.load.filter">load_filter()</link>,
- <link linkend="variable.autoload.filters">$autoload_filters</link>
- and
- <link linkend="advanced.features.outputfilters">template
- output filters</link>.
+ <link linkend="api.unregister.postfilter">
+ <varname>unregister_postfilter()</varname></link>,
+ <link linkend="api.register.prefilter">
+ <varname>register_prefilter()</varname></link>,
+ <link linkend="api.load.filter"><varname>load_filter()</varname></link>,
+ <link linkend="variable.autoload.filters">
+ <parameter>$autoload_filters</parameter></link>
+ and the
+ <link linkend="advanced.features.outputfilters">template output filters</link>
+ section.
</para>
</refsect1>
http://cvs.php.net/viewvc.cgi/smarty/docs/en/programmers/api-functions/api-register-prefilter.xml?r1=1.5&r2=1.6&diff_format=u
Index: smarty/docs/en/programmers/api-functions/api-register-prefilter.xml
diff -u smarty/docs/en/programmers/api-functions/api-register-prefilter.xml:1.5 smarty/docs/en/programmers/api-functions/api-register-prefilter.xml:1.6
--- smarty/docs/en/programmers/api-functions/api-register-prefilter.xml:1.5 Fri Dec 2 16:35:31 2005
+++ smarty/docs/en/programmers/api-functions/api-register-prefilter.xml Tue Sep 26 23:29:02 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
<refentry id="api.register.prefilter">
<refnamediv>
<refname>register_prefilter()</refname>
@@ -18,44 +18,19 @@
linkend="advanced.features.prefilters">template prefilters</link> for
more information on how to setup a prefiltering function.
</para>
+ &api.register.snippet;
- <para>
- The php-function callback <parameter>function</parameter> can be either
- </para>
- <orderedlist numeration="loweralpha">
- <listitem>
- <para>
- a string containing the function name
- </para>
- </listitem><listitem>
- <para>
- an array of the form
- <literal>array(&$object, $method)</literal> with
- <literal>&$object</literal> being a reference to an
- object and <literal>$method</literal> being a string
- containing the method-name
- </para>
- </listitem><listitem>
- <para>
- an array of the form
- <literal>array(&$class, $method)</literal> with
- <literal>$class</literal> being a classname and
- <literal>$method</literal> being a class method of that
- class.
- </para>
- </listitem>
- </orderedlist>
<para>
See also
- <link linkend="api.unregister.prefilter">unregister_prefilter()</link>,
- <link linkend="api.register.postfilter">register_postfilter()</link>,
- <link linkend="api.register.outputfilter">register_ouputfilter()</link>,
- <link linkend="api.load.filter">load_filter()</link>,
- <link linkend="variable.autoload.filters">$autoload_filters</link>
+ <link linkend="api.unregister.prefilter"><varname>unregister_prefilter()</varname></link>,
+ <link linkend="api.register.postfilter"><varname>register_postfilter()</varname></link>,
+ <link linkend="api.register.outputfilter"><varname>register_ouputfilter()</varname></link>,
+ <link linkend="api.load.filter"><varname>load_filter()</varname></link>,
+ <link linkend="variable.autoload.filters"><parameter>$autoload_filters</parameter></link>
and
- <link linkend="advanced.features.outputfilters">template
- output filters</link>.
+ <link linkend="advanced.features.outputfilters">template output filters</link>
+ section.
</para>
</refsect1>
http://cvs.php.net/viewvc.cgi/smarty/docs/en/programmers/api-functions/api-register-resource.xml?r1=1.4&r2=1.5&diff_format=u
Index: smarty/docs/en/programmers/api-functions/api-register-resource.xml
diff -u smarty/docs/en/programmers/api-functions/api-register-resource.xml:1.4 smarty/docs/en/programmers/api-functions/api-register-resource.xml:1.5
--- smarty/docs/en/programmers/api-functions/api-register-resource.xml:1.4 Sat Feb 18 13:18:01 2006
+++ smarty/docs/en/programmers/api-functions/api-register-resource.xml Tue Sep 26 23:29:02 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<refentry id="api.register.resource">
<refnamediv>
<refname>register_resource()</refname>
@@ -16,31 +16,41 @@
Use this to dynamically register a
<link linkend="template.resources">resource plugin</link>
with Smarty.
- Pass in the name of the resource and the array of PHP functions
- implementing it. See
+ Pass in the <parameter>name</parameter> of the resource and the array of
+ PHP functions implementing it. See
<link linkend="template.resources">template resources</link>
- for more information on how to setup a function for fetching
- templates.
- </para>
- <note>
+ for more information on how to setup a function for fetching templates.
+ <note>
<title>Technical Note</title>
<para>
A resource name must be at least two characters in length. One
character resource names will be ignored and used as part of the file
- path, such as $smarty->display('c:/path/to/index.tpl');
+ path, such as <literal>$smarty->display('c:/path/to/index.tpl');</literal>
</para>
</note>
- <para>
+
+ </para>
+
+ <itemizedlist>
+ <listitem><para>
The php-function-array <parameter>resource_funcs</parameter>
- must have 4 or 5 elements. With 4 elements the elements are
- the functions-callbacks for the respective "source",
- "timestamp", "secure" and "trusted" functions of the
- resource. With 5 elements the first element has to be an
+ must have 4 or 5 elements.
+ </para></listitem>
+ <listitem><para>
+ With 4 elements the elements are
+ the functions-callbacks for the respective <literal>source</literal>,
+ <literal>timestamp</literal>, <literal>secure</literal> and
+ <literal>trusted</literal> functions of the resource.
+ </para></listitem>
+ <listitem><para>
+ With 5 elements the first element has to be an
object reference or a class name of the object or class
implementing the resource and the 4 following elements have
- to be the method names implementing "source", "timestamp",
- "secure" and "trusted".
- </para>
+ to be the method names implementing <literal>source</literal>,
+ <literal>timestamp</literal>, <literal>secure</literal>
+ and <literal>trusted</literal>.
+ </para></listitem>
+ </itemizedlist>
<example>
<title>register_resource()</title>
<programlisting role="php">
@@ -57,11 +67,11 @@
</programlisting>
</example>
- <para>
- See also
- <link linkend="api.unregister.resource">unregister_resource()</link>
- and
- <link linkend="template.resources">template resources</link>
+<para>
+ See also
+ <link linkend="api.unregister.resource"><varname>unregister_resource()</varname></link>
+ and the
+ <link linkend="template.resources">template resources</link> section.
</para>
</refsect1>
http://cvs.php.net/viewvc.cgi/smarty/docs/en/programmers/api-functions/api-template-exists.xml?r1=1.8&r2=1.9&diff_format=u
Index: smarty/docs/en/programmers/api-functions/api-template-exists.xml
diff -u smarty/docs/en/programmers/api-functions/api-template-exists.xml:1.8 smarty/docs/en/programmers/api-functions/api-template-exists.xml:1.9
--- smarty/docs/en/programmers/api-functions/api-template-exists.xml:1.8 Sun Jun 5 18:22:56 2005
+++ smarty/docs/en/programmers/api-functions/api-template-exists.xml Tue Sep 26 23:29:02 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.8 $ -->
+<!-- $Revision: 1.9 $ -->
<refentry id="api.template.exists">
<refnamediv>
<refname>template_exists()</refname>
@@ -19,11 +19,10 @@
<example>
<title>template_exists()</title>
<para>
- This example uses $_GET['page'] to include a content template. If
- the template doesnt exist then an error page is displayed instead.
- </para>
- <para>
- The <filename>page_container.tpl</filename>
+ This example uses <literal>$_GET['page']</literal> to
+ <link linkend="language.function.include"><varname>{include}</varname></link>
+ a content template. If the template does not exist then an error page
+ is displayed instead. First the <filename>page_container.tpl</filename>
</para>
<programlisting role="php">
<![CDATA[
@@ -33,14 +32,14 @@
{include file='page_top.tpl'}
{* include middle content page *}
-{include file=$page_mid}
+{include file=$content_template}
{include file='page_footer.tpl'}
</body>
]]>
</programlisting>
<para>
- and the php script
+ And the php script
</para>
<programlisting role="php">
<![CDATA[
@@ -50,9 +49,9 @@
$mid_template = $_GET['page'].'.inc.tpl';
if( !$smarty->template_exists($mid_template) ){
- $mid_template = 'page_not_found.inc.tpl';
+ $mid_template = 'page_not_found.tpl';
}
-$smarty->assign('page_mid', $mid_template);
+$smarty->assign('content_template', $mid_template);
$smarty->display('page_container.tpl');
@@ -61,16 +60,13 @@
</programlisting>
</example>
-
-
-
<para>
See also
- <link linkend="api.display">display()</link>,
- <link linkend="api.fetch">fetch()</link>,
- <link linkend="language.function.include">{include}</link>
+ <link linkend="api.display"><varname>display()</varname></link>,
+ <link linkend="api.fetch"><varname>fetch()</varname></link>,
+ <link linkend="language.function.include"><varname>{include}</varname></link>
and
- <link linkend="language.function.insert">{insert}</link>
+ <link linkend="language.function.insert"><varname>{insert}</varname></link>
</para>
</refsect1>
</refentry>
http://cvs.php.net/viewvc.cgi/smarty/docs/en/programmers/api-functions/api-trigger-error.xml?r1=1.4&r2=1.5&diff_format=u
Index: smarty/docs/en/programmers/api-functions/api-trigger-error.xml
diff -u smarty/docs/en/programmers/api-functions/api-trigger-error.xml:1.4 smarty/docs/en/programmers/api-functions/api-trigger-error.xml:1.5
--- smarty/docs/en/programmers/api-functions/api-trigger-error.xml:1.4 Fri May 27 16:25:02 2005
+++ smarty/docs/en/programmers/api-functions/api-trigger-error.xml Tue Sep 26 23:29:02 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<refentry id="api.trigger.error">
<refnamediv>
<refname>trigger_error()</refname>
@@ -15,17 +15,18 @@
<para>
This function can be used to output an error message using Smarty.
<parameter>level</parameter> parameter can be one of the values
- used for the PHP
- <ulink url="&url.php-manual;trigger_error">trigger_error()</ulink>
- function, i.e. E_USER_NOTICE,
- E_USER_WARNING, etc. By default it's E_USER_WARNING.
+ used for the PHP <ulink url="&url.php-manual;trigger_error">
+ <varname>trigger_error()</varname></ulink> function, eg:
+ <literal>E_USER_NOTICE</literal>, <literal>E_USER_WARNING</literal>, etc.
+ By default it's <literal>E_USER_WARNING</literal>.
</para>
<para>
See also
- <link linkend="variable.error.reporting">$error_reporting</link>,
+ <link linkend="variable.error.reporting">
+ <parameter>$error_reporting</parameter></link>,
<link linkend="chapter.debugging.console">debugging</link>
and
- <link linkend="smarty.php.errors">Troubleshooting</link>.
+ <link linkend="smarty.php.errors">troubleshooting</link>.
</para>
</refsect1>
</refentry>
http://cvs.php.net/viewvc.cgi/smarty/docs/en/programmers/api-functions/api-unregister-block.xml?r1=1.3&r2=1.4&diff_format=u
Index: smarty/docs/en/programmers/api-functions/api-unregister-block.xml
diff -u smarty/docs/en/programmers/api-functions/api-unregister-block.xml:1.3 smarty/docs/en/programmers/api-functions/api-unregister-block.xml:1.4
--- smarty/docs/en/programmers/api-functions/api-unregister-block.xml:1.3 Fri May 27 16:25:02 2005
+++ smarty/docs/en/programmers/api-functions/api-unregister-block.xml Tue Sep 26 23:29:02 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<refentry id="api.unregister.block">
<refnamediv>
<refname>unregister_block()</refname>
@@ -13,15 +13,15 @@
</methodsynopsis>
<para>
Use this to dynamically unregister
- <link linkend="plugins.block.functions">block function plugins</link>.
+ <link linkend="plugins.block.functions">block function plugin</link>.
Pass in the block function <parameter>name</parameter>.
</para>
<para>
See also
- <link linkend="api.register.block">register_block()</link>
+ <link linkend="api.register.block"><varname>register_block()</varname></link>
and
- <link linkend="plugins.block.functions">Block Functions Plugins</link>.
+ <link linkend="plugins.block.functions">block functions plugins</link>.
</para>
</refsect1>
http://cvs.php.net/viewvc.cgi/smarty/docs/en/programmers/api-functions/api-unregister-compiler-function.xml?r1=1.3&r2=1.4&diff_format=u
Index: smarty/docs/en/programmers/api-functions/api-unregister-compiler-function.xml
diff -u smarty/docs/en/programmers/api-functions/api-unregister-compiler-function.xml:1.3 smarty/docs/en/programmers/api-functions/api-unregister-compiler-function.xml:1.4
--- smarty/docs/en/programmers/api-functions/api-unregister-compiler-function.xml:1.3 Fri May 27 16:25:02 2005
+++ smarty/docs/en/programmers/api-functions/api-unregister-compiler-function.xml Tue Sep 26 23:29:02 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<refentry id="api.unregister.compiler.function">
<refnamediv>
<refname>unregister_compiler_function()</refname>
@@ -18,11 +18,10 @@
<para>
See also
- <link
- linkend="api.register.compiler.function">register_compiler_function()
- </link>
+ <link linkend="api.register.compiler.function">
+ <varname>register_compiler_function()</varname></link>
and
- <link linkend="plugins.compiler.functions">Plugin Compiler Functions</link>.
+ <link linkend="plugins.compiler.functions">plugin compiler functions</link>.
</para>
</refsect1>
http://cvs.php.net/viewvc.cgi/smarty/docs/en/programmers/api-functions/api-unregister-function.xml?r1=1.3&r2=1.4&diff_format=u
Index: smarty/docs/en/programmers/api-functions/api-unregister-function.xml
diff -u smarty/docs/en/programmers/api-functions/api-unregister-function.xml:1.3 smarty/docs/en/programmers/api-functions/api-unregister-function.xml:1.4
--- smarty/docs/en/programmers/api-functions/api-unregister-function.xml:1.3 Fri May 27 16:25:02 2005
+++ smarty/docs/en/programmers/api-functions/api-unregister-function.xml Tue Sep 26 23:29:02 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<refentry id="api.unregister.function">
<refnamediv>
<refname>unregister_function</refname>
@@ -12,7 +12,7 @@
<methodparam><type>string</type><parameter>name</parameter></methodparam>
</methodsynopsis>
<para>
- Pass in the template function name.
+ Pass in the template function <parameter>name</parameter>.
</para>
<example>
<title>unregister_function</title>
@@ -29,10 +29,8 @@
</example>
<para>
- See also
- <link
- linkend="api.register.function">register_function()
- </link>.
+ See also <link linkend="api.register.function">
+ <varname>register_function()</varname></link>.
</para>
</refsect1>
http://cvs.php.net/viewvc.cgi/smarty/docs/en/programmers/api-functions/api-unregister-modifier.xml?r1=1.3&r2=1.4&diff_format=u
Index: smarty/docs/en/programmers/api-functions/api-unregister-modifier.xml
diff -u smarty/docs/en/programmers/api-functions/api-unregister-modifier.xml:1.3 smarty/docs/en/programmers/api-functions/api-unregister-modifier.xml:1.4
--- smarty/docs/en/programmers/api-functions/api-unregister-modifier.xml:1.3 Fri May 27 16:25:02 2005
+++ smarty/docs/en/programmers/api-functions/api-unregister-modifier.xml Tue Sep 26 23:29:02 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<refentry id="api.unregister.modifier">
<refnamediv>
<refname>unregister_modifier()</refname>
@@ -12,7 +12,7 @@
<methodparam><type>string</type><parameter>name</parameter></methodparam>
</methodsynopsis>
<para>
- Pass in the template modifier name.
+ Pass in the template modifier <parameter>name</parameter>.
</para>
<example>
<title>unregister_modifier()</title>
@@ -29,9 +29,9 @@
</example>
<para>
See also
- <link linkend="api.register.modifier">register_modifier()</link>
+ <link linkend="api.register.modifier"><varname>register_modifier()</varname></link>
and
- <link linkend="plugins.modifiers">Plugin modifiers</link>,
+ <link linkend="plugins.modifiers">plugin modifiers</link>,
</para>
</refsect1>
</refentry>
http://cvs.php.net/viewvc.cgi/smarty/docs/en/programmers/api-functions/api-unregister-object.xml?r1=1.4&r2=1.5&diff_format=u
Index: smarty/docs/en/programmers/api-functions/api-unregister-object.xml
diff -u smarty/docs/en/programmers/api-functions/api-unregister-object.xml:1.4 smarty/docs/en/programmers/api-functions/api-unregister-object.xml:1.5
--- smarty/docs/en/programmers/api-functions/api-unregister-object.xml:1.4 Fri May 27 16:25:02 2005
+++ smarty/docs/en/programmers/api-functions/api-unregister-object.xml Tue Sep 26 23:29:02 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<refentry id="api.unregister.object">
<refnamediv>
<refname>unregister_object()</refname>
@@ -14,7 +14,7 @@
<para>
See also
- <link linkend="api.register.object">register_object()</link>
+ <link linkend="api.register.object"><varname>register_object()</varname></link>
and
<link linkend="advanced.features.objects">objects section</link>
</para>
http://cvs.php.net/viewvc.cgi/smarty/docs/en/programmers/api-functions/api-unregister-outputfilter.xml?r1=1.3&r2=1.4&diff_format=u
Index: smarty/docs/en/programmers/api-functions/api-unregister-outputfilter.xml
diff -u smarty/docs/en/programmers/api-functions/api-unregister-outputfilter.xml:1.3 smarty/docs/en/programmers/api-functions/api-unregister-outputfilter.xml:1.4
--- smarty/docs/en/programmers/api-functions/api-unregister-outputfilter.xml:1.3 Fri May 27 16:25:02 2005
+++ smarty/docs/en/programmers/api-functions/api-unregister-outputfilter.xml Tue Sep 26 23:29:02 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<refentry id="api.unregister.outputfilter">
<refnamediv>
<refname>unregister_outputfilter()</refname>
@@ -17,10 +17,10 @@
<para>
See also
- <link linkend="api.register.outputfilter">register_outputfilter()</link>
+ <link linkend="api.register.outputfilter">
+ <varname>register_outputfilter()</varname></link>
and
- <link linkend="advanced.features.outputfilters">template
- output filters</link>.
+ <link linkend="advanced.features.outputfilters">template output filters</link>.
</para>
</refsect1>
</refentry>
http://cvs.php.net/viewvc.cgi/smarty/docs/en/programmers/api-functions/api-unregister-postfilter.xml?r1=1.3&r2=1.4&diff_format=u
Index: smarty/docs/en/programmers/api-functions/api-unregister-postfilter.xml
diff -u smarty/docs/en/programmers/api-functions/api-unregister-postfilter.xml:1.3 smarty/docs/en/programmers/api-functions/api-unregister-postfilter.xml:1.4
--- smarty/docs/en/programmers/api-functions/api-unregister-postfilter.xml:1.3 Fri May 27 16:25:02 2005
+++ smarty/docs/en/programmers/api-functions/api-unregister-postfilter.xml Tue Sep 26 23:29:02 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<refentry id="api.unregister.postfilter">
<refnamediv>
<refname>unregister_postfilter()</refname>
@@ -14,10 +14,10 @@
<para>
See also
- <link linkend="api.unregister.postfilter">register_postfilter()</link>
+ <link linkend="api.unregister.postfilter">
+ <varname>register_postfilter()</varname></link>
and
- <link linkend="plugins.prefilters.postfilters">template
- post filters</link>.
+ <link linkend="plugins.prefilters.postfilters">template post filters</link>.
</para>
</refsect1>
http://cvs.php.net/viewvc.cgi/smarty/docs/en/programmers/api-functions/api-unregister-prefilter.xml?r1=1.3&r2=1.4&diff_format=u
Index: smarty/docs/en/programmers/api-functions/api-unregister-prefilter.xml
diff -u smarty/docs/en/programmers/api-functions/api-unregister-prefilter.xml:1.3 smarty/docs/en/programmers/api-functions/api-unregister-prefilter.xml:1.4
--- smarty/docs/en/programmers/api-functions/api-unregister-prefilter.xml:1.3 Fri May 27 16:25:02 2005
+++ smarty/docs/en/programmers/api-functions/api-unregister-prefilter.xml Tue Sep 26 23:29:02 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<refentry id="api.unregister.prefilter">
<refnamediv>
<refname>unregister_prefilter()</refname>
@@ -14,7 +14,8 @@
<para>
See also
- <link linkend="api.register.prefilter">register_prefilter()</link>
+ <link linkend="api.register.prefilter">
+ <varname>register_prefilter()</varname></link>
and
<link linkend="plugins.prefilters.postfilters">pre filters</link>.
</para>
http://cvs.php.net/viewvc.cgi/smarty/docs/en/programmers/api-functions/api-unregister-resource.xml?r1=1.3&r2=1.4&diff_format=u
Index: smarty/docs/en/programmers/api-functions/api-unregister-resource.xml
diff -u smarty/docs/en/programmers/api-functions/api-unregister-resource.xml:1.3 smarty/docs/en/programmers/api-functions/api-unregister-resource.xml:1.4
--- smarty/docs/en/programmers/api-functions/api-unregister-resource.xml:1.3 Fri May 27 16:25:02 2005
+++ smarty/docs/en/programmers/api-functions/api-unregister-resource.xml Tue Sep 26 23:29:02 2006
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<refentry id="api.unregister.resource">
<refnamediv>
<refname>unregister_resource()</refname>
@@ -12,8 +12,7 @@
<methodparam><type>string</type><parameter>name</parameter></methodparam>
</methodsynopsis>
<para>
- Pass in the
- name of the resource.
+ Pass in the <parameter>name</parameter> of the resource.
</para>
<example>
<title>unregister_resource()</title>
@@ -30,7 +29,8 @@
<para>
See also
- <link linkend="api.register.resource">register_resource()</link>
+ <link linkend="api.register.resource">
+ <varname>register_resource()</varname></link>
and
<link linkend="template.resources">template resources</link>
</para>