cvs: smarty /docs/en/designers/language-modifiers language-modifier-capitalize.xml language-modifier-cat.xml language-modifier-count-characters.xml language-modifier-date-format.xml language-modifier-default.xml language-modifier-escape.xml language-modifier-indent.xml language-modifier-regex-replace.xml language-modifier-replace.xml language-modifier-spacify.xml language-modifier-string-format.xml language-modifier-strip-tags.xml language-modifier-truncate.xml language-modifier-wordwrap.xml
"Peter 'Mash' Morgan" <[email protected]>
| Newsgroups | gmane.comp.php.cvs.smarty |
|---|---|
| Message-ID | <cvspete_morgan1126634030@cvsserver> |
pete_morgan Tue Sep 13 13:53:50 2005 EDT
Modified files:
/smarty/docs/en/designers/language-modifiers
language-modifier-capitalize.xml
language-modifier-cat.xml
language-modifier-count-characters.xml
language-modifier-date-format.xml
language-modifier-default.xml
language-modifier-escape.xml
language-modifier-indent.xml
language-modifier-regex-replace.xml
language-modifier-replace.xml
language-modifier-spacify.xml
language-modifier-string-format.xml
language-modifier-strip-tags.xml
language-modifier-truncate.xml
language-modifier-wordwrap.xml
Log:
Moved description to top of page
--
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
pete_morgan-20050913135350.txt
(text/plain, 20.7 KB)
http://cvs.php.net/diff.php/smarty/docs/en/designers/language-modifiers/language-modifier-capitalize.xml?r1=1.5&r2=1.6&ty=u
Index: smarty/docs/en/designers/language-modifiers/language-modifier-capitalize.xml
diff -u smarty/docs/en/designers/language-modifiers/language-modifier-capitalize.xml:1.5 smarty/docs/en/designers/language-modifiers/language-modifier-capitalize.xml:1.6
--- smarty/docs/en/designers/language-modifiers/language-modifier-capitalize.xml:1.5 Sat Sep 10 08:46:35 2005
+++ smarty/docs/en/designers/language-modifiers/language-modifier-capitalize.xml Tue Sep 13 13:53:50 2005
@@ -1,7 +1,10 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
<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">
http://cvs.php.net/diff.php/smarty/docs/en/designers/language-modifiers/language-modifier-cat.xml?r1=1.2&r2=1.3&ty=u
Index: smarty/docs/en/designers/language-modifiers/language-modifier-cat.xml
diff -u smarty/docs/en/designers/language-modifiers/language-modifier-cat.xml:1.2 smarty/docs/en/designers/language-modifiers/language-modifier-cat.xml:1.3
--- smarty/docs/en/designers/language-modifiers/language-modifier-cat.xml:1.2 Wed May 25 15:13:20 2005
+++ smarty/docs/en/designers/language-modifiers/language-modifier-cat.xml Tue Sep 13 13:53:50 2005
@@ -1,7 +1,10 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<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">
http://cvs.php.net/diff.php/smarty/docs/en/designers/language-modifiers/language-modifier-count-characters.xml?r1=1.5&r2=1.6&ty=u
Index: smarty/docs/en/designers/language-modifiers/language-modifier-count-characters.xml
diff -u smarty/docs/en/designers/language-modifiers/language-modifier-count-characters.xml:1.5 smarty/docs/en/designers/language-modifiers/language-modifier-count-characters.xml:1.6
--- smarty/docs/en/designers/language-modifiers/language-modifier-count-characters.xml:1.5 Wed May 25 15:13:20 2005
+++ smarty/docs/en/designers/language-modifiers/language-modifier-count-characters.xml Tue Sep 13 13:53:50 2005
@@ -1,7 +1,10 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
<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">
http://cvs.php.net/diff.php/smarty/docs/en/designers/language-modifiers/language-modifier-date-format.xml?r1=1.10&r2=1.11&ty=u
Index: smarty/docs/en/designers/language-modifiers/language-modifier-date-format.xml
diff -u smarty/docs/en/designers/language-modifiers/language-modifier-date-format.xml:1.10 smarty/docs/en/designers/language-modifiers/language-modifier-date-format.xml:1.11
--- smarty/docs/en/designers/language-modifiers/language-modifier-date-format.xml:1.10 Fri Aug 5 17:59:15 2005
+++ smarty/docs/en/designers/language-modifiers/language-modifier-date-format.xml Tue Sep 13 13:53:50 2005
@@ -1,7 +1,20 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.10 $ -->
+<!-- $Revision: 1.11 $ -->
<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
http://cvs.php.net/diff.php/smarty/docs/en/designers/language-modifiers/language-modifier-default.xml?r1=1.4&r2=1.5&ty=u
Index: smarty/docs/en/designers/language-modifiers/language-modifier-default.xml
diff -u smarty/docs/en/designers/language-modifiers/language-modifier-default.xml:1.4 smarty/docs/en/designers/language-modifiers/language-modifier-default.xml:1.5
--- smarty/docs/en/designers/language-modifiers/language-modifier-default.xml:1.4 Wed May 25 15:13:20 2005
+++ smarty/docs/en/designers/language-modifiers/language-modifier-default.xml Tue Sep 13 13:53:50 2005
@@ -1,7 +1,13 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<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">
http://cvs.php.net/diff.php/smarty/docs/en/designers/language-modifiers/language-modifier-escape.xml?r1=1.5&r2=1.6&ty=u
Index: smarty/docs/en/designers/language-modifiers/language-modifier-escape.xml
diff -u smarty/docs/en/designers/language-modifiers/language-modifier-escape.xml:1.5 smarty/docs/en/designers/language-modifiers/language-modifier-escape.xml:1.6
--- smarty/docs/en/designers/language-modifiers/language-modifier-escape.xml:1.5 Wed May 25 15:13:20 2005
+++ smarty/docs/en/designers/language-modifiers/language-modifier-escape.xml Tue Sep 13 13:53:50 2005
@@ -1,7 +1,14 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
<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">
http://cvs.php.net/diff.php/smarty/docs/en/designers/language-modifiers/language-modifier-indent.xml?r1=1.4&r2=1.5&ty=u
Index: smarty/docs/en/designers/language-modifiers/language-modifier-indent.xml
diff -u smarty/docs/en/designers/language-modifiers/language-modifier-indent.xml:1.4 smarty/docs/en/designers/language-modifiers/language-modifier-indent.xml:1.5
--- smarty/docs/en/designers/language-modifiers/language-modifier-indent.xml:1.4 Wed May 25 15:13:20 2005
+++ smarty/docs/en/designers/language-modifiers/language-modifier-indent.xml Tue Sep 13 13:53:50 2005
@@ -1,7 +1,14 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<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">
http://cvs.php.net/diff.php/smarty/docs/en/designers/language-modifiers/language-modifier-regex-replace.xml?r1=1.3&r2=1.4&ty=u
Index: smarty/docs/en/designers/language-modifiers/language-modifier-regex-replace.xml
diff -u smarty/docs/en/designers/language-modifiers/language-modifier-regex-replace.xml:1.3 smarty/docs/en/designers/language-modifiers/language-modifier-regex-replace.xml:1.4
--- smarty/docs/en/designers/language-modifiers/language-modifier-regex-replace.xml:1.3 Wed May 25 15:13:20 2005
+++ smarty/docs/en/designers/language-modifiers/language-modifier-regex-replace.xml Tue Sep 13 13:53:50 2005
@@ -1,7 +1,13 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<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">
http://cvs.php.net/diff.php/smarty/docs/en/designers/language-modifiers/language-modifier-replace.xml?r1=1.4&r2=1.5&ty=u
Index: smarty/docs/en/designers/language-modifiers/language-modifier-replace.xml
diff -u smarty/docs/en/designers/language-modifiers/language-modifier-replace.xml:1.4 smarty/docs/en/designers/language-modifiers/language-modifier-replace.xml:1.5
--- smarty/docs/en/designers/language-modifiers/language-modifier-replace.xml:1.4 Sat Sep 10 08:52:18 2005
+++ smarty/docs/en/designers/language-modifiers/language-modifier-replace.xml Tue Sep 13 13:53:50 2005
@@ -1,7 +1,12 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<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">
http://cvs.php.net/diff.php/smarty/docs/en/designers/language-modifiers/language-modifier-spacify.xml?r1=1.3&r2=1.4&ty=u
Index: smarty/docs/en/designers/language-modifiers/language-modifier-spacify.xml
diff -u smarty/docs/en/designers/language-modifiers/language-modifier-spacify.xml:1.3 smarty/docs/en/designers/language-modifiers/language-modifier-spacify.xml:1.4
--- smarty/docs/en/designers/language-modifiers/language-modifier-spacify.xml:1.3 Wed May 25 15:13:20 2005
+++ smarty/docs/en/designers/language-modifiers/language-modifier-spacify.xml Tue Sep 13 13:53:50 2005
@@ -1,7 +1,11 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<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">
http://cvs.php.net/diff.php/smarty/docs/en/designers/language-modifiers/language-modifier-string-format.xml?r1=1.4&r2=1.5&ty=u
Index: smarty/docs/en/designers/language-modifiers/language-modifier-string-format.xml
diff -u smarty/docs/en/designers/language-modifiers/language-modifier-string-format.xml:1.4 smarty/docs/en/designers/language-modifiers/language-modifier-string-format.xml:1.5
--- smarty/docs/en/designers/language-modifiers/language-modifier-string-format.xml:1.4 Sat Sep 10 08:53:17 2005
+++ smarty/docs/en/designers/language-modifiers/language-modifier-string-format.xml Tue Sep 13 13:53:50 2005
@@ -1,7 +1,13 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<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">
http://cvs.php.net/diff.php/smarty/docs/en/designers/language-modifiers/language-modifier-strip-tags.xml?r1=1.3&r2=1.4&ty=u
Index: smarty/docs/en/designers/language-modifiers/language-modifier-strip-tags.xml
diff -u smarty/docs/en/designers/language-modifiers/language-modifier-strip-tags.xml:1.3 smarty/docs/en/designers/language-modifiers/language-modifier-strip-tags.xml:1.4
--- smarty/docs/en/designers/language-modifiers/language-modifier-strip-tags.xml:1.3 Wed May 25 15:13:20 2005
+++ smarty/docs/en/designers/language-modifiers/language-modifier-strip-tags.xml Tue Sep 13 13:53:50 2005
@@ -1,7 +1,11 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<sect1 id="language.modifier.strip.tags">
<title>strip_tags</title>
+ <para>
+ This strips out markup tags, basically anything between < and >.
+ </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 < and >.
- </para>
+
<example>
<title>strip_tags</title>
<programlisting role="php">
http://cvs.php.net/diff.php/smarty/docs/en/designers/language-modifiers/language-modifier-truncate.xml?r1=1.3&r2=1.4&ty=u
Index: smarty/docs/en/designers/language-modifiers/language-modifier-truncate.xml
diff -u smarty/docs/en/designers/language-modifiers/language-modifier-truncate.xml:1.3 smarty/docs/en/designers/language-modifiers/language-modifier-truncate.xml:1.4
--- smarty/docs/en/designers/language-modifiers/language-modifier-truncate.xml:1.3 Thu Aug 4 16:28:39 2005
+++ smarty/docs/en/designers/language-modifiers/language-modifier-truncate.xml Tue Sep 13 13:53:50 2005
@@ -1,7 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<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">
http://cvs.php.net/diff.php/smarty/docs/en/designers/language-modifiers/language-modifier-wordwrap.xml?r1=1.4&r2=1.5&ty=u
Index: smarty/docs/en/designers/language-modifiers/language-modifier-wordwrap.xml
diff -u smarty/docs/en/designers/language-modifiers/language-modifier-wordwrap.xml:1.4 smarty/docs/en/designers/language-modifiers/language-modifier-wordwrap.xml:1.5
--- smarty/docs/en/designers/language-modifiers/language-modifier-wordwrap.xml:1.4 Wed May 25 15:13:20 2005
+++ smarty/docs/en/designers/language-modifiers/language-modifier-wordwrap.xml Tue Sep 13 13:53:50 2005
@@ -1,7 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<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">