mirror of
				https://github.com/smarty-php/smarty.git
				synced 2025-11-04 06:11:37 +01:00 
			
		
		
		
	Add literal tags to html, general formatting
This commit is contained in:
		@@ -5,7 +5,7 @@
 | 
			
		||||
  <para>
 | 
			
		||||
   <varname>{html_image}</varname> is a
 | 
			
		||||
   <link linkend="language.custom.functions">custom function</link>
 | 
			
		||||
   that generates a HTML <img> tag.
 | 
			
		||||
   that generates an HTML <literal><img></literal> tag.
 | 
			
		||||
   The <parameter>height</parameter> and <parameter>width</parameter>
 | 
			
		||||
   are automatically calculated from the image file if they are not supplied.
 | 
			
		||||
 </para>
 | 
			
		||||
@@ -92,8 +92,8 @@
 | 
			
		||||
 | 
			
		||||
 <listitem><para>
 | 
			
		||||
  <parameter>href</parameter> is the href value to link the image to.
 | 
			
		||||
  If link is supplied, an <a href="LINKVALUE"><a> tag is placed
 | 
			
		||||
  around the image tag.
 | 
			
		||||
  If link is supplied, an <literal><a href="LINKVALUE"><a></literal>
 | 
			
		||||
  tag is placed around the image tag.
 | 
			
		||||
 </para> </listitem>
 | 
			
		||||
 | 
			
		||||
 <listitem><para>
 | 
			
		||||
@@ -104,7 +104,7 @@
 | 
			
		||||
 | 
			
		||||
 <listitem><para>
 | 
			
		||||
  All parameters that are not in the list above are printed as
 | 
			
		||||
  name/value-pairs inside the created <img> tag.
 | 
			
		||||
  name/value-pairs inside the created <literal><img></literal> tag.
 | 
			
		||||
 </para></listitem>
 | 
			
		||||
</itemizedlist>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -5,7 +5,7 @@
 | 
			
		||||
  <para>
 | 
			
		||||
   <varname>{html_options}</varname> is a
 | 
			
		||||
   <link linkend="language.custom.functions">custom function</link>
 | 
			
		||||
   that creates a html <select><option> group
 | 
			
		||||
   that creates the html <literal><select><option></literal> group
 | 
			
		||||
   with the assigned data. It takes care of which item(s) are selected by
 | 
			
		||||
   default as well.
 | 
			
		||||
   </para>
 | 
			
		||||
@@ -32,35 +32,35 @@
 | 
			
		||||
     <entry>array</entry>
 | 
			
		||||
     <entry>Yes, unless using options attribute</entry>
 | 
			
		||||
     <entry><emphasis>n/a</emphasis></entry>
 | 
			
		||||
     <entry>an array of values for dropdown</entry>
 | 
			
		||||
     <entry>An array of values for dropdown</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
     <entry>output</entry>
 | 
			
		||||
     <entry>array</entry>
 | 
			
		||||
     <entry>Yes, unless using options attribute</entry>
 | 
			
		||||
     <entry><emphasis>n/a</emphasis></entry>
 | 
			
		||||
     <entry>an array of output for dropdown</entry>
 | 
			
		||||
     <entry>An array of output for dropdown</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
     <entry>selected</entry>
 | 
			
		||||
     <entry>string/array</entry>
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry><emphasis>empty</emphasis></entry>
 | 
			
		||||
     <entry>the selected option element(s)</entry>
 | 
			
		||||
     <entry>The selected option element(s)</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
     <entry>options</entry>
 | 
			
		||||
     <entry>associative array</entry>
 | 
			
		||||
     <entry>Yes, unless using values and output</entry>
 | 
			
		||||
     <entry><emphasis>n/a</emphasis></entry>
 | 
			
		||||
     <entry>an associative array of values and output</entry>
 | 
			
		||||
     <entry>An associative array of values and output</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
     <entry>name</entry>
 | 
			
		||||
     <entry>string</entry>
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry><emphasis>empty</emphasis></entry>
 | 
			
		||||
     <entry>name of select group</entry>
 | 
			
		||||
     <entry>Name of select group</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
   </tbody>
 | 
			
		||||
  </tgroup>
 | 
			
		||||
@@ -76,18 +76,19 @@
 | 
			
		||||
 | 
			
		||||
 <listitem><para>
 | 
			
		||||
  If the optional <parameter>name</parameter> attribute is given, the
 | 
			
		||||
  <select></select> tags are created,
 | 
			
		||||
  otherwise ONLY the <option>'s list are generated.
 | 
			
		||||
  <literal><select></select></literal> tags are created,
 | 
			
		||||
  otherwise ONLY the <literal><option></literal> list is generated.
 | 
			
		||||
 </para></listitem>
 | 
			
		||||
 | 
			
		||||
  <listitem><para>
 | 
			
		||||
  If a given value is an array, it will treat it as an html <optgroup>,
 | 
			
		||||
  and display the groups. Recursion is supported with <optgroup>.
 | 
			
		||||
  If a given value is an array, it will treat it as an html
 | 
			
		||||
  <literal><optgroup></literal>, and display the groups.
 | 
			
		||||
  Recursion is supported with <literal><optgroup></literal>.
 | 
			
		||||
 </para></listitem>
 | 
			
		||||
 | 
			
		||||
 <listitem><para>
 | 
			
		||||
  All parameters that are not in the list above are printed as
 | 
			
		||||
  name/value-pairs inside the <select> tag. They are ignored if
 | 
			
		||||
  All parameters that are not in the list above are printed as name/value-pairs
 | 
			
		||||
  inside the <literal><select></literal> tag. They are ignored if
 | 
			
		||||
  the optional <parameter>name</parameter> is not given.
 | 
			
		||||
 </para></listitem>
 | 
			
		||||
 | 
			
		||||
@@ -114,7 +115,7 @@ $smarty->assign('mySelect', 9904);
 | 
			
		||||
    <para>
 | 
			
		||||
  The following template will generate a drop-down list.
 | 
			
		||||
  Note the presence of the <parameter>name</parameter> attribute
 | 
			
		||||
  which creates the <select> tags.
 | 
			
		||||
  which creates the <literal><select></literal> tags.
 | 
			
		||||
  </para>
 | 
			
		||||
  <programlisting>
 | 
			
		||||
<![CDATA[
 | 
			
		||||
@@ -137,7 +138,8 @@ $smarty->assign('mySelect', 9904);
 | 
			
		||||
</example>
 | 
			
		||||
 | 
			
		||||
<example>
 | 
			
		||||
<title>Dropdown with seperate arrays for ouptut.</title>
 | 
			
		||||
<title>Dropdown with seperate arrays for <varname>values</varname> and
 | 
			
		||||
<varname>ouptut</varname></title>
 | 
			
		||||
  <programlisting role="php">
 | 
			
		||||
<![CDATA[
 | 
			
		||||
<?php
 | 
			
		||||
@@ -151,10 +153,10 @@ $smarty->assign('customer_id', 92);
 | 
			
		||||
]]>
 | 
			
		||||
  </programlisting>
 | 
			
		||||
  <para>
 | 
			
		||||
  The above arrays would be output with the following template.
 | 
			
		||||
  Note the sneaky use of the php <ulink url="&url.php-manual;function.count">
 | 
			
		||||
  The above arrays would be output with the following template
 | 
			
		||||
  (note the use of the php <ulink url="&url.php-manual;function.count">
 | 
			
		||||
  <varname>count()</varname></ulink> function as a modifier
 | 
			
		||||
  to set the select size.
 | 
			
		||||
  to set the select size).
 | 
			
		||||
  </para>
 | 
			
		||||
  <programlisting>
 | 
			
		||||
<![CDATA[
 | 
			
		||||
@@ -194,7 +196,9 @@ $smarty->assign('contact',$db->getRow($sql));
 | 
			
		||||
]]>
 | 
			
		||||
</programlisting>
 | 
			
		||||
<para>
 | 
			
		||||
Where a template could be as follows. Note the use of the truncate modifier.
 | 
			
		||||
Where a template could be as follows. Note the use of the
 | 
			
		||||
<link linkend="language.modifier.truncate"><varname>truncate</varname></link>
 | 
			
		||||
modifier.
 | 
			
		||||
</para>
 | 
			
		||||
<programlisting>
 | 
			
		||||
<![CDATA[
 | 
			
		||||
@@ -218,8 +222,7 @@ $smarty->assign('fav', 7);
 | 
			
		||||
?>
 | 
			
		||||
]]>
 | 
			
		||||
  </programlisting>
 | 
			
		||||
    <para>With the template would be
 | 
			
		||||
 | 
			
		||||
    <para>The script above and the following template
 | 
			
		||||
  </para>
 | 
			
		||||
  <programlisting>
 | 
			
		||||
<![CDATA[
 | 
			
		||||
@@ -228,7 +231,7 @@ $smarty->assign('fav', 7);
 | 
			
		||||
  </programlisting>
 | 
			
		||||
 | 
			
		||||
  <para>
 | 
			
		||||
   Output of the above example would be:
 | 
			
		||||
   would output:
 | 
			
		||||
  </para>
 | 
			
		||||
  <screen>
 | 
			
		||||
<![CDATA[
 | 
			
		||||
 
 | 
			
		||||
@@ -5,8 +5,8 @@
 | 
			
		||||
  <para>
 | 
			
		||||
   <varname>{html_radios}</varname> is a
 | 
			
		||||
   <link linkend="language.custom.functions">custom function</link>
 | 
			
		||||
   that creates html radio button group.
 | 
			
		||||
   It takes care of which item is selected by default as well.
 | 
			
		||||
   that creates a HTML radio button group.
 | 
			
		||||
   It also takes care of which item is selected by default as well.
 | 
			
		||||
   </para>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -32,49 +32,49 @@
 | 
			
		||||
     <entry>string</entry>
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry><emphasis>radio</emphasis></entry>
 | 
			
		||||
     <entry>name of radio list</entry>
 | 
			
		||||
     <entry>Name of radio list</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
     <entry>values</entry>
 | 
			
		||||
     <entry>array</entry>
 | 
			
		||||
     <entry>Yes, unless using options attribute</entry>
 | 
			
		||||
     <entry><emphasis>n/a</emphasis></entry>
 | 
			
		||||
     <entry>an array of values for radio buttons</entry>
 | 
			
		||||
     <entry>An array of values for radio buttons</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
     <entry>output</entry>
 | 
			
		||||
     <entry>array</entry>
 | 
			
		||||
     <entry>Yes, unless using options attribute</entry>
 | 
			
		||||
     <entry><emphasis>n/a</emphasis></entry>
 | 
			
		||||
     <entry>an array of output for radio buttons</entry>
 | 
			
		||||
     <entry>An array of output for radio buttons</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
     <entry>selected</entry>
 | 
			
		||||
     <entry>string</entry>
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry><emphasis>empty</emphasis></entry>
 | 
			
		||||
     <entry>the selected radio element</entry>
 | 
			
		||||
     <entry>The selected radio element</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
     <entry>options</entry>
 | 
			
		||||
     <entry>associative array</entry>
 | 
			
		||||
     <entry>Yes, unless using values and output</entry>
 | 
			
		||||
     <entry><emphasis>n/a</emphasis></entry>
 | 
			
		||||
     <entry>an associative array of values and output</entry>
 | 
			
		||||
     <entry>An associative array of values and output</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
     <entry>separator</entry>
 | 
			
		||||
     <entry>string</entry>
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry><emphasis>empty</emphasis></entry>
 | 
			
		||||
     <entry>string of text to separate each radio item</entry>
 | 
			
		||||
     <entry>String of text to separate each radio item</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
     <entry>assign</entry>
 | 
			
		||||
     <entry>string</entry>
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry><emphasis>empty</emphasis></entry>
 | 
			
		||||
     <entry>assign radio tags to an array instead of output</entry>
 | 
			
		||||
     <entry>Assign radio tags to an array instead of output</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
   </tbody>
 | 
			
		||||
  </tgroup>
 | 
			
		||||
@@ -92,8 +92,9 @@
 | 
			
		||||
    </para></listitem>
 | 
			
		||||
 | 
			
		||||
     <listitem><para>
 | 
			
		||||
      All parameters that are not in the list above are printed as
 | 
			
		||||
      name/value-pairs inside each of the created <input>-tags.
 | 
			
		||||
      All parameters that are not in the list above are output as
 | 
			
		||||
      name/value-pairs inside each of the created
 | 
			
		||||
      <literal><input></literal>-tags.
 | 
			
		||||
     </para></listitem>
 | 
			
		||||
    </itemizedlist>
 | 
			
		||||
 <example>
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,8 @@
 | 
			
		||||
   that creates date dropdowns.
 | 
			
		||||
   It can display any or all of year, month, and day.
 | 
			
		||||
  All parameters that are not in the list below are printed as
 | 
			
		||||
  name/value-pairs inside the <select> tags of day, month and  year.
 | 
			
		||||
  name/value-pairs inside the <literal><select></literal> tags
 | 
			
		||||
  of day, month and  year.
 | 
			
		||||
 </para>
 | 
			
		||||
 | 
			
		||||
 <informaltable frame="all">
 | 
			
		||||
@@ -33,21 +34,21 @@
 | 
			
		||||
     <entry>string</entry>
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry>Date_</entry>
 | 
			
		||||
     <entry>what to prefix the var name with</entry>
 | 
			
		||||
     <entry>What to prefix the var name with</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
     <entry>time</entry>
 | 
			
		||||
     <entry>timestamp/YYYY-MM-DD</entry>
 | 
			
		||||
     <entry>timestamp/ YYYY-MM-DD</entry>
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry>current time in unix timestamp or YYYY-MM-DD format</entry>
 | 
			
		||||
     <entry>what date/time to use</entry>
 | 
			
		||||
     <entry>What date/time to use</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
     <entry>start_year</entry>
 | 
			
		||||
     <entry>string</entry>
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry>current year</entry>
 | 
			
		||||
     <entry>the first year in the dropdown, either
 | 
			
		||||
     <entry>The first year in the dropdown, either
 | 
			
		||||
      year number, or relative to current year (+/- N)</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
@@ -55,7 +56,7 @@
 | 
			
		||||
     <entry>string</entry>
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry>same as start_year</entry>
 | 
			
		||||
     <entry>the last year in the dropdown, either
 | 
			
		||||
     <entry>The last year in the dropdown, either
 | 
			
		||||
      year number, or relative to current year (+/- N)</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
@@ -63,56 +64,56 @@
 | 
			
		||||
     <entry>boolean</entry>
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry>&true;</entry>
 | 
			
		||||
     <entry>whether to display days or not</entry>
 | 
			
		||||
     <entry>Whether to display days or not</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
     <entry>display_months</entry>
 | 
			
		||||
     <entry>boolean</entry>
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry>&true;</entry>
 | 
			
		||||
     <entry>whether to display months or not</entry>
 | 
			
		||||
     <entry>Whether to display months or not</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
     <entry>display_years</entry>
 | 
			
		||||
     <entry>boolean</entry>
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry>&true;</entry>
 | 
			
		||||
     <entry>whether to display years or not</entry>
 | 
			
		||||
     <entry>Whether to display years or not</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
     <entry>month_format</entry>
 | 
			
		||||
     <entry>string</entry>
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry>%B</entry>
 | 
			
		||||
     <entry>what format the month should be in (strftime)</entry>
 | 
			
		||||
     <entry>What format the month should be in (strftime)</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
     <entry>day_format</entry>
 | 
			
		||||
     <entry>string</entry>
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry>%02d</entry>
 | 
			
		||||
     <entry>what format the day output should be in (sprintf)</entry>
 | 
			
		||||
     <entry>What format the day output should be in (sprintf)</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
     <entry>day_value_format</entry>
 | 
			
		||||
     <entry>string</entry>
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry>%d</entry>
 | 
			
		||||
     <entry>what format the day value should be in (sprintf)</entry>
 | 
			
		||||
     <entry>What format the day value should be in (sprintf)</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
     <entry>year_as_text</entry>
 | 
			
		||||
     <entry>boolean</entry>
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry>&false;</entry>
 | 
			
		||||
     <entry>whether or not to display the year as text</entry>
 | 
			
		||||
     <entry>Whether or not to display the year as text</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
     <entry>reverse_years</entry>
 | 
			
		||||
     <entry>boolean</entry>
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry>&false;</entry>
 | 
			
		||||
     <entry>display years in reverse order</entry>
 | 
			
		||||
     <entry>Display years in reverse order</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
     <entry>field_array</entry>
 | 
			
		||||
@@ -120,7 +121,7 @@
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry>null</entry>
 | 
			
		||||
     <entry>
 | 
			
		||||
      if a name is given, the select boxes will be drawn
 | 
			
		||||
      If a name is given, the select boxes will be drawn
 | 
			
		||||
      such that the results will be returned to PHP in the
 | 
			
		||||
      form of name[Day], name[Year], name[Month].
 | 
			
		||||
     </entry>
 | 
			
		||||
@@ -130,70 +131,70 @@
 | 
			
		||||
     <entry>string</entry>
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry>null</entry>
 | 
			
		||||
     <entry>adds size attribute to select tag if given</entry>
 | 
			
		||||
     <entry>Adds size attribute to select tag if given</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
     <entry>month_size</entry>
 | 
			
		||||
     <entry>string</entry>
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry>null</entry>
 | 
			
		||||
     <entry>adds size attribute to select tag if given</entry>
 | 
			
		||||
     <entry>Adds size attribute to select tag if given</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
     <entry>year_size</entry>
 | 
			
		||||
     <entry>string</entry>
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry>null</entry>
 | 
			
		||||
     <entry>adds size attribute to select tag if given</entry>
 | 
			
		||||
     <entry>Adds size attribute to select tag if given</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
     <entry>all_extra</entry>
 | 
			
		||||
     <entry>string</entry>
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry>null</entry>
 | 
			
		||||
     <entry>adds extra attributes to all select/input tags if given</entry>
 | 
			
		||||
     <entry>Adds extra attributes to all select/input tags if given</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
     <entry>day_extra</entry>
 | 
			
		||||
     <entry>string</entry>
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry>null</entry>
 | 
			
		||||
     <entry>adds extra attributes to select/input tags if given</entry>
 | 
			
		||||
     <entry>Adds extra attributes to select/input tags if given</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
     <entry>month_extra</entry>
 | 
			
		||||
     <entry>string</entry>
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry>null</entry>
 | 
			
		||||
     <entry>adds extra attributes to select/input tags if given</entry>
 | 
			
		||||
     <entry>Adds extra attributes to select/input tags if given</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
     <entry>year_extra</entry>
 | 
			
		||||
     <entry>string</entry>
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry>null</entry>
 | 
			
		||||
     <entry>adds extra attributes to select/input tags if given</entry>
 | 
			
		||||
     <entry>Adds extra attributes to select/input tags if given</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
     <entry>field_order</entry>
 | 
			
		||||
     <entry>string</entry>
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry>MDY</entry>
 | 
			
		||||
     <entry>the order in which to display the fields</entry>
 | 
			
		||||
     <entry>The order in which to display the fields</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
     <entry>field_separator</entry>
 | 
			
		||||
     <entry>string</entry>
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry>\n</entry>
 | 
			
		||||
     <entry>string printed between different fields</entry>
 | 
			
		||||
     <entry>String printed between different fields</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
     <entry>month_value_format</entry>
 | 
			
		||||
     <entry>string</entry>
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry>%m</entry>
 | 
			
		||||
     <entry>strftime format of the month values, default is
 | 
			
		||||
     <entry>strftime() format of the month values, default is
 | 
			
		||||
      %m for month numbers.</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
@@ -233,9 +234,9 @@
 | 
			
		||||
 | 
			
		||||
 <note>
 | 
			
		||||
  <para>
 | 
			
		||||
   There's an useful php function on the
 | 
			
		||||
   There is an useful php function on the
 | 
			
		||||
   <link linkend="tips.dates">date tips page</link> for converting
 | 
			
		||||
   <varname>{html_select_date}</varname> values to a timestamp.
 | 
			
		||||
   <varname>{html_select_date}</varname> form values to a timestamp.
 | 
			
		||||
  </para>
 | 
			
		||||
 </note>
 | 
			
		||||
 | 
			
		||||
@@ -277,7 +278,7 @@
 | 
			
		||||
<option value="31">31</option>
 | 
			
		||||
</select>
 | 
			
		||||
<select name="Date_Year">
 | 
			
		||||
<option value="2001" selected="selected">2001</option>
 | 
			
		||||
<option value="2006" selected="selected">2006</option>
 | 
			
		||||
</select>
 | 
			
		||||
]]>
 | 
			
		||||
  </screen>
 | 
			
		||||
@@ -288,8 +289,8 @@
 | 
			
		||||
  <programlisting>
 | 
			
		||||
<![CDATA[
 | 
			
		||||
{* start and end year can be relative to current year *}
 | 
			
		||||
{html_select_date prefix="StartDate" time=$time start_year="-5"
 | 
			
		||||
   end_year="+1" display_days=false}
 | 
			
		||||
{html_select_date prefix='StartDate' time=$time start_year='-5'
 | 
			
		||||
   end_year='+1' display_days=false}
 | 
			
		||||
]]>
 | 
			
		||||
  </programlisting>
 | 
			
		||||
  <para>
 | 
			
		||||
 
 | 
			
		||||
@@ -10,8 +10,8 @@
 | 
			
		||||
 </para>
 | 
			
		||||
 <para>
 | 
			
		||||
  The <parameter>time</parameter> attribute can have different formats.
 | 
			
		||||
  It can be a unique timestamp, a  string of the format YYYYMMDDHHMMSS
 | 
			
		||||
   or a string  that is parseable by php's
 | 
			
		||||
  It can be a unique timestamp, a  string of the format
 | 
			
		||||
  <literal>YYYYMMDDHHMMSS</literal> or a string  that is parseable by PHP's
 | 
			
		||||
  <ulink url="&url.php-manual;strtotime"><varname>strtotime()</varname></ulink>.
 | 
			
		||||
 </para>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -5,7 +5,7 @@
 | 
			
		||||
  <para>
 | 
			
		||||
   <varname>{html_table}</varname> is a
 | 
			
		||||
   <link linkend="language.custom.functions">custom function</link>
 | 
			
		||||
   that dumps an array of data into an HTML table.
 | 
			
		||||
   that dumps an array of data into an HTML <literal><table></literal>.
 | 
			
		||||
   </para>
 | 
			
		||||
 | 
			
		||||
 <informaltable frame="all">
 | 
			
		||||
@@ -30,7 +30,7 @@
 | 
			
		||||
     <entry>array</entry>
 | 
			
		||||
     <entry>Yes</entry>
 | 
			
		||||
     <entry><emphasis>n/a</emphasis></entry>
 | 
			
		||||
     <entry>array of data to loop through</entry>
 | 
			
		||||
     <entry>Array of data to loop through</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
     <entry>cols</entry>
 | 
			
		||||
@@ -38,7 +38,7 @@
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry><emphasis>3</emphasis></entry>
 | 
			
		||||
     <entry>
 | 
			
		||||
      number of columns in the table or a comma-separated list of column heading
 | 
			
		||||
      Number of columns in the table or a comma-separated list of column heading
 | 
			
		||||
      names or an array of column heading names.if the cols-attribute is empty,
 | 
			
		||||
      but rows are given, then the number of cols is computed by the number
 | 
			
		||||
      of rows and the number of elements to display to be just enough cols to
 | 
			
		||||
@@ -53,7 +53,7 @@
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry><emphasis>empty</emphasis></entry>
 | 
			
		||||
     <entry>
 | 
			
		||||
      number of rows in the table. if the rows-attribute is empty, but
 | 
			
		||||
      Number of rows in the table. if the rows-attribute is empty, but
 | 
			
		||||
      cols are given, then the number of rows is computed by the number of
 | 
			
		||||
      cols and the number of elements to display to be just enough rows to
 | 
			
		||||
      display all elements.
 | 
			
		||||
@@ -65,7 +65,7 @@
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry><emphasis>cols</emphasis></entry>
 | 
			
		||||
     <entry>
 | 
			
		||||
      direction of consecutive elements in the loop-array to be
 | 
			
		||||
      Direction of consecutive elements in the loop-array to be
 | 
			
		||||
      rendered. <emphasis>cols</emphasis> means elements are displayed
 | 
			
		||||
      col-by-col. <emphasis>rows</emphasis> means elements are displayed
 | 
			
		||||
      row-by-row.
 | 
			
		||||
@@ -76,44 +76,46 @@
 | 
			
		||||
     <entry>string</entry>
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry><emphasis>empty</emphasis></entry>
 | 
			
		||||
     <entry>
 | 
			
		||||
      text to be used for the caption element of the table.
 | 
			
		||||
     </entry>
 | 
			
		||||
     <entry>Text to be used for the <literal><caption></literal>
 | 
			
		||||
     element of the table</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
     <entry>table_attr</entry>
 | 
			
		||||
     <entry>string</entry>
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry><emphasis>border="1"</emphasis></entry>
 | 
			
		||||
     <entry>attributes for table tag</entry>
 | 
			
		||||
     <entry>Attributes for <literal><table></literal> tag</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
     <entry>th_attr</entry>
 | 
			
		||||
     <entry>string</entry>
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry><emphasis>empty</emphasis></entry>
 | 
			
		||||
     <entry>attributes for th tag (arrays are cycled)</entry>
 | 
			
		||||
     <entry>Attributes for <literal><th></literal> tag
 | 
			
		||||
     (arrays are cycled)</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
     <entry>tr_attr</entry>
 | 
			
		||||
     <entry>string</entry>
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry><emphasis>empty</emphasis></entry>
 | 
			
		||||
     <entry>attributes for tr tag (arrays are cycled)</entry>
 | 
			
		||||
     <entry>attributes for <literal><tr></literal> tag
 | 
			
		||||
     (arrays are cycled)</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
     <entry>td_attr</entry>
 | 
			
		||||
     <entry>string</entry>
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry><emphasis>empty</emphasis></entry>
 | 
			
		||||
     <entry>attributes for td tag (arrays are cycled)</entry>
 | 
			
		||||
     <entry>Attributes for <literal><td></literal> tag
 | 
			
		||||
     (arrays are cycled)</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
     <entry>trailpad</entry>
 | 
			
		||||
     <entry>string</entry>
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry><emphasis>&nbsp;</emphasis></entry>
 | 
			
		||||
     <entry>value to pad the trailing cells on last row with (if any)</entry>
 | 
			
		||||
     <entry>Value to pad the trailing cells on last row with (if any)</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
     <entry>hdir</entry>
 | 
			
		||||
@@ -121,7 +123,7 @@
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry><emphasis>right</emphasis></entry>
 | 
			
		||||
     <entry>
 | 
			
		||||
      direction of each row to be rendered. possible values:
 | 
			
		||||
      Direction of each row to be rendered. possible values:
 | 
			
		||||
      <emphasis>right</emphasis> (left-to-right), and
 | 
			
		||||
      <emphasis>left</emphasis> (right-to-left)
 | 
			
		||||
     </entry>
 | 
			
		||||
@@ -132,7 +134,7 @@
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry><emphasis>down</emphasis></entry>
 | 
			
		||||
     <entry>
 | 
			
		||||
      direction of each column to be rendered. possible values:
 | 
			
		||||
      Direction of each column to be rendered. possible values:
 | 
			
		||||
      <emphasis>down</emphasis> (top-to-bottom), <emphasis>up</emphasis>
 | 
			
		||||
      (bottom-to-top)
 | 
			
		||||
     </entry>
 | 
			
		||||
@@ -150,7 +152,8 @@
 | 
			
		||||
   <listitem><para>
 | 
			
		||||
   The <parameter>table_attr</parameter>, <parameter>tr_attr</parameter>
 | 
			
		||||
   and <parameter>td_attr</parameter> values  determine the attributes given
 | 
			
		||||
   to the <table>, <tr> and <td> tags.
 | 
			
		||||
   to the <literal><table></literal>, <literal><tr></literal>
 | 
			
		||||
   and <literal><td></literal> tags.
 | 
			
		||||
   </para></listitem>
 | 
			
		||||
 | 
			
		||||
   <listitem><para>
 | 
			
		||||
@@ -169,8 +172,8 @@
 | 
			
		||||
  <programlisting role="php">
 | 
			
		||||
<![CDATA[
 | 
			
		||||
<?php
 | 
			
		||||
$smarty->assign('data',array(1,2,3,4,5,6,7,8,9));
 | 
			
		||||
$smarty->assign('tr',array('bgcolor="#eeeeee"','bgcolor="#dddddd"'));
 | 
			
		||||
$smarty->assign( 'data', array(1,2,3,4,5,6,7,8,9) );
 | 
			
		||||
$smarty->assign( 'tr', array('bgcolor="#eeeeee"','bgcolor="#dddddd"') );
 | 
			
		||||
$smarty->display('index.tpl');
 | 
			
		||||
?>
 | 
			
		||||
]]>
 | 
			
		||||
 
 | 
			
		||||
@@ -3,9 +3,9 @@
 | 
			
		||||
<sect1 id="language.function.mailto">
 | 
			
		||||
 <title>{mailto}</title>
 | 
			
		||||
  <para>
 | 
			
		||||
   <varname>{mailto}</varname> automates the creation of mailto: links
 | 
			
		||||
   and optionally encodes them. Encoding e-mails makes it more difficult for
 | 
			
		||||
   web spiders to lift e-mail addresses off of a site.
 | 
			
		||||
   <varname>{mailto}</varname> automates the creation of a <literal>mailto:</literal>
 | 
			
		||||
   anchor links and optionally encodes them. Encoding emails makes it more
 | 
			
		||||
   difficult for web spiders to lift email addresses off of a site.
 | 
			
		||||
  <note>
 | 
			
		||||
  <title>Technical Note</title>
 | 
			
		||||
  <para>
 | 
			
		||||
@@ -117,7 +117,7 @@
 | 
			
		||||
 | 
			
		||||
{mailto address="me@example.com" encode="javascript"}
 | 
			
		||||
<script type="text/javascript" language="javascript">
 | 
			
		||||
 eval(unescape('%64%6f% ... snipped ...%61%3e%27%29%3b'))
 | 
			
		||||
   eval(unescape('%64%6f% ... snipped ...%61%3e%27%29%3b'))
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
{mailto address="me@example.com" encode="hex"}
 | 
			
		||||
@@ -134,9 +134,9 @@
 | 
			
		||||
 | 
			
		||||
{mailto address="me@example.com" encode="javascript_charcode"}
 | 
			
		||||
<script type="text/javascript" language="javascript">
 | 
			
		||||
<!--
 | 
			
		||||
{document.write(String.fromCharCode(60,97, ... snipped ....60,47,97,62))}
 | 
			
		||||
//-->
 | 
			
		||||
    <!--
 | 
			
		||||
    {document.write(String.fromCharCode(60,97, ... snipped ....60,47,97,62))}
 | 
			
		||||
    //-->
 | 
			
		||||
</script>
 | 
			
		||||
]]>
 | 
			
		||||
</programlisting>
 | 
			
		||||
@@ -145,8 +145,8 @@
 | 
			
		||||
 See also
 | 
			
		||||
 <link linkend="language.modifier.escape"><varname>escape</varname></link>,
 | 
			
		||||
 <link linkend="language.function.textformat"><varname>{textformat}</varname></link>
 | 
			
		||||
 and the
 | 
			
		||||
 <link linkend="tips.obfuscating.email">obfuscating email addresses</link> page.
 | 
			
		||||
 and
 | 
			
		||||
 <link linkend="tips.obfuscating.email">obfuscating email addresses</link>.
 | 
			
		||||
 </para>
 | 
			
		||||
</sect1>
 | 
			
		||||
<!-- Keep this comment at the end of the file
 | 
			
		||||
 
 | 
			
		||||
@@ -12,8 +12,8 @@
 | 
			
		||||
 | 
			
		||||
  <itemizedlist>
 | 
			
		||||
  <listitem><para>
 | 
			
		||||
  <varname>{popup_init}</varname> must be called
 | 
			
		||||
  <emphasis>only once</emphasis>, preferably within the <head> tag
 | 
			
		||||
  <varname>{popup_init}</varname> must be called <emphasis>only once</emphasis>,
 | 
			
		||||
  preferably within the <literal><head></literal> tag
 | 
			
		||||
 within any page you plan on using the <link linkend="language.function.popup">
 | 
			
		||||
 <varname>{popup}</varname></link> function.
 | 
			
		||||
 </para></listitem>
 | 
			
		||||
 
 | 
			
		||||
@@ -35,50 +35,49 @@
 | 
			
		||||
     <entry>string</entry>
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry><emphasis>n/a</emphasis></entry>
 | 
			
		||||
     <entry>preset style</entry>
 | 
			
		||||
     <entry>Preset style</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
     <entry>indent</entry>
 | 
			
		||||
     <entry>number</entry>
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry><emphasis>0</emphasis></entry>
 | 
			
		||||
     <entry>the number of chars to indent every line</entry>
 | 
			
		||||
     <entry>The number of chars to indent every line</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
     <entry>indent_first</entry>
 | 
			
		||||
     <entry>number</entry>
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry><emphasis>0</emphasis></entry>
 | 
			
		||||
     <entry>the number of chars to indent the first line</entry>
 | 
			
		||||
     <entry>The number of chars to indent the first line</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
     <entry>indent_char</entry>
 | 
			
		||||
     <entry>string</entry>
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry><emphasis>(single space)</emphasis></entry>
 | 
			
		||||
     <entry>the character (or string of chars) to indent with</entry>
 | 
			
		||||
     <entry>The character (or string of chars) to indent with</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
     <entry>wrap</entry>
 | 
			
		||||
     <entry>number</entry>
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry><emphasis>80</emphasis></entry>
 | 
			
		||||
     <entry>how many characters to wrap each line to</entry>
 | 
			
		||||
     <entry>How many characters to wrap each line to</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
     <entry>wrap_char</entry>
 | 
			
		||||
     <entry>string</entry>
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry><emphasis>\n</emphasis></entry>
 | 
			
		||||
     <entry>the character (or string of chars) to break each
 | 
			
		||||
      line with</entry>
 | 
			
		||||
     <entry>The character (or string of chars) to break each line with</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
     <entry>wrap_cut</entry>
 | 
			
		||||
     <entry>boolean</entry>
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry><emphasis>&false;</emphasis></entry>
 | 
			
		||||
     <entry>if &true;, wrap will break the line at the exact
 | 
			
		||||
     <entry>If &true;, wrap will break the line at the exact
 | 
			
		||||
      character instead of at a word boundary</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
    <row>
 | 
			
		||||
@@ -86,8 +85,7 @@
 | 
			
		||||
     <entry>string</entry>
 | 
			
		||||
     <entry>No</entry>
 | 
			
		||||
     <entry><emphasis>n/a</emphasis></entry>
 | 
			
		||||
     <entry>the template variable the output will be assigned
 | 
			
		||||
      to</entry>
 | 
			
		||||
     <entry>The template variable the output will be assigned to</entry>
 | 
			
		||||
    </row>
 | 
			
		||||
   </tbody>
 | 
			
		||||
  </tgroup>
 | 
			
		||||
@@ -269,9 +267,9 @@
 | 
			
		||||
 </example>
 | 
			
		||||
  <para>
 | 
			
		||||
  See also
 | 
			
		||||
   <link linkend="language.function.strip"><varname>{strip}</varname></link>
 | 
			
		||||
   and
 | 
			
		||||
   <link linkend="language.modifier.wordwrap"><varname>wordwrap</varname></link>.
 | 
			
		||||
  <link linkend="language.function.strip"><varname>{strip}</varname></link>
 | 
			
		||||
  and
 | 
			
		||||
  <link linkend="language.modifier.wordwrap"><varname>wordwrap</varname></link>.
 | 
			
		||||
 </para>
 | 
			
		||||
 | 
			
		||||
</sect1>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user