Moved description to top of page

This commit is contained in:
pete_morgan
2005-09-13 17:53:50 +00:00
parent 2ff942755f
commit 21e6090661
14 changed files with 101 additions and 76 deletions

View File

@@ -2,6 +2,9 @@
<!-- $Revision$ -->
<sect1 id="language.modifier.capitalize">
<title>capitalize</title>
<para>
This is used to capitalize the first letter of all words in a variable.
</para>
<informaltable frame="all">
<tgroup cols="5">
<colspec colname="param" align="center" />
@@ -30,9 +33,6 @@
</tbody>
</tgroup>
</informaltable>
<para>
This is used to capitalize the first letter of all words in a variable.
</para>
<example>
<title>capitalize</title>
<programlisting role="php">

View File

@@ -2,6 +2,9 @@
<!-- $Revision$ -->
<sect1 id="language.modifier.cat">
<title>cat</title>
<para>
This value is concatenated to the given variable.
</para>
<informaltable frame="all">
<tgroup cols="5">
<colspec colname="param" align="center" />
@@ -29,9 +32,7 @@
</tbody>
</tgroup>
</informaltable>
<para>
This value is concatenated to the given variable.
</para>
<example>
<title>cat</title>
<programlisting role="php">

View File

@@ -2,6 +2,9 @@
<!-- $Revision$ -->
<sect1 id="language.modifier.count.characters">
<title>count_characters</title>
<para>
This is used to count the number of characters in a variable.
</para>
<informaltable frame="all">
<tgroup cols="5">
<colspec colname="param" align="center" />
@@ -30,9 +33,7 @@
</tbody>
</tgroup>
</informaltable>
<para>
This is used to count the number of characters in a variable.
</para>
<example>
<title>count_characters</title>
<programlisting role="php">

View File

@@ -2,6 +2,19 @@
<!-- $Revision$ -->
<sect1 id="language.modifier.date.format">
<title>date_format</title>
<para>
This formats a date and time into the given
<ulink url="&url.php-manual;strftime">strftime()</ulink> format.
Dates can be passed to Smarty as unix
<ulink url="&url.php-manual;function.time">timestamps</ulink>, mysql timestamps
or any string made up of month day year, parsable by
<ulink url="&url.php-manual;strtotime">strtotime()</ulink>.
Designers can then use date_format to have complete control of the
formatting of the date. If the date passed to
<command>date_format</command> is empty and a second parameter is passed,
that will be used as the date to format.
</para>
<informaltable frame="all">
<tgroup cols="5">
<colspec colname="param" align="center" />
@@ -36,17 +49,8 @@
</tbody>
</tgroup>
</informaltable>
<para>
This formats a date and time into the given
<ulink url="&url.php-manual;strftime">strftime()</ulink> format.
Dates can be passed to Smarty as unix
<ulink url="&url.php-manual;function.time">timestamps</ulink>, mysql timestamps
or any string made up of month day year, parsable by
<ulink url="&url.php-manual;strtotime">strtotime()</ulink>.
Designers can then use date_format to have complete control of the
formatting of the date. If the date passed to
<command>date_format</command> is empty and a second parameter is passed,
that will be used as the date to format.
<para>
<note>
<para>
Since Smarty-2.6.10 numeric values passed to date_format are

View File

@@ -2,6 +2,12 @@
<!-- $Revision$ -->
<sect1 id="language.modifier.default">
<title>default</title>
<para>
This is used to set a default value for a variable. If the variable
is empty or unset, the given default value is printed instead.
Default takes one argument.
</para>
<informaltable frame="all">
<tgroup cols="5">
<colspec colname="param" align="center" />
@@ -30,11 +36,7 @@
</tbody>
</tgroup>
</informaltable>
<para>
This is used to set a default value for a variable. If the variable
is empty or unset, the given default value is printed instead.
Default takes one argument.
</para>
<example>
<title>default</title>
<programlisting role="php">

View File

@@ -2,6 +2,13 @@
<!-- $Revision$ -->
<sect1 id="language.modifier.escape">
<title>escape</title>
<para>
This is used to html escape, url escape, escape single quotes on a
variable not already escaped, hex escape, hexentity or javascript escape.
By default, the variable is html
escaped.
</para>
<informaltable frame="all">
<tgroup cols="6">
<colspec colname="param" align="center" />
@@ -32,12 +39,7 @@
</tbody>
</tgroup>
</informaltable>
<para>
This is used to html escape, url escape, escape single quotes on a
variable not already escaped, hex escape, hexentity or javascript escape.
By default, the variable is html
escaped.
</para>
<example>
<title>escape</title>
<programlisting role="php">

View File

@@ -2,6 +2,13 @@
<!-- $Revision$ -->
<sect1 id="language.modifier.indent">
<title>indent</title>
<para>
This indents a string at each line, default is 4. As
an optional parameter, you can specify the number of characters to
indent. As an optional second parameter, you can specify the
character to use to indent with. (Use "\t" for tabs.)
</para>
<informaltable frame="all">
<tgroup cols="5">
<colspec colname="param" align="center" />
@@ -37,12 +44,7 @@
</tbody>
</tgroup>
</informaltable>
<para>
This indents a string at each line, default is 4. As
an optional parameter, you can specify the number of characters to
indent. As an optional second parameter, you can specify the
character to use to indent with. (Use "\t" for tabs.)
</para>
<example>
<title>indent</title>
<programlisting role="php">

View File

@@ -2,6 +2,12 @@
<!-- $Revision$ -->
<sect1 id="language.modifier.regex.replace">
<title>regex_replace</title>
<para>
A regular expression search and replace on a variable. Use the
syntax for <ulink
url="&url.php-manual;preg_replace">preg_replace()</ulink> from the PHP manual.
</para>
<informaltable frame="all">
<tgroup cols="5">
<colspec colname="param" align="center" />
@@ -36,11 +42,7 @@
</tbody>
</tgroup>
</informaltable>
<para>
A regular expression search and replace on a variable. Use the
syntax for <ulink
url="&url.php-manual;preg_replace">preg_replace()</ulink> from the PHP manual.
</para>
<example>
<title>regex_replace</title>
<programlisting role="php">

View File

@@ -2,6 +2,11 @@
<!-- $Revision$ -->
<sect1 id="language.modifier.replace">
<title>replace</title>
<para>
A simple search and replace on a variable. This is equivalent to the PHP
<ulink url="&url.php-manual;str_replace">str_replace()</ulink> function.
</para>
<informaltable frame="all">
<tgroup cols="5">
<colspec colname="param" align="center" />
@@ -36,10 +41,7 @@
</tbody>
</tgroup>
</informaltable>
<para>
A simple search and replace on a variable. This is equivalent to the PHP
<ulink url="&url.php-manual;str_replace">str_replace()</ulink> function.
</para>
<example>
<title>replace</title>
<programlisting role="php">

View File

@@ -2,6 +2,10 @@
<!-- $Revision$ -->
<sect1 id="language.modifier.spacify">
<title>spacify</title>
<para>
spacify is a way to insert a space between every character of a variable.
You can optionally pass a different character (or string) to insert.
</para>
<informaltable frame="all">
<tgroup cols="5">
<colspec colname="param" align="center" />
@@ -30,10 +34,7 @@
</tbody>
</tgroup>
</informaltable>
<para>
spacify is a way to insert a space between every character of a variable.
You can optionally pass a different character (or string) to insert.
</para>
<example>
<title>spacify</title>
<programlisting role="php">

View File

@@ -2,6 +2,12 @@
<!-- $Revision$ -->
<sect1 id="language.modifier.string.format">
<title>string_format</title>
<para>
This is a way to format strings, such as decimal numbers and such.
Use the syntax for <ulink url="&url.php-manual;sprintf">sprintf()</ulink>
for the formatting.
</para>
<informaltable frame="all">
<tgroup cols="5">
<colspec colname="param" align="center" />
@@ -29,11 +35,7 @@
</tbody>
</tgroup>
</informaltable>
<para>
This is a way to format strings, such as decimal numbers and such.
Use the syntax for <ulink url="&url.php-manual;sprintf">sprintf()</ulink>
for the formatting.
</para>
<example>
<title>string_format</title>
<programlisting role="php">

View File

@@ -2,6 +2,10 @@
<!-- $Revision$ -->
<sect1 id="language.modifier.strip.tags">
<title>strip_tags</title>
<para>
This strips out markup tags, basically anything between &lt; and &gt;.
</para>
<informaltable frame="all">
<tgroup cols="5">
<colspec colname="param" align="center" />
@@ -29,9 +33,7 @@
</tbody>
</tgroup>
</informaltable>
<para>
This strips out markup tags, basically anything between &lt; and &gt;.
</para>
<example>
<title>strip_tags</title>
<programlisting role="php">

View File

@@ -2,6 +2,16 @@
<!-- $Revision$ -->
<sect1 id="language.modifier.truncate">
<title>truncate</title>
<para>
This truncates a variable to a character length, default is 80. As
an optional second parameter, you can specify a string of text
to display at the end if the variable was truncated. The
characters in the string are included with the original truncation length.
By default, truncate will attempt to cut off at a word boundary. If
you want to cut off at the exact character length, pass the optional
third parameter of true.
</para>
<informaltable frame="all">
<tgroup cols="5">
<colspec colname="param" align="center" />
@@ -55,15 +65,7 @@
</tbody>
</tgroup>
</informaltable>
<para>
This truncates a variable to a character length, default is 80. As
an optional second parameter, you can specify a string of text
to display at the end if the variable was truncated. The
characters in the string are included with the original truncation length.
By default, truncate will attempt to cut off at a word boundary. If
you want to cut off at the exact character length, pass the optional
third parameter of true.
</para>
<example>
<title>truncate</title>
<programlisting role="php">

View File

@@ -2,6 +2,16 @@
<!-- $Revision$ -->
<sect1 id="language.modifier.wordwrap">
<title>wordwrap</title>
<para>
<command>wordwrap</command> wraps a string to a column width, default is 80. As
an optional second parameter, you can specify a string of text
to wrap the text to the next line (default is carriage return \n).
By default, {wordwrap} will attempt to wrap at a word boundary. If
you want to cut off at the exact character length, pass the optional
third parameter of true. This is equivalent to the PHP <ulink
url="&url.php-manual;wordwrap">wordwrap()</ulink> function.
</para>
<informaltable frame="all">
<tgroup cols="5">
<colspec colname="param" align="center" />
@@ -45,15 +55,7 @@
</tbody>
</tgroup>
</informaltable>
<para>
<command>wordwrap</command> wraps a string to a column width, default is 80. As
an optional second parameter, you can specify a string of text
to wrap the text to the next line (default is carriage return \n).
By default, {wordwrap} will attempt to wrap at a word boundary. If
you want to cut off at the exact character length, pass the optional
third parameter of true. This is equivalent to the PHP <ulink
url="&url.php-manual;wordwrap">wordwrap()</ulink> function.
</para>
<example>
<title>wordwrap</title>
<programlisting role="php">