cvs: smarty /docs/en/designers language-modifiers.xml

"Mehdi Achour" <[email protected]>
Newsgroups gmane.comp.php.cvs.smarty
Message-ID <cvsdidou1080732014@cvsserver>
didou		Wed Mar 31 06:20:14 2004 EDT

  Modified files:              
    /smarty/docs/en/designers	language-modifiers.xml 
  Log:
  cleaned the WS in this file and added more CDATA
  # if I ever see a bad WS in this file, I'll kill someone :)

-- 
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
didou-20040331062014.txt (text/plain, 68.6 KB)
http://cvs.php.net/diff.php/smarty/docs/en/designers/language-modifiers.xml?r1=1.5&r2=1.6&ty=u
Index: smarty/docs/en/designers/language-modifiers.xml
diff -u smarty/docs/en/designers/language-modifiers.xml:1.5 smarty/docs/en/designers/language-modifiers.xml:1.6
--- smarty/docs/en/designers/language-modifiers.xml:1.5	Wed Mar 31 05:12:10 2004
+++ smarty/docs/en/designers/language-modifiers.xml	Wed Mar 31 06:20:13 2004
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
 <chapter id="language.modifiers">
  <title>Variable Modifiers</title>
  <para>
@@ -338,711 +338,794 @@
 ]]>
    </screen>
   </example>
- </sect1> <!-- didou -->
-     <sect1 id="language.modifier.date.format">
-      <title>date_format</title>
-      <informaltable frame="all">
-       <tgroup cols="5">
-        <colspec colname="param" align="center" />
-        <colspec colname="type" align="center" />
-        <colspec colname="required" align="center" />
-        <colspec colname="default" align="center" />
-        <colspec colname="desc" />
-        <thead>
-         <row>
-          <entry>Parameter Position</entry>
-          <entry>Type</entry>
-          <entry>Required</entry>
-          <entry>Default</entry>
-          <entry>Description</entry>
-         </row>
-        </thead>
-        <tbody>
-         <row>
-          <entry>1</entry>
-          <entry>string</entry>
-          <entry>No</entry>
-          <entry>%b %e, %Y</entry>
-          <entry>This is the format for the outputted date.</entry>
-         </row>
-         <row>
-          <entry>2</entry>
-          <entry>string</entry>
-          <entry>No</entry>
-          <entry>n/a</entry>
-          <entry>This is the default date if the input is empty.</entry>
-         </row>
-        </tbody>
-       </tgroup>
-      </informaltable>
-      <para>
-       This formats a date and time into the given strftime() format.
-       Dates can be passed to Smarty as unix timestamps, mysql timestamps
-       or any string made up of month day year (parsable by strtotime).
-       Designers can then use date_format to have complete control of the
-       formatting of the date. If the date passed to date_format is empty
-       and a second parameter is passed, that will be used as the date to
-       format.
-      </para>
-      <example>
-       <title>date_format</title>
-       <programlisting>
-        index.php:
-        
-        $smarty = new Smarty;
-        $smarty-&gt;assign('yesterday', strtotime('-1 day'));
-        $smarty-&gt;display('index.tpl');
-        
-        index.tpl:
-        
-        
-        {$smarty.now|date_format}
-        {$smarty.now|date_format:"%A, %B %e, %Y"}
-        {$smarty.now|date_format:"%H:%M:%S"}
-        {$yesterday|date_format}
-        {$yesterday|date_format:"%A, %B %e, %Y"}
-        {$yesterday|date_format:"%H:%M:%S"}
-        
-        OUTPUT:
-        
-        Feb 6, 2001
-        Tuesday, February 6, 2001
-        14:33:00
-        Feb 5, 2001
-        Monday, February 5, 2001
-        14:33:00</programlisting>
-       </example>
-       <para>
-        date_format conversion specifiers:
-        <itemizedlist>
-         <listitem><para>
-          %a - abbreviated weekday name according to the current locale
-         </para></listitem>
-         <listitem><para>
-          %A - full weekday name according to the current locale
-         </para></listitem>
-         <listitem><para>
-          %b - abbreviated month name according to the current locale
-         </para></listitem>
-         <listitem><para>
-          %B - full month name according to the current locale
-         </para></listitem>
-         <listitem><para>
-          %c - preferred date and time representation for the current locale
-         </para></listitem>
-         <listitem><para>
-          %C - century number (the year divided by 100 and truncated to an integer, range 00 to 99)
-         </para></listitem>
-         <listitem><para>
-          %d - day of the month as a decimal number (range 00 to 31)
-         </para></listitem>
-         <listitem><para>
-          %D - same as %m/%d/%y
-         </para></listitem>
-         <listitem><para>
-          %e - day of the month as a decimal number, a single digit is preceded by a space (range 1 to 31)
-         </para></listitem>
-         <listitem><para>
-          %g - Week-based year within century [00,99]
-         </para></listitem>
-         <listitem><para>
-          %G - Week-based year, including the century [0000,9999]
-         </para></listitem>
-         <listitem><para>
-          %h - same as %b
-         </para></listitem>
-         <listitem><para>
-          %H - hour as a decimal number using a 24-hour clock (range 00 to 23)
-         </para></listitem>
-         <listitem><para>
-          %I - hour as a decimal number using a 12-hour clock (range 01 to 12)
-         </para></listitem>
-         <listitem><para>
-          %j - day of the year as a decimal number (range 001 to 366)
-         </para></listitem>
-         <listitem><para>
-          %k - Hour (24-hour clock) single digits are preceded by a blank. (range 0 to 23)
-         </para></listitem>
-         <listitem><para>
-          %l - hour as a decimal number using a 12-hour clock, single digits preceeded by a space (range 1 to 12)
-         </para></listitem>
-         <listitem><para>
-          %m - month as a decimal number (range 01 to 12)
-         </para></listitem>
-         <listitem><para>
-          %M - minute as a decimal number
-         </para></listitem>
-         <listitem><para>
-          %n - newline character
-         </para></listitem>
-         <listitem><para>
-          %p - either `am' or `pm' according to the given time value, or the corresponding strings for the current locale
-         </para></listitem>
-         <listitem><para>
-          %r - time in a.m. and p.m. notation
-         </para></listitem>
-         <listitem><para>
-          %R - time in 24 hour notation
-         </para></listitem>
-         <listitem><para>
-          %S - second as a decimal number
-         </para></listitem>
-         <listitem><para>
-          %t - tab character
-         </para></listitem>
-         <listitem><para>
-          %T - current time, equal to %H:%M:%S
-         </para></listitem>
-         <listitem><para>
-          %u - weekday as a decimal number [1,7], with 1 representing Monday
-         </para></listitem>
-         <listitem><para>
-          %U - week number of the current year as a decimal number, starting with the first Sunday as the first day of the first week
-         </para></listitem>
-         <listitem><para>
-          %V - The ISO 8601:1988 week number of the current year as a decimal number, range 01 to 53, where week 1 is the first week that has at least 4 days in the current year, and with Monday as the first day of the week.
-         </para></listitem>
-         <listitem><para>
-          %w - day of the week as a decimal, Sunday being 0
-         </para></listitem>
-         <listitem><para>
-          %W - week number of the current year as a decimal number, starting with the first Monday as the first day of the first week
-         </para></listitem>
-         <listitem><para>
-          %x - preferred date representation for the current locale without the time
-         </para></listitem>
-         <listitem><para>
-          %X - preferred time representation for the current locale without the date
-         </para></listitem>
-         <listitem><para>
-          %y - year as a decimal number without a century (range 00 to 99)
-         </para></listitem>
-         <listitem><para>
-          %Y - year as a decimal number including the century
-         </para></listitem>
-         <listitem><para>
-          %Z - time zone or name or abbreviation
-         </para></listitem>
-         <listitem><para>
-          %% - a literal `%' character
-         </para></listitem>
-        </itemizedlist>
-        <note>
-         <title>Programmers note</title>
-         <para>
-          date_format is essentially a wrapper to PHP's strftime()
-          function. You may have more or less conversion specifiers available depending
-          on your system's strftime() function where PHP was compiled. Check your
-          system's manpage for a full list of valid specifiers.
-         </para>
-        </note>
-       </para>
-       
-      </sect1>
-      <sect1 id="language.modifier.default">
-       <title>default</title>
-       <informaltable frame="all">
-        <tgroup cols="5">
-         <colspec colname="param" align="center" />
-         <colspec colname="type" align="center" />
-         <colspec colname="required" align="center" />
-         <colspec colname="default" align="center" />
-         <colspec colname="desc" />
-         <thead>
-          <row>
-           <entry>Parameter Position</entry>
-           <entry>Type</entry>
-           <entry>Required</entry>
-           <entry>Default</entry>
-           <entry>Description</entry>
-          </row>
-         </thead>
-         <tbody>
-          <row>
-           <entry>1</entry>
-           <entry>string</entry>
-           <entry>No</entry>
-           <entry><emphasis>empty</emphasis></entry>
-           <entry>This is the default value to output if the
-            variable is empty.</entry>
-           </row>
-          </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>
-          index.php:
-          
-          $smarty = new Smarty;
-          $smarty-&gt;assign('articleTitle', 'Dealers Will Hear Car Talk at Noon.');
-          $smarty-&gt;display('index.tpl');
-          
-          index.tpl:
-          
-          {$articleTitle|default:"no title"}
-          {$myTitle|default:"no title"}
-          
-          OUTPUT:
-          
-          Dealers Will Hear Car Talk at Noon.
-          no title</programlisting>
-         </example>
-        </sect1>
-        <sect1 id="language.modifier.escape">
-         <title>escape</title>
-         <informaltable frame="all">
-          <tgroup cols="6">
-           <colspec colname="param" align="center" />
-           <colspec colname="type" align="center" />
-           <colspec colname="required" align="center" />
-           <colspec colname="possible" align="center" />
-           <colspec colname="default" align="center" />
-           <colspec colname="desc" />
-           <thead>
-            <row>
-             <entry>Parameter Position</entry>
-             <entry>Type</entry>
-             <entry>Required</entry>
-             <entry>Possible Values</entry>
-             <entry>Default</entry>
-             <entry>Description</entry>
-            </row>
-           </thead>
-           <tbody>
-            <row>
-             <entry>1</entry>
-             <entry>string</entry>
-             <entry>No</entry>
-             <entry>html,htmlall,url,quotes,hex,hexentity,javascript</entry>
-             <entry>html</entry>
-             <entry>This is the escape format to use.</entry>
-            </row>
-           </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>
-           index.php:
-           
-           $smarty = new Smarty;
-           $smarty-&gt;assign('articleTitle', "'Stiff Opposition Expected to Casketless Funeral Plan'");
-           $smarty-&gt;display('index.tpl');
-           
-           index.tpl:
-           
-           {$articleTitle}
-           {$articleTitle|escape}
-           {$articleTitle|escape:"html"}    {* escapes  &amp; &quot; &#039; &lt; &gt; *}
-           {$articleTitle|escape:"htmlall"} {* escapes ALL html entities *}
-           {$articleTitle|escape:"url"}
-           {$articleTitle|escape:"quotes"}
-           &lt;a href="mailto:{$EmailAddress|escape:"hex"}"&gt;{$EmailAddress|escape:"hexentity"}&lt;/a&gt;
-           
-           OUTPUT:
-           
-           'Stiff Opposition Expected to Casketless Funeral Plan'
-           &#039;Stiff Opposition Expected to Casketless Funeral Plan&#039;
-           &#039;Stiff Opposition Expected to Casketless Funeral Plan&#039;
-           &#039;Stiff Opposition Expected to Casketless Funeral Plan&#039;
-           %27Stiff+Opposition+Expected+to+Casketless+Funeral+Plan%27
-           \'Stiff Opposition Expected to Casketless Funeral Plan\'
-           &lt;a href=&quot;mailto:%62%6f%62%40%6d%65%2e%6e%65%74&quot;&gt;&#x62;&#x6f;&#x62;&#x40;&#x6d;&#x65;&#x2e;&#x6e;&#x65;&#x74;&lt;/a&gt;</programlisting>
-          </example>
-         </sect1>
-         <sect1 id="language.modifier.indent">
-          <title>indent</title>
-          <informaltable frame="all">
-           <tgroup cols="5">
-            <colspec colname="param" align="center" />
-            <colspec colname="type" align="center" />
-            <colspec colname="required" align="center" />
-            <colspec colname="default" align="center" />
-            <colspec colname="desc" />
-            <thead>
-             <row>
-              <entry>Parameter Position</entry>
-              <entry>Type</entry>
-              <entry>Required</entry>
-              <entry>Default</entry>
-              <entry>Description</entry>
-             </row>
-            </thead>
-            <tbody>
-             <row>
-              <entry>1</entry>
-              <entry>integer</entry>
-              <entry>No</entry>
-              <entry>4</entry>
-              <entry>This determines how many characters to indent
-               to.</entry>
-              </row>
-              <row>
-               <entry>2</entry>
-               <entry>string</entry>
-               <entry>No</entry>
-               <entry>(one space)</entry>
-               <entry>This is the character used to indent with.</entry>
-              </row>
-             </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>
-             index.php:
-             
-             $smarty = new Smarty;
-             $smarty-&gt;assign('articleTitle', 'NJ judge to rule on nude beach.');
-             $smarty-&gt;display('index.tpl');
-             
-             index.tpl:
-             
-             {$articleTitle}
-             
-             {$articleTitle|indent}
-             
-             {$articleTitle|indent:10}
-             
-             {$articleTitle|indent:1:"\t"}
-             
-             OUTPUT:
-             
-             NJ judge to rule on nude beach.
-             Sun or rain expected today, dark tonight.
-             Statistics show that teen pregnancy drops off significantly after 25.
-             
-             NJ judge to rule on nude beach.
-             Sun or rain expected today, dark tonight.
-             Statistics show that teen pregnancy drops off significantly after 25.
-             
-             NJ judge to rule on nude beach.
-             Sun or rain expected today, dark tonight.
-             Statistics show that teen pregnancy drops off significantly after 25.
-             
-             NJ judge to rule on nude beach.
-             Sun or rain expected today, dark tonight.
-             Statistics show that teen pregnancy drops off significantly after 25.</programlisting>
-            </example>
-           </sect1>
-           <sect1 id="language.modifier.lower">
-            <title>lower</title>
-            <para>
-             This is used to lowercase a variable.
-            </para>
-            <example>
-             <title>lower</title>
-             <programlisting>
-              index.php:
-              
-              $smarty = new Smarty;
-              $smarty-&gt;assign('articleTitle', 'Two Convicts Evade Noose, Jury Hung.');
-              $smarty-&gt;display('index.tpl');
-              
-              index.tpl:
-              
-              {$articleTitle}
-              {$articleTitle|lower}
-              
-              OUTPUT:
-              
-              Two Convicts Evade Noose, Jury Hung.
-              two convicts evade noose, jury hung.</programlisting>
-             </example>
-            </sect1>
-            <sect1 id="language.modifier.nl2br">
-             <title>nl2br</title>
-             <para>
-              All linebreaks will be converted to &lt;br /&gt; tags in the given
-              variable. This is equivalent to the PHP nl2br() function.
-             </para>
-             <example>
-              <title>nl2br</title>
-              <programlisting>
-               index.php:
-               
-               $smarty = new Smarty;
-               $smarty-&gt;assign('articleTitle', "Sun or rain expected\ntoday, dark tonight");
-               $smarty-&gt;display('index.tpl');
-               
-               index.tpl:
-               
-               {$articleTitle|nl2br}
-               
-               OUTPUT:
-               
-               Sun or rain expected&lt;br /&gt;today, dark tonight</programlisting>
-              </example>
-             </sect1>
-             <sect1 id="language.modifier.regex.replace">
-              <title>regex_replace</title>
-              <informaltable frame="all">
-               <tgroup cols="5">
-                <colspec colname="param" align="center" />
-                <colspec colname="type" align="center" />
-                <colspec colname="required" align="center" />
-                <colspec colname="default" align="center" />
-                <colspec colname="desc"/>
-                <thead>
-                 <row>
-                  <entry>Parameter Position</entry>
-                  <entry>Type</entry>
-                  <entry>Required</entry>
-                  <entry>Default</entry>
-                  <entry>Description</entry>
-                 </row>
-                </thead>
-                <tbody>
-                 <row>
-                  <entry>1</entry>
-                  <entry>string</entry>
-                  <entry>Yes</entry>
-                  <entry><emphasis>n/a</emphasis></entry>
-                  <entry>This is the regular expression to be replaced.</entry>
-                 </row>
-                 <row>
-                  <entry>2</entry>
-                  <entry>string</entry>
-                  <entry>Yes</entry>
-                  <entry><emphasis>n/a</emphasis></entry>
-                  <entry>This is the string of text to replace with.</entry>
-                 </row>
-                </tbody>
-               </tgroup>
-              </informaltable>
-              <para>
-               A regular expression search and replace on a variable. Use the
-               syntax for preg_replace() from the PHP manual.
-              </para>
-              <example>
-               <title>regex_replace</title>
-               <programlisting>
-                index.php:
-                
-                $smarty = new Smarty;
-                $smarty-&gt;assign('articleTitle', "Infertility unlikely to\nbe passed on, experts say.");
-                $smarty-&gt;display('index.tpl');
-                
-                index.tpl:
-                
-                {* replace each carriage return, tab &amp; new line with a space *}
-                
-                {$articleTitle}
-                {$articleTitle|regex_replace:"/[\r\t\n]/":" "}
-                
-                OUTPUT:
-                
-                Infertility unlikely to
-                be passed on, experts say.
-                Infertility unlikely to be passed on, experts say.</programlisting>
-               </example>
-              </sect1>
-              <sect1 id="language.modifier.replace">
-               <title>replace</title>
-               <informaltable frame="all">
-                <tgroup cols="5">
-                 <colspec colname="param" align="center" />
-                 <colspec colname="type" align="center" />
-                 <colspec colname="required" align="center" />
-                 <colspec colname="default" align="center" />
-                 <colspec colname="desc"/>
-                 <thead>
-                  <row>
-                   <entry>Parameter Position</entry>
-                   <entry>Type</entry>
-                   <entry>Required</entry>
-                   <entry>Default</entry>
-                   <entry>Description</entry>
-                  </row>
-                 </thead>
-                 <tbody>
-                  <row>
-                   <entry>1</entry>
-                   <entry>string</entry>
-                   <entry>Yes</entry>
-                   <entry><emphasis>n/a</emphasis></entry>
-                   <entry>This is the string of text to be replaced.</entry>
-                  </row>
-                  <row>
-                   <entry>2</entry>
-                   <entry>string</entry>
-                   <entry>Yes</entry>
-                   <entry><emphasis>n/a</emphasis></entry>
-                   <entry>This is the string of text to replace with.</entry>
-                  </row>
-                 </tbody>
-                </tgroup>
-               </informaltable>
-               <para>
-                A simple search and replace on a variable.
-               </para>
-               <example>
-                <title>replace</title>
-                <programlisting>
-                 index.php:
-                 
-                 $smarty = new Smarty;
-                 $smarty-&gt;assign('articleTitle', "Child's Stool Great for Use in Garden.");
-                 $smarty-&gt;display('index.tpl');
-                 
-                 index.tpl:
-                 
-                 {$articleTitle}
-                 {$articleTitle|replace:"Garden":"Vineyard"}
-                 {$articleTitle|replace:" ":"   "}
-                 
-                 OUTPUT:
-                 
-                 Child's Stool Great for Use in Garden.
-                 Child's Stool Great for Use in Vineyard.
-                 Child's   Stool   Great   for   Use   in   Garden.</programlisting>
-                </example>
-               </sect1>
-               <sect1 id="language.modifier.spacify">
-                <title>spacify</title>
-                <informaltable frame="all">
-                 <tgroup cols="5">
-                  <colspec colname="param" align="center" />
-                  <colspec colname="type" align="center" />
-                  <colspec colname="required" align="center" />
-                  <colspec colname="default" align="center" />
-                  <colspec colname="desc"/>
-                  <thead>
-                   <row>
-                    <entry>Parameter Position</entry>
-                    <entry>Type</entry>
-                    <entry>Required</entry>
-                    <entry>Default</entry>
-                    <entry>Description</entry>
-                   </row>
-                  </thead>
-                  <tbody>
-                   <row>
-                    <entry>1</entry>
-                    <entry>string</entry>
-                    <entry>No</entry>
-                    <entry><emphasis>one space</emphasis></entry>
-                    <entry>This what gets inserted between each character of
-                     the variable.</entry>
-                    </row>
-                   </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>
-                   index.php:
-                   
-                   $smarty = new Smarty;
-                   $smarty-&gt;assign('articleTitle', 'Something Went Wrong in Jet Crash, Experts Say.');
-                   $smarty-&gt;display('index.tpl');
-                   
-                   index.tpl:
-                   
-                   {$articleTitle}
-                   {$articleTitle|spacify}
-                   {$articleTitle|spacify:"^^"}
-                   
-                   OUTPUT:
-                   
-                   Something Went Wrong in Jet Crash, Experts Say.
-                   S o m e t h i n g   W e n t   W r o n g   i n   J e t   C r a s h ,   E x p e r t s   S a y .
-                   S^^o^^m^^e^^t^^h^^i^^n^^g^^ ^^W^^e^^n^^t^^ ^^W^^r^^o^^n^^g^^ ^^i^^n^^ ^^J^^e^^t^^ ^^C^^r^^a^^s^^h^^,^^ ^^E^^x^^p^^e^^r^^t^^s^^ ^^S^^a^^y^^.</programlisting>
-                  </example>
-                 </sect1>
-                 <sect1 id="language.modifier.string.format">
-                  <title>string_format</title>
-                  <informaltable frame="all">
-                   <tgroup cols="5">
-                    <colspec colname="param" align="center" />
-                    <colspec colname="type" align="center" />
-                    <colspec colname="required" align="center" />
-                    <colspec colname="default" align="center" />
-                    <colspec colname="desc"/>
-                    <thead>
-                     <row>
-                      <entry>Parameter Position</entry>
-                      <entry>Type</entry>
-                      <entry>Required</entry>
-                      <entry>Default</entry>
-                      <entry>Description</entry>
-                     </row>
-                    </thead>
-                    <tbody>
-                     <row>
-                      <entry>1</entry>
-                      <entry>string</entry>
-                      <entry>Yes</entry>
-                      <entry><emphasis>n/a</emphasis></entry>
-                      <entry>This is what format to use. (sprintf)</entry>
-                     </row>
-                    </tbody>
-                   </tgroup>
-                  </informaltable>
-                  <para>
-                   This is a way to format strings, such as decimal numbers and such.
-                   Use the syntax for sprintf for the formatting.
-                  </para>
-                  <example>
-                   <title>string_format</title>
-                   <programlisting>
-                    index.php:
-                    
-                    $smarty = new Smarty;
-                    $smarty-&gt;assign('number', 23.5787446);
-                    $smarty-&gt;display('index.tpl');
-                    
-                    index.tpl:
-                    
-                    {$number}
-                    {$number|string_format:"%.2f"}
-                    {$number|string_format:"%d"}
-                    
-                    OUTPUT:
-                    
-                    23.5787446
-                    23.58
-                    24</programlisting>
-                   </example>
-                  </sect1>
-                  <sect1 id="language.modifier.strip">
-                   <title>strip</title>
-                   <para>
-                    This replaces all repeated spaces, newlines and tabs with a single
-                    space, or with a supplied string.
-                   </para>
-                   <note>
-                    <title>Note</title>
-                    <para>
-                     If you want to strip blocks of template text, use the <link
-                     linkend="language.function.strip">strip function</link>.
-                    </para>
-                   </note>
-                   <example>
-                    <title>strip</title>
-                    <programlisting>
+ </sect1>
+ <sect1 id="language.modifier.date.format">
+  <title>date_format</title>
+  <informaltable frame="all">
+   <tgroup cols="5">
+    <colspec colname="param" align="center" />
+    <colspec colname="type" align="center" />
+    <colspec colname="required" align="center" />
+    <colspec colname="default" align="center" />
+    <colspec colname="desc" />
+    <thead>
+     <row>
+      <entry>Parameter Position</entry>
+      <entry>Type</entry>
+      <entry>Required</entry>
+      <entry>Default</entry>
+      <entry>Description</entry>
+     </row>
+    </thead>
+    <tbody>
+     <row>
+      <entry>1</entry>
+      <entry>string</entry>
+      <entry>No</entry>
+      <entry>%b %e, %Y</entry>
+      <entry>This is the format for the outputted date.</entry>
+     </row>
+     <row>
+      <entry>2</entry>
+      <entry>string</entry>
+      <entry>No</entry>
+      <entry>n/a</entry>
+      <entry>This is the default date if the input is empty.</entry>
+     </row>
+    </tbody>
+   </tgroup>
+  </informaltable>
+  <para>
+   This formats a date and time into the given strftime() format.
+   Dates can be passed to Smarty as unix timestamps, mysql timestamps
+   or any string made up of month day year (parsable by strtotime).
+   Designers can then use date_format to have complete control of the
+   formatting of the date. If the date passed to date_format is empty
+   and a second parameter is passed, that will be used as the date to
+   format.
+  </para>
+  <example>
+   <title>date_format</title>
+   <programlisting role="php">
+<![CDATA[
+<?php
+    
+$smarty = new Smarty;
+$smarty->assign('yesterday', strtotime('-1 day'));
+$smarty->display('index.tpl');
+    
+?>
+]]>
+   </programlisting>
+   <para>
+    Where index.tpl is:
+   </para>
+   <programlisting>
+<![CDATA[
+{$smarty.now|date_format}
+{$smarty.now|date_format:"%A, %B %e, %Y"}
+{$smarty.now|date_format:"%H:%M:%S"}
+{$yesterday|date_format}
+{$yesterday|date_format:"%A, %B %e, %Y"}
+{$yesterday|date_format:"%H:%M:%S"}
+]]>
+   </programlisting>
+   <para>
+    This will output:
+   </para>
+   <screen>
+<![CDATA[
+Feb 6, 2001
+Tuesday, February 6, 2001
+14:33:00
+Feb 5, 2001
+Monday, February 5, 2001
+14:33:00
+]]>
+   </screen>
+  </example>
+  <para>
+   date_format conversion specifiers:
+   <itemizedlist>
+    <listitem><para>
+     %a - abbreviated weekday name according to the current locale
+    </para></listitem>
+    <listitem><para>
+     %A - full weekday name according to the current locale
+    </para></listitem>
+    <listitem><para>
+     %b - abbreviated month name according to the current locale
+    </para></listitem>
+    <listitem><para>
+     %B - full month name according to the current locale
+    </para></listitem>
+    <listitem><para>
+     %c - preferred date and time representation for the current locale
+    </para></listitem>
+    <listitem><para>
+     %C - century number (the year divided by 100 and truncated to an integer, range 00 to 99)
+    </para></listitem>
+    <listitem><para>
+     %d - day of the month as a decimal number (range 00 to 31)
+    </para></listitem>
+    <listitem><para>
+     %D - same as %m/%d/%y
+    </para></listitem>
+    <listitem><para>
+     %e - day of the month as a decimal number, a single digit is preceded by a space (range 1 to 31)
+    </para></listitem>
+    <listitem><para>
+     %g - Week-based year within century [00,99]
+    </para></listitem>
+    <listitem><para>
+     %G - Week-based year, including the century [0000,9999]
+    </para></listitem>
+    <listitem><para>
+     %h - same as %b
+    </para></listitem>
+    <listitem><para>
+     %H - hour as a decimal number using a 24-hour clock (range 00 to 23)
+    </para></listitem>
+    <listitem><para>
+     %I - hour as a decimal number using a 12-hour clock (range 01 to 12)
+    </para></listitem>
+    <listitem><para>
+     %j - day of the year as a decimal number (range 001 to 366)
+    </para></listitem>
+    <listitem><para>
+     %k - Hour (24-hour clock) single digits are preceded by a blank. (range 0 to 23)
+    </para></listitem>
+    <listitem><para>
+     %l - hour as a decimal number using a 12-hour clock, single digits preceeded by a space (range 1 to 12)
+    </para></listitem>
+    <listitem><para>
+     %m - month as a decimal number (range 01 to 12)
+    </para></listitem>
+    <listitem><para>
+     %M - minute as a decimal number
+    </para></listitem>
+    <listitem><para>
+     %n - newline character
+    </para></listitem>
+    <listitem><para>
+     %p - either `am' or `pm' according to the given time value, or the corresponding strings for the current locale
+    </para></listitem>
+    <listitem><para>
+     %r - time in a.m. and p.m. notation
+    </para></listitem>
+    <listitem><para>
+     %R - time in 24 hour notation
+    </para></listitem>
+    <listitem><para>
+     %S - second as a decimal number
+    </para></listitem>
+    <listitem><para>
+     %t - tab character
+    </para></listitem>
+    <listitem><para>
+     %T - current time, equal to %H:%M:%S
+    </para></listitem>
+    <listitem><para>
+     %u - weekday as a decimal number [1,7], with 1 representing Monday
+    </para></listitem>
+    <listitem><para>
+     %U - week number of the current year as a decimal number, starting with the first Sunday as the first day of the first week
+    </para></listitem>
+    <listitem><para>
+     %V - The ISO 8601:1988 week number of the current year as a decimal number, range 01 to 53, where week 1 is the first week that has at least 4 days in the current year, and with Monday as the first day of the week.
+    </para></listitem>
+    <listitem><para>
+     %w - day of the week as a decimal, Sunday being 0
+    </para></listitem>
+    <listitem><para>
+     %W - week number of the current year as a decimal number, starting with the first Monday as the first day of the first week
+    </para></listitem>
+    <listitem><para>
+     %x - preferred date representation for the current locale without the time
+    </para></listitem>
+    <listitem><para>
+     %X - preferred time representation for the current locale without the date
+    </para></listitem>
+    <listitem><para>
+     %y - year as a decimal number without a century (range 00 to 99)
+    </para></listitem>
+    <listitem><para>
+     %Y - year as a decimal number including the century
+    </para></listitem>
+    <listitem><para>
+     %Z - time zone or name or abbreviation
+    </para></listitem>
+    <listitem><para>
+     %% - a literal `%' character
+    </para></listitem>
+   </itemizedlist>
+   <note>
+    <title>Programmers note</title>
+    <para>
+     date_format is essentially a wrapper to PHP's strftime()
+     function. You may have more or less conversion specifiers available depending
+     on your system's strftime() function where PHP was compiled. Check your
+     system's manpage for a full list of valid specifiers.
+    </para>
+   </note>
+  </para>
+ </sect1>
+
+ <sect1 id="language.modifier.default">
+  <title>default</title>
+  <informaltable frame="all">
+   <tgroup cols="5">
+    <colspec colname="param" align="center" />
+    <colspec colname="type" align="center" />
+    <colspec colname="required" align="center" />
+    <colspec colname="default" align="center" />
+    <colspec colname="desc" />
+    <thead>
+     <row>
+      <entry>Parameter Position</entry>
+      <entry>Type</entry>
+      <entry>Required</entry>
+      <entry>Default</entry>
+      <entry>Description</entry>
+     </row>
+    </thead>
+    <tbody>
+     <row>
+      <entry>1</entry>
+      <entry>string</entry>
+      <entry>No</entry>
+      <entry><emphasis>empty</emphasis></entry>
+      <entry>This is the default value to output if the
+       variable is empty.</entry>
+     </row>
+    </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">
+<![CDATA[
+<?php
+
+$smarty = new Smarty;
+$smarty->assign('articleTitle', 'Dealers Will Hear Car Talk at Noon.');
+$smarty->display('index.tpl');
+
+?>
+]]>
+   </programlisting>
+   <para>
+    Where index.tpl is:
+   </para>
+   <programlisting>
+<![CDATA[
+{$articleTitle|default:"no title"}
+{$myTitle|default:"no title"}
+]]>
+   </programlisting>
+   <para>
+    This will output:
+   </para>
+   <screen>
+<![CDATA[
+Dealers Will Hear Car Talk at Noon.
+no title
+]]>
+   </screen>
+  </example>
+ </sect1>
+ <sect1 id="language.modifier.escape">
+  <title>escape</title>
+  <informaltable frame="all">
+   <tgroup cols="6">
+    <colspec colname="param" align="center" />
+    <colspec colname="type" align="center" />
+    <colspec colname="required" align="center" />
+    <colspec colname="possible" align="center" />
+    <colspec colname="default" align="center" />
+    <colspec colname="desc" />
+    <thead>
+     <row>
+      <entry>Parameter Position</entry>
+      <entry>Type</entry>
+      <entry>Required</entry>
+      <entry>Possible Values</entry>
+      <entry>Default</entry>
+      <entry>Description</entry>
+     </row>
+    </thead>
+    <tbody>
+     <row>
+      <entry>1</entry>
+      <entry>string</entry>
+      <entry>No</entry>
+      <entry>html,htmlall,url,quotes,hex,hexentity,javascript</entry>
+      <entry>html</entry>
+      <entry>This is the escape format to use.</entry>
+     </row>
+    </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">
+<![CDATA[
+<?php
+    
+$smarty = new Smarty;
+$smarty->assign('articleTitle', "'Stiff Opposition Expected to Casketless Funeral Plan'");
+$smarty->display('index.tpl');
+    
+?>
+]]>
+   </programlisting>
+   <para>
+    Where index.tpl is:
+   </para>
+   <programlisting>
+<![CDATA[
+{$articleTitle}
+{$articleTitle|escape}
+{$articleTitle|escape:"html"}    {* escapes  &amp; &quot; &#039; &lt; &gt; *}
+{$articleTitle|escape:"htmlall"} {* escapes ALL html entities *}
+{$articleTitle|escape:"url"}
+{$articleTitle|escape:"quotes"}
+<a
+href="mailto:{$EmailAddress|escape:"hex"}">{$EmailAddress|escape:"hexentity"}</a>
+]]>
+   </programlisting>
+   <para>
+    This will output:
+   </para>
+   <screen>
+<![CDATA[
+'Stiff Opposition Expected to Casketless Funeral Plan'
+&#039;Stiff Opposition Expected to Casketless Funeral Plan&#039;
+&#039;Stiff Opposition Expected to Casketless Funeral Plan&#039;
+&#039;Stiff Opposition Expected to Casketless Funeral Plan&#039;
+%27Stiff+Opposition+Expected+to+Casketless+Funeral+Plan%27
+\'Stiff Opposition Expected to Casketless Funeral Plan\'
+<a
+href=&quot;mailto:%62%6f%62%40%6d%65%2e%6e%65%74&quot;&gt;&#x62;&#x6f;&#x62;&#x40;&#x6d;&#x65;&#x2e;&#x6e;&#x65;&#x74;</a>
+]]>
+   </screen>
+  </example>
+ </sect1>
+ <sect1 id="language.modifier.indent">
+  <title>indent</title>
+  <informaltable frame="all">
+   <tgroup cols="5">
+    <colspec colname="param" align="center" />
+    <colspec colname="type" align="center" />
+    <colspec colname="required" align="center" />
+    <colspec colname="default" align="center" />
+    <colspec colname="desc" />
+    <thead>
+     <row>
+      <entry>Parameter Position</entry>
+      <entry>Type</entry>
+      <entry>Required</entry>
+      <entry>Default</entry>
+      <entry>Description</entry>
+     </row>
+    </thead>
+    <tbody>
+     <row>
+      <entry>1</entry>
+      <entry>integer</entry>
+      <entry>No</entry>
+      <entry>4</entry>
+      <entry>This determines how many characters to indent
+       to.</entry>
+      </row>
+      <row>
+       <entry>2</entry>
+       <entry>string</entry>
+       <entry>No</entry>
+       <entry>(one space)</entry>
+       <entry>This is the character used to indent with.</entry>
+      </row>
+     </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">
+<![CDATA[
+<?php
+    
+$smarty = new Smarty;
+$smarty-&gt;assign('articleTitle', 'NJ judge to rule on nude beach.');
+$smarty-&gt;display('index.tpl');
+
+?>
+]]>
+   </programlisting>
+   <para>
+    Where index.tpl is:
+   </para>
+   <programlisting>
+<![CDATA[
+{$articleTitle}
+
+{$articleTitle|indent}
+
+{$articleTitle|indent:10}
+
+{$articleTitle|indent:1:"\t"}
+]]>
+   </programlisting>
+   <para>
+    this will output:
+   </para>
+   <screen>
+<![CDATA[
+NJ judge to rule on nude beach.
+Sun or rain expected today, dark tonight.
+Statistics show that teen pregnancy drops off significantly after 25.
+    
+NJ judge to rule on nude beach.
+Sun or rain expected today, dark tonight.
+Statistics show that teen pregnancy drops off significantly after 25.
+    
+NJ judge to rule on nude beach.
+Sun or rain expected today, dark tonight.
+Statistics show that teen pregnancy drops off significantly after 25.
+    
+NJ judge to rule on nude beach.
+Sun or rain expected today, dark tonight.
+Statistics show that teen pregnancy drops off significantly after 25.
+]]>
+   </screen>
+  </example>
+ </sect1>
+ <sect1 id="language.modifier.lower">
+  <title>lower</title>
+  <para>
+   This is used to lowercase a variable.
+  </para>
+  <example>
+   <title>lower</title>
+   <programlisting role="php">
+<![CDATA[
+<?php
+    
+$smarty = new Smarty;
+$smarty->assign('articleTitle', 'Two Convicts Evade Noose, Jury Hung.');
+$smarty->display('index.tpl');
+    
+?>
+]]>
+   </programlisting>
+   <para>
+    Where index.tpl is:
+   </para>
+   <programlisting> 
+<![CDATA[
+{$articleTitle}
+{$articleTitle|lower}
+]]>
+   </programlisting>
+   <para>
+    This will output:
+   </para>
+   <screen>
+<![CDATA[
+Two Convicts Evade Noose, Jury Hung.
+two convicts evade noose, jury hung.
+]]>
+   </screen>
+  </example>
+ </sect1>
+ <sect1 id="language.modifier.nl2br">
+  <title>nl2br</title>
+  <para>
+   All linebreaks will be converted to &lt;br /&gt; tags in the given
+   variable. This is equivalent to the PHP nl2br() function.
+  </para>
+  <example>
+   <title>nl2br</title>
+   <programlisting role="php">
+<![CDATA[
+<?php
+
+$smarty = new Smarty;
+$smarty->assign('articleTitle', "Sun or rain expected\ntoday, dark tonight");
+$smarty->display('index.tpl');
+
+?>
+]]>
+   </programlisting>
+   <para>
+    Where index.tpl is:
+   </para>
+   <programlisting>
+<![CDATA[
+{$articleTitle|nl2br}
+]]>
+   </programlisting>
+   <para>
+    This should output:
+   </para>
+   <screen>
+<![CDATA[
+Sun or rain expected<br />today, dark tonight
+]]>
+   </screen>
+  </example>
+ </sect1>
+ <sect1 id="language.modifier.regex.replace">
+  <title>regex_replace</title>
+  <informaltable frame="all">
+   <tgroup cols="5">
+    <colspec colname="param" align="center" />
+    <colspec colname="type" align="center" />
+    <colspec colname="required" align="center" />
+    <colspec colname="default" align="center" />
+    <colspec colname="desc"/>
+    <thead>
+     <row>
+      <entry>Parameter Position</entry>
+      <entry>Type</entry>
+      <entry>Required</entry>
+      <entry>Default</entry>
+      <entry>Description</entry>
+     </row>
+    </thead>
+    <tbody>
+     <row>
+      <entry>1</entry>
+      <entry>string</entry>
+      <entry>Yes</entry>
+      <entry><emphasis>n/a</emphasis></entry>
+      <entry>This is the regular expression to be replaced.</entry>
+     </row>
+     <row>
+      <entry>2</entry>
+      <entry>string</entry>
+      <entry>Yes</entry>
+      <entry><emphasis>n/a</emphasis></entry>
+      <entry>This is the string of text to replace with.</entry>
+     </row>
+    </tbody>
+   </tgroup>
+  </informaltable>
+  <para>
+   A regular expression search and replace on a variable. Use the
+   syntax for preg_replace() from the PHP manual.
+  </para>
+  <example>
+   <title>regex_replace</title>
+   <programlisting>
+    index.php:
+    
+    $smarty = new Smarty;
+    $smarty-&gt;assign('articleTitle', "Infertility unlikely to\nbe passed on, experts say.");
+    $smarty-&gt;display('index.tpl');
+    
+    index.tpl:
+    
+    {* replace each carriage return, tab &amp; new line with a space *}
+    
+    {$articleTitle}
+    {$articleTitle|regex_replace:"/[\r\t\n]/":" "}
+    
+    OUTPUT:
+    
+    Infertility unlikely to
+    be passed on, experts say.
+    Infertility unlikely to be passed on, experts say.
+   </programlisting>
+  </example>
+ </sect1>
+ <sect1 id="language.modifier.replace">
+  <title>replace</title>
+  <informaltable frame="all">
+   <tgroup cols="5">
+    <colspec colname="param" align="center" />
+    <colspec colname="type" align="center" />
+    <colspec colname="required" align="center" />
+    <colspec colname="default" align="center" />
+    <colspec colname="desc"/>
+    <thead>
+     <row>
+      <entry>Parameter Position</entry>
+      <entry>Type</entry>
+      <entry>Required</entry>
+      <entry>Default</entry>
+      <entry>Description</entry>
+     </row>
+    </thead>
+    <tbody>
+     <row>
+      <entry>1</entry>
+      <entry>string</entry>
+      <entry>Yes</entry>
+      <entry><emphasis>n/a</emphasis></entry>
+      <entry>This is the string of text to be replaced.</entry>
+     </row>
+     <row>
+      <entry>2</entry>
+      <entry>string</entry>
+      <entry>Yes</entry>
+      <entry><emphasis>n/a</emphasis></entry>
+      <entry>This is the string of text to replace with.</entry>
+     </row>
+    </tbody>
+   </tgroup>
+  </informaltable>
+  <para>
+   A simple search and replace on a variable.
+  </para>
+  <example>
+   <title>replace</title>
+   <programlisting>
+    index.php:
+    
+    $smarty = new Smarty;
+    $smarty-&gt;assign('articleTitle', "Child's Stool Great for Use in Garden.");
+    $smarty-&gt;display('index.tpl');
+    
+    index.tpl:
+    
+    {$articleTitle}
+    {$articleTitle|replace:"Garden":"Vineyard"}
+    {$articleTitle|replace:" ":"   "}
+    
+    OUTPUT:
+    
+    Child's Stool Great for Use in Garden.
+    Child's Stool Great for Use in Vineyard.
+    Child's   Stool   Great   for   Use   in   Garden.
+   </programlisting>
+  </example>
+ </sect1>
+ <sect1 id="language.modifier.spacify">
+  <title>spacify</title>
+  <informaltable frame="all">
+   <tgroup cols="5">
+    <colspec colname="param" align="center" />
+    <colspec colname="type" align="center" />
+    <colspec colname="required" align="center" />
+    <colspec colname="default" align="center" />
+    <colspec colname="desc"/>
+    <thead>
+     <row>
+      <entry>Parameter Position</entry>
+      <entry>Type</entry>
+      <entry>Required</entry>
+      <entry>Default</entry>
+      <entry>Description</entry>
+     </row>
+    </thead>
+    <tbody>
+     <row>
+      <entry>1</entry>
+      <entry>string</entry>
+      <entry>No</entry>
+      <entry><emphasis>one space</emphasis></entry>
+      <entry>This what gets inserted between each character of
+       the variable.</entry>
+      </row>
+     </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>
+    index.php:
+    
+    $smarty = new Smarty;
+    $smarty-&gt;assign('articleTitle', 'Something Went Wrong in Jet Crash, Experts Say.');
+    $smarty-&gt;display('index.tpl');
+    
+    index.tpl:
+    
+    {$articleTitle}
+    {$articleTitle|spacify}
+    {$articleTitle|spacify:"^^"}
+    
+    OUTPUT:
+    
+    Something Went Wrong in Jet Crash, Experts Say.
+    S o m e t h i n g   W e n t   W r o n g   i n   J e t   C r a s h ,   E x p e r t s   S a y .
+    S^^o^^m^^e^^t^^h^^i^^n^^g^^ ^^W^^e^^n^^t^^ ^^W^^r^^o^^n^^g^^ ^^i^^n^^ ^^J^^e^^t^^ ^^C^^r^^a^^s^^h^^,^^ ^^E^^x^^p^^e^^r^^t^^s^^ ^^S^^a^^y^^.
+   </programlisting>
+  </example>
+ </sect1>
+ <sect1 id="language.modifier.string.format">
+  <title>string_format</title>
+  <informaltable frame="all">
+   <tgroup cols="5">
+    <colspec colname="param" align="center" />
+    <colspec colname="type" align="center" />
+    <colspec colname="required" align="center" />
+    <colspec colname="default" align="center" />
+    <colspec colname="desc"/>
+    <thead>
+     <row>
+      <entry>Parameter Position</entry>
+      <entry>Type</entry>
+      <entry>Required</entry>
+      <entry>Default</entry>
+      <entry>Description</entry>
+     </row>
+    </thead>
+    <tbody>
+     <row>
+      <entry>1</entry>
+      <entry>string</entry>
+      <entry>Yes</entry>
+      <entry><emphasis>n/a</emphasis></entry>
+      <entry>This is what format to use. (sprintf)</entry>
+     </row>
+    </tbody>
+   </tgroup>
+  </informaltable>
+  <para>
+   This is a way to format strings, such as decimal numbers and such.
+   Use the syntax for sprintf for the formatting.
+  </para>
+  <example>
+   <title>string_format</title>
+   <programlisting>
+    index.php:
+    
+    $smarty = new Smarty;
+    $smarty-&gt;assign('number', 23.5787446);
+    $smarty-&gt;display('index.tpl');
+    
+    index.tpl:
+    
+    {$number}
+    {$number|string_format:"%.2f"}
+    {$number|string_format:"%d"}
+    
+    OUTPUT:
+    
+    23.5787446
+    23.58
+    24
+   </programlisting>
+  </example>
+ </sect1>
+ <sect1 id="language.modifier.strip">
+  <title>strip</title>
+  <para>
+   This replaces all repeated spaces, newlines and tabs with a single
+   space, or with a supplied string.
+  </para>
+  <note>
+   <title>Note</title>
+   <para>
+    If you want to strip blocks of template text, use the <link
+    linkend="language.function.strip">strip function</link>.
+   </para>
+  </note>
+  <example>
+   <title>strip</title>
+   <programlisting>
 <![CDATA[
 index.php:
 
@@ -1062,240 +1145,246 @@
 eight makes        hole in one.
 Grandmother of eight makes hole in one.
 Grandmother&nbsp;of&nbsp;eight&nbsp;makes&nbsp;hole&nbsp;in&nbsp;one.
-]]></programlisting>
-                    </example>
-                   </sect1>
-                   <sect1 id="language.modifier.strip.tags">
-                    <title>strip_tags</title>
-                    <para>
-                     This strips out markup tags, basically anything between &lt; and &gt;.
-                    </para>
-                    <example>
-                     <title>strip_tags</title>
-                     <programlisting>
-                      index.php:
-                      
-                      $smarty = new Smarty;
-                      $smarty-&gt;assign('articleTitle', "Blind Woman Gets &lt;font face=\"helvetica\"&gt;New Kidney&lt;/font&gt; from Dad she Hasn't Seen in &lt;b&gt;years&lt;/b&gt;.");
-                      $smarty-&gt;display('index.tpl');
-                      
-                      index.tpl:
-                      
-                      {$articleTitle}
-                      {$articleTitle|strip_tags}
-                      
-                      OUTPUT:
-                      
-                      Blind Woman Gets &lt;font face="helvetica"&gt;New Kidney&lt;/font&gt; from Dad she Hasn't Seen in &lt;b&gt;years&lt;/b&gt;.
-                      Blind Woman Gets New Kidney from Dad she Hasn't Seen in years.</programlisting>
-                     </example>
-                    </sect1>
-                    <sect1 id="language.modifier.truncate">
-                     <title>truncate</title>
-                     <informaltable frame="all">
-                      <tgroup cols="5">
-                       <colspec colname="param" align="center" />
-                       <colspec colname="type" align="center" />
-                       <colspec colname="required" align="center" />
-                       <colspec colname="default" align="center" />
-                       <colspec colname="desc"/>
-                       <thead>
-                        <row>
-                         <entry>Parameter Position</entry>
-                         <entry>Type</entry>
-                         <entry>Required</entry>
-                         <entry>Default</entry>
-                         <entry>Description</entry>
-                        </row>
-                       </thead>
-                       <tbody>
-                        <row>
-                         <entry>1</entry>
-                         <entry>integer</entry>
-                         <entry>No</entry>
-                         <entry>80</entry>
-                         <entry>This determines how many characters to truncate
-                          to.</entry>
-                         </row>
-                         <row>
-                          <entry>2</entry>
-                          <entry>string</entry>
-                          <entry>No</entry>
-                          <entry>...</entry>
-                          <entry>This is the text to append if truncation occurs.</entry>
-                         </row>
-                         <row>
-                          <entry>3</entry>
-                          <entry>boolean</entry>
-                          <entry>No</entry>
-                          <entry>false</entry>
-                          <entry>This determines whether or not to truncate at a
-                           word boundary (false), or at the exact character (true).</entry>
-                          </row>
-                         </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>
-                         index.php:
-                         
-                         $smarty = new Smarty;
-                         $smarty-&gt;assign('articleTitle', 'Two Sisters Reunite after Eighteen Years at Checkout Counter.');
-                         $smarty-&gt;display('index.tpl');
-                         
-                         index.tpl:
-                         
-                         {$articleTitle}
-                         {$articleTitle|truncate}
-                         {$articleTitle|truncate:30}
-                         {$articleTitle|truncate:30:""}
-                         {$articleTitle|truncate:30:"---"}
-                         {$articleTitle|truncate:30:"":true}
-                         {$articleTitle|truncate:30:"...":true}
-                         
-                         OUTPUT:
-                         
-                         Two Sisters Reunite after Eighteen Years at Checkout Counter.
-                         Two Sisters Reunite after Eighteen Years at Checkout Counter.
-                         Two Sisters Reunite after...
-                         Two Sisters Reunite after
-                         Two Sisters Reunite after---
-                         Two Sisters Reunite after Eigh
-                         Two Sisters Reunite after E...</programlisting>
-                        </example>
-                       </sect1>
-                       <sect1 id="language.modifier.upper">
-                        <title>upper</title>
-                        <para>
-                         This is used to uppercase a variable.
-                        </para>
-                        <example>
-                         <title>upper</title>
-                         <programlisting>
-                          index.php:
-                          
-                          $smarty = new Smarty;
-                          $smarty-&gt;assign('articleTitle', "If Strike isn't Settled Quickly it may Last a While.");
-                          $smarty-&gt;display('index.tpl');
-                          
-                          index.tpl:
-                          
-                          {$articleTitle}
-                          {$articleTitle|upper}
-                          
-                          OUTPUT:
-                          
-                          If Strike isn't Settled Quickly it may Last a While.
-                          IF STRIKE ISN'T SETTLED QUICKLY IT MAY LAST A WHILE.</programlisting>
-                         </example>
-                        </sect1>
-                        <sect1 id="language.modifier.wordwrap">
-                         <title>wordwrap</title>
-                         <informaltable frame="all">
-                          <tgroup cols="5">
-                           <colspec colname="param" align="center" />
-                           <colspec colname="type" align="center" />
-                           <colspec colname="required" align="center" />
-                           <colspec colname="default" align="center" />
-                           <colspec colname="desc"/>
-                           <thead>
-                            <row>
-                             <entry>Parameter Position</entry>
-                             <entry>Type</entry>
-                             <entry>Required</entry>
-                             <entry>Default</entry>
-                             <entry>Description</entry>
-                            </row>
-                           </thead>
-                           <tbody>
-                            <row>
-                             <entry>1</entry>
-                             <entry>integer</entry>
-                             <entry>No</entry>
-                             <entry>80</entry>
-                             <entry>This determines how many columns to wrap
-                              to.</entry>
-                             </row>
-                             <row>
-                              <entry>2</entry>
-                              <entry>string</entry>
-                              <entry>No</entry>
-                              <entry>\n</entry>
-                              <entry>This is the string used to wrap words with.</entry>
-                             </row>
-                             <row>
-                              <entry>3</entry>
-                              <entry>boolean</entry>
-                              <entry>No</entry>
-                              <entry>false</entry>
-                              <entry>This determines whether or not to wrap at a
-                               word boundary (false), or at the exact character (true).</entry>
-                              </row>
-                             </tbody>
-                            </tgroup>
-                           </informaltable>
-                           <para>
-                            This 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.
-                           </para>
-                           <example>
-                            <title>wordwrap</title>
-                            <programlisting>
-                             index.php:
-                             
-                             $smarty = new Smarty;
-                             $smarty-&gt;assign('articleTitle', "Blind woman gets new kidney from dad she hasn't seen in years.");
-                             $smarty-&gt;display('index.tpl');
-                             
-                             index.tpl:
-                             
-                             {$articleTitle}
-                             
-                             {$articleTitle|wordwrap:30}
-                             
-                             {$articleTitle|wordwrap:20}
-                             
-                             {$articleTitle|wordwrap:30:"&lt;br&gt;\n"}
-                             
-                             {$articleTitle|wordwrap:30:"\n":true}
-                             
-                             OUTPUT:
-                             
-                             Blind woman gets new kidney from dad she hasn't seen in years.
-                             
-                             Blind woman gets new kidney
-                             from dad she hasn't seen in
-                             years.
-                             
-                             Blind woman gets new
-                             kidney from dad she
-                             hasn't seen in
-                             years.
-                             
-                             Blind woman gets new kidney&lt;br&gt;
-                             from dad she hasn't seen in years.
-                             
-                             Blind woman gets new kidney fr
-                             om dad she hasn't seen in year
-                             s.</programlisting>
-                            </example>
-                           </sect1>
-                           
-                          </chapter>
+]]>
+   </programlisting>
+  </example>
+ </sect1>
+ <sect1 id="language.modifier.strip.tags">
+  <title>strip_tags</title>
+  <para>
+   This strips out markup tags, basically anything between &lt; and &gt;.
+  </para>
+  <example>
+   <title>strip_tags</title>
+   <programlisting>
+    index.php:
+    
+    $smarty = new Smarty;
+    $smarty-&gt;assign('articleTitle', "Blind Woman Gets &lt;font face=\"helvetica\"&gt;New Kidney&lt;/font&gt; from Dad she Hasn't Seen in &lt;b&gt;years&lt;/b&gt;.");
+    $smarty-&gt;display('index.tpl');
+    
+    index.tpl:
+    
+    {$articleTitle}
+    {$articleTitle|strip_tags}
+    
+    OUTPUT:
+    
+    Blind Woman Gets &lt;font face="helvetica"&gt;New Kidney&lt;/font&gt; from Dad she Hasn't Seen in &lt;b&gt;years&lt;/b&gt;.
+    Blind Woman Gets New Kidney from Dad she Hasn't Seen in years.
+   </programlisting>
+  </example>
+ </sect1>
+ <sect1 id="language.modifier.truncate">
+  <title>truncate</title>
+  <informaltable frame="all">
+   <tgroup cols="5">
+    <colspec colname="param" align="center" />
+    <colspec colname="type" align="center" />
+    <colspec colname="required" align="center" />
+    <colspec colname="default" align="center" />
+    <colspec colname="desc"/>
+    <thead>
+     <row>
+      <entry>Parameter Position</entry>
+      <entry>Type</entry>
+      <entry>Required</entry>
+      <entry>Default</entry>
+      <entry>Description</entry>
+     </row>
+    </thead>
+    <tbody>
+     <row>
+      <entry>1</entry>
+      <entry>integer</entry>
+      <entry>No</entry>
+      <entry>80</entry>
+      <entry>This determines how many characters to truncate
+       to.</entry>
+     </row>
+     <row>
+      <entry>2</entry>
+      <entry>string</entry>
+      <entry>No</entry>
+      <entry>...</entry>
+      <entry>This is the text to append if truncation occurs.</entry>
+     </row>
+     <row>
+      <entry>3</entry>
+      <entry>boolean</entry>
+      <entry>No</entry>
+      <entry>false</entry>
+      <entry>This determines whether or not to truncate at a
+       word boundary (false), or at the exact character (true).</entry>
+     </row>
+    </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>
+    index.php:
+    
+    $smarty = new Smarty;
+    $smarty-&gt;assign('articleTitle', 'Two Sisters Reunite after Eighteen Years at Checkout Counter.');
+    $smarty-&gt;display('index.tpl');
+    
+    index.tpl:
+    
+    {$articleTitle}
+    {$articleTitle|truncate}
+    {$articleTitle|truncate:30}
+    {$articleTitle|truncate:30:""}
+    {$articleTitle|truncate:30:"---"}
+    {$articleTitle|truncate:30:"":true}
+    {$articleTitle|truncate:30:"...":true}
+    
+    OUTPUT:
+    
+    Two Sisters Reunite after Eighteen Years at Checkout Counter.
+    Two Sisters Reunite after Eighteen Years at Checkout Counter.
+    Two Sisters Reunite after...
+    Two Sisters Reunite after
+    Two Sisters Reunite after---
+    Two Sisters Reunite after Eigh
+    Two Sisters Reunite after E...
+   </programlisting>
+  </example>
+ </sect1>
+ <sect1 id="language.modifier.upper">
+  <title>upper</title>
+  <para>
+   This is used to uppercase a variable.
+  </para>
+  <example>
+   <title>upper</title>
+   <programlisting>
+    index.php:
+    
+    $smarty = new Smarty;
+    $smarty-&gt;assign('articleTitle', "If Strike isn't Settled Quickly it may Last a While.");
+    $smarty-&gt;display('index.tpl');
+    
+    index.tpl:
+    
+    {$articleTitle}
+    {$articleTitle|upper}
+    
+    OUTPUT:
+    
+    If Strike isn't Settled Quickly it may Last a While.
+    IF STRIKE ISN'T SETTLED QUICKLY IT MAY LAST A WHILE.
+   </programlisting>
+  </example>
+ </sect1>
+ <sect1 id="language.modifier.wordwrap">
+  <title>wordwrap</title>
+  <informaltable frame="all">
+   <tgroup cols="5">
+    <colspec colname="param" align="center" />
+    <colspec colname="type" align="center" />
+    <colspec colname="required" align="center" />
+    <colspec colname="default" align="center" />
+    <colspec colname="desc"/>
+    <thead>
+     <row>
+      <entry>Parameter Position</entry>
+      <entry>Type</entry>
+      <entry>Required</entry>
+      <entry>Default</entry>
+      <entry>Description</entry>
+     </row>
+    </thead>
+    <tbody>
+     <row>
+      <entry>1</entry>
+      <entry>integer</entry>
+      <entry>No</entry>
+      <entry>80</entry>
+      <entry>This determines how many columns to wrap
+       to.</entry>
+     </row>
+     <row>
+      <entry>2</entry>
+      <entry>string</entry>
+      <entry>No</entry>
+      <entry>\n</entry>
+      <entry>This is the string used to wrap words with.</entry>
+     </row>
+     <row>
+      <entry>3</entry>
+      <entry>boolean</entry>
+      <entry>No</entry>
+      <entry>false</entry>
+      <entry>This determines whether or not to wrap at a
+       word boundary (false), or at the exact character (true).</entry>
+     </row>
+    </tbody>
+   </tgroup>
+  </informaltable>
+  <para>
+   This 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.
+  </para>
+  <example>
+   <title>wordwrap</title>
+   <programlisting>
+    index.php:
+    
+    $smarty = new Smarty;
+    $smarty-&gt;assign('articleTitle', "Blind woman gets new kidney from dad she hasn't seen in years.");
+    $smarty-&gt;display('index.tpl');
+    
+    index.tpl:
+    
+    {$articleTitle}
+    
+    {$articleTitle|wordwrap:30}
+    
+    {$articleTitle|wordwrap:20}
+    
+    {$articleTitle|wordwrap:30:"&lt;br&gt;\n"}
+    
+    {$articleTitle|wordwrap:30:"\n":true}
+    
+    OUTPUT:
+    
+    Blind woman gets new kidney from dad she hasn't seen in years.
+    
+    Blind woman gets new kidney
+    from dad she hasn't seen in
+    years.
+    
+    Blind woman gets new
+    kidney from dad she
+    hasn't seen in
+    years.
+    
+    Blind woman gets new kidney&lt;br&gt;
+    from dad she hasn't seen in years.
+    
+    Blind woman gets new kidney fr
+    om dad she hasn't seen in year
+    s.
+   </programlisting>
+  </example>
+ </sect1>
+  
+</chapter>
+
 <!-- Keep this comment at the end of the file
 Local variables:
 mode: sgml
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.