mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
don't use tabs
This commit is contained in:
@@ -1,99 +1,106 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<sect1 id="language.function.counter">
|
||||
<title>counter</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>Attribute Name</entry>
|
||||
<entry>Type</entry>
|
||||
<entry>Required</entry>
|
||||
<entry>Default</entry>
|
||||
<entry>Description</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>name</entry>
|
||||
<entry>string</entry>
|
||||
<entry>No</entry>
|
||||
<entry><emphasis>default</emphasis></entry>
|
||||
<entry>The name of the counter</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>start</entry>
|
||||
<entry>number</entry>
|
||||
<entry>No</entry>
|
||||
<entry><emphasis>1</emphasis></entry>
|
||||
<entry>The initial number to start counting from</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>skip</entry>
|
||||
<entry>number</entry>
|
||||
<entry>No</entry>
|
||||
<entry><emphasis>1</emphasis></entry>
|
||||
<entry>The interval to count by</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>direction</entry>
|
||||
<entry>string</entry>
|
||||
<entry>No</entry>
|
||||
<entry><emphasis>up</emphasis></entry>
|
||||
<entry>the direction to count (up/down)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>print</entry>
|
||||
<entry>boolean</entry>
|
||||
<entry>No</entry>
|
||||
<entry><emphasis>true</emphasis></entry>
|
||||
<entry>Whether or not to print the value</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>assign</entry>
|
||||
<entry>string</entry>
|
||||
<entry>No</entry>
|
||||
<entry><emphasis>n/a</emphasis></entry>
|
||||
<entry>the template variable the output will be assigned
|
||||
<sect1 id="language.function.counter">
|
||||
<title>counter</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>Attribute Name</entry>
|
||||
<entry>Type</entry>
|
||||
<entry>Required</entry>
|
||||
<entry>Default</entry>
|
||||
<entry>Description</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>name</entry>
|
||||
<entry>string</entry>
|
||||
<entry>No</entry>
|
||||
<entry><emphasis>default</emphasis></entry>
|
||||
<entry>The name of the counter</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>start</entry>
|
||||
<entry>number</entry>
|
||||
<entry>No</entry>
|
||||
<entry><emphasis>1</emphasis></entry>
|
||||
<entry>The initial number to start counting from</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>skip</entry>
|
||||
<entry>number</entry>
|
||||
<entry>No</entry>
|
||||
<entry><emphasis>1</emphasis></entry>
|
||||
<entry>The interval to count by</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>direction</entry>
|
||||
<entry>string</entry>
|
||||
<entry>No</entry>
|
||||
<entry><emphasis>up</emphasis></entry>
|
||||
<entry>the direction to count (up/down)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>print</entry>
|
||||
<entry>boolean</entry>
|
||||
<entry>No</entry>
|
||||
<entry><emphasis>true</emphasis></entry>
|
||||
<entry>Whether or not to print the value</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>assign</entry>
|
||||
<entry>string</entry>
|
||||
<entry>No</entry>
|
||||
<entry><emphasis>n/a</emphasis></entry>
|
||||
<entry>the template variable the output will be assigned
|
||||
to</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
<para>
|
||||
counter is used to print out a count. counter will remember the
|
||||
count on each iteration. You can adjust the number, the interval
|
||||
and the direction of the count, as well as determine whether or not
|
||||
to print the value. You can run multiple counters concurrently by
|
||||
supplying a unique name for each one. If you do not supply a name,
|
||||
the name 'default' will be used.
|
||||
</para>
|
||||
<para>
|
||||
If you supply the special "assign" attribute, the output of the
|
||||
counter function will be assigned to this template variable instead of
|
||||
being output to the template.
|
||||
</para>
|
||||
<example>
|
||||
<title>counter</title>
|
||||
<programlisting>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
<para>
|
||||
counter is used to print out a count. counter will remember the
|
||||
count on each iteration. You can adjust the number, the interval
|
||||
and the direction of the count, as well as determine whether or not
|
||||
to print the value. You can run multiple counters concurrently by
|
||||
supplying a unique name for each one. If you do not supply a name,
|
||||
the name 'default' will be used.
|
||||
</para>
|
||||
<para>
|
||||
If you supply the special "assign" attribute, the output of the
|
||||
counter function will be assigned to this template variable instead of
|
||||
being output to the template.
|
||||
</para>
|
||||
<example>
|
||||
<title>counter</title>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{* initialize the count *}
|
||||
{counter start=0 skip=2}<br>
|
||||
{counter}<br>
|
||||
{counter}<br>
|
||||
{counter}<br>
|
||||
|
||||
OUTPUT:
|
||||
|
||||
0<br>
|
||||
2<br>
|
||||
4<br>
|
||||
6<br></programlisting>
|
||||
</example>
|
||||
{counter start=0 skip=2}<br />
|
||||
{counter}<br />
|
||||
{counter}<br />
|
||||
{counter}<br />
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
this will output:
|
||||
</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
0<br />
|
||||
2<br />
|
||||
4<br />
|
||||
6<br />
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</sect1>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
@@ -1,118 +1,121 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<sect1 id="language.function.cycle">
|
||||
<title>cycle</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>Attribute Name</entry>
|
||||
<entry>Type</entry>
|
||||
<entry>Required</entry>
|
||||
<entry>Default</entry>
|
||||
<entry>Description</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>name</entry>
|
||||
<entry>string</entry>
|
||||
<entry>No</entry>
|
||||
<entry><emphasis>default</emphasis></entry>
|
||||
<entry>The name of the cycle</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>values</entry>
|
||||
<entry>mixed</entry>
|
||||
<entry>Yes</entry>
|
||||
<entry><emphasis>N/A</emphasis></entry>
|
||||
<entry>The values to cycle through, either a comma
|
||||
delimited list (see delimiter attribute), or an array
|
||||
of values.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>print</entry>
|
||||
<entry>boolean</entry>
|
||||
<entry>No</entry>
|
||||
<entry><emphasis>true</emphasis></entry>
|
||||
<entry>Whether to print the value or not</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>advance</entry>
|
||||
<entry>boolean</entry>
|
||||
<entry>No</entry>
|
||||
<entry><emphasis>true</emphasis></entry>
|
||||
<entry>Whether or not to advance to the next value</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>delimiter</entry>
|
||||
<entry>string</entry>
|
||||
<entry>No</entry>
|
||||
<entry><emphasis>,</emphasis></entry>
|
||||
<entry>The delimiter to use in the values attribute.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>assign</entry>
|
||||
<entry>string</entry>
|
||||
<entry>No</entry>
|
||||
<entry><emphasis>n/a</emphasis></entry>
|
||||
<entry>the template variable the output will be assigned
|
||||
to</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
<para>
|
||||
Cycle is used to cycle though a set of values. This makes it easy
|
||||
to alternate between two or more colors in a table, or cycle
|
||||
through an array of values.
|
||||
</para>
|
||||
<para>
|
||||
You can cycle through more than one set of values in your template
|
||||
by supplying a name attribute. Give each set of values a unique
|
||||
name.
|
||||
</para>
|
||||
<para>
|
||||
You can force the current value not to print with the print
|
||||
attribute set to false. This would be useful for silently skipping
|
||||
a value.
|
||||
</para>
|
||||
<para>
|
||||
The advance attribute is used to repeat a value. When set to false,
|
||||
the next call to cycle will print the same value.
|
||||
</para>
|
||||
<para>
|
||||
If you supply the special "assign" attribute, the output of the
|
||||
cycle function will be assigned to this template variable instead of
|
||||
being output to the template.
|
||||
</para>
|
||||
<example>
|
||||
<title>cycle</title>
|
||||
<programlisting>
|
||||
<sect1 id="language.function.cycle">
|
||||
<title>cycle</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>Attribute Name</entry>
|
||||
<entry>Type</entry>
|
||||
<entry>Required</entry>
|
||||
<entry>Default</entry>
|
||||
<entry>Description</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>name</entry>
|
||||
<entry>string</entry>
|
||||
<entry>No</entry>
|
||||
<entry><emphasis>default</emphasis></entry>
|
||||
<entry>The name of the cycle</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>values</entry>
|
||||
<entry>mixed</entry>
|
||||
<entry>Yes</entry>
|
||||
<entry><emphasis>N/A</emphasis></entry>
|
||||
<entry>The values to cycle through, either a comma
|
||||
delimited list (see delimiter attribute), or an array
|
||||
of values.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>print</entry>
|
||||
<entry>boolean</entry>
|
||||
<entry>No</entry>
|
||||
<entry><emphasis>true</emphasis></entry>
|
||||
<entry>Whether to print the value or not</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>advance</entry>
|
||||
<entry>boolean</entry>
|
||||
<entry>No</entry>
|
||||
<entry><emphasis>true</emphasis></entry>
|
||||
<entry>Whether or not to advance to the next value</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>delimiter</entry>
|
||||
<entry>string</entry>
|
||||
<entry>No</entry>
|
||||
<entry><emphasis>,</emphasis></entry>
|
||||
<entry>The delimiter to use in the values attribute.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>assign</entry>
|
||||
<entry>string</entry>
|
||||
<entry>No</entry>
|
||||
<entry><emphasis>n/a</emphasis></entry>
|
||||
<entry>the template variable the output will be assigned
|
||||
to</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
<para>
|
||||
Cycle is used to cycle though a set of values. This makes it easy
|
||||
to alternate between two or more colors in a table, or cycle
|
||||
through an array of values.
|
||||
</para>
|
||||
<para>
|
||||
You can cycle through more than one set of values in your template
|
||||
by supplying a name attribute. Give each set of values a unique
|
||||
name.
|
||||
</para>
|
||||
<para>
|
||||
You can force the current value not to print with the print
|
||||
attribute set to false. This would be useful for silently skipping
|
||||
a value.
|
||||
</para>
|
||||
<para>
|
||||
The advance attribute is used to repeat a value. When set to false,
|
||||
the next call to cycle will print the same value.
|
||||
</para>
|
||||
<para>
|
||||
If you supply the special "assign" attribute, the output of the
|
||||
cycle function will be assigned to this template variable instead of
|
||||
being output to the template.
|
||||
</para>
|
||||
<example>
|
||||
<title>cycle</title>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{section name=rows loop=$data}
|
||||
<tr bgcolor="{cycle values="#eeeeee,#d0d0d0"}">
|
||||
<td>{$data[rows]}</td>
|
||||
</tr>
|
||||
<tr bgcolor="{cycle values="#eeeeee,#d0d0d0"}">
|
||||
<td>{$data[rows]}</td>
|
||||
</tr>
|
||||
{/section}
|
||||
|
||||
OUTPUT:
|
||||
|
||||
<tr bgcolor="#eeeeee">
|
||||
<td>1</td>
|
||||
</tr>
|
||||
<tr bgcolor="#d0d0d0">
|
||||
<td>2</td>
|
||||
</tr>
|
||||
<tr bgcolor="#eeeeee">
|
||||
<td>3</td>
|
||||
</tr>
|
||||
</programlisting>
|
||||
</example>
|
||||
]]>
|
||||
</programlisting>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
<tr bgcolor="#eeeeee">
|
||||
<td>1</td>
|
||||
</tr>
|
||||
<tr bgcolor="#d0d0d0">
|
||||
<td>2</td>
|
||||
</tr>
|
||||
<tr bgcolor="#eeeeee">
|
||||
<td>3</td>
|
||||
</tr>
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</sect1>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
@@ -1,42 +1,42 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<sect1 id="language.function.debug">
|
||||
<title>debug</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>Attribute Name</entry>
|
||||
<entry>Type</entry>
|
||||
<entry>Required</entry>
|
||||
<entry>Default</entry>
|
||||
<entry>Description</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>output</entry>
|
||||
<entry>string</entry>
|
||||
<entry>No</entry>
|
||||
<entry><emphasis>html</emphasis></entry>
|
||||
<entry>output type, html or javascript</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
<para>
|
||||
{debug} dumps the debug console to the page. This works regardless
|
||||
of the <link linkend="chapter.debugging.console">debug</link>
|
||||
settings in Smarty. Since this gets executed at runtime, this is
|
||||
only able to show the assigned variables, not the templates that
|
||||
are in use. But, you see all the currently available variables
|
||||
within the scope of this template.
|
||||
</para>
|
||||
<sect1 id="language.function.debug">
|
||||
<title>debug</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>Attribute Name</entry>
|
||||
<entry>Type</entry>
|
||||
<entry>Required</entry>
|
||||
<entry>Default</entry>
|
||||
<entry>Description</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>output</entry>
|
||||
<entry>string</entry>
|
||||
<entry>No</entry>
|
||||
<entry><emphasis>html</emphasis></entry>
|
||||
<entry>output type, html or javascript</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
<para>
|
||||
{debug} dumps the debug console to the page. This works regardless
|
||||
of the <link linkend="chapter.debugging.console">debug</link>
|
||||
settings in Smarty. Since this gets executed at runtime, this is
|
||||
only able to show the assigned variables, not the templates that
|
||||
are in use. But, you see all the currently available variables
|
||||
within the scope of this template.
|
||||
</para>
|
||||
</sect1>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
@@ -1,74 +1,75 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<sect1 id="language.function.fetch">
|
||||
<title>fetch</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>Attribute Name</entry>
|
||||
<entry>Type</entry>
|
||||
<entry>Required</entry>
|
||||
<entry>Default</entry>
|
||||
<entry>Description</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>file</entry>
|
||||
<entry>string</entry>
|
||||
<entry>Yes</entry>
|
||||
<entry><emphasis>n/a</emphasis></entry>
|
||||
<entry>the file, http or ftp site to fetch</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>assign</entry>
|
||||
<entry>string</entry>
|
||||
<entry>No</entry>
|
||||
<entry><emphasis>n/a</emphasis></entry>
|
||||
<entry>the template variable the output will be assigned
|
||||
to</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
<para>
|
||||
fetch is used to fetch files from the local file system, http, or
|
||||
ftp and display the contents. If the file name begins with
|
||||
"http://", the web site page will be fetched and displayed. If the
|
||||
file name begins with "ftp://", the file will be fetched from the
|
||||
ftp server and displayed. For local files, the full system file
|
||||
path must be given, or a path relative to the executed php script.
|
||||
</para>
|
||||
<para>
|
||||
If you supply the special "assign" attribute, the output of the
|
||||
fetch function will be assigned to this template variable instead of
|
||||
being output to the template. (new in Smarty 1.5.0)
|
||||
</para>
|
||||
<note>
|
||||
<title>Technical Note</title>
|
||||
<para>
|
||||
This will not support http redirects, be sure to
|
||||
include a trailing slash on your web page fetches where necessary.
|
||||
</para>
|
||||
</note>
|
||||
<note>
|
||||
<title>Technical Note</title>
|
||||
<para>
|
||||
If template security is turned on and you are
|
||||
fetching a file from the local file system, this will only allow
|
||||
files from within one of the defined secure directories.
|
||||
($secure_dir)
|
||||
</para>
|
||||
</note>
|
||||
<example>
|
||||
<title>fetch</title>
|
||||
<programlisting>
|
||||
<sect1 id="language.function.fetch">
|
||||
<title>fetch</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>Attribute Name</entry>
|
||||
<entry>Type</entry>
|
||||
<entry>Required</entry>
|
||||
<entry>Default</entry>
|
||||
<entry>Description</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>file</entry>
|
||||
<entry>string</entry>
|
||||
<entry>Yes</entry>
|
||||
<entry><emphasis>n/a</emphasis></entry>
|
||||
<entry>the file, http or ftp site to fetch</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>assign</entry>
|
||||
<entry>string</entry>
|
||||
<entry>No</entry>
|
||||
<entry><emphasis>n/a</emphasis></entry>
|
||||
<entry>the template variable the output will be assigned
|
||||
to</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
<para>
|
||||
fetch is used to fetch files from the local file system, http, or
|
||||
ftp and display the contents. If the file name begins with
|
||||
"http://", the web site page will be fetched and displayed. If the
|
||||
file name begins with "ftp://", the file will be fetched from the
|
||||
ftp server and displayed. For local files, the full system file
|
||||
path must be given, or a path relative to the executed php script.
|
||||
</para>
|
||||
<para>
|
||||
If you supply the special "assign" attribute, the output of the
|
||||
fetch function will be assigned to this template variable instead of
|
||||
being output to the template. (new in Smarty 1.5.0)
|
||||
</para>
|
||||
<note>
|
||||
<title>Technical Note</title>
|
||||
<para>
|
||||
This will not support http redirects, be sure to
|
||||
include a trailing slash on your web page fetches where necessary.
|
||||
</para>
|
||||
</note>
|
||||
<note>
|
||||
<title>Technical Note</title>
|
||||
<para>
|
||||
If template security is turned on and you are
|
||||
fetching a file from the local file system, this will only allow
|
||||
files from within one of the defined secure directories.
|
||||
($secure_dir)
|
||||
</para>
|
||||
</note>
|
||||
<example>
|
||||
<title>fetch</title>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{* include some javascript in your template *}
|
||||
{fetch file="/export/httpd/www.domain.com/docs/navbar.js"}
|
||||
|
||||
@@ -81,9 +82,11 @@
|
||||
{* assign the fetched contents to a template variable *}
|
||||
{fetch file="http://www.myweather.com/68502/" assign="weather"}
|
||||
{if $weather ne ""}
|
||||
<b>{$weather}</b>
|
||||
{/if}</programlisting>
|
||||
</example>
|
||||
<b>{$weather}</b>
|
||||
{/if}
|
||||
]]
|
||||
</programlisting>
|
||||
</example>
|
||||
</sect1>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
@@ -1,129 +1,147 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<sect1 id="language.function.html.checkboxes">
|
||||
<title>html_checkboxes</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>Attribute Name</entry>
|
||||
<entry>Type</entry>
|
||||
<entry>Required</entry>
|
||||
<entry>Default</entry>
|
||||
<entry>Description</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>name</entry>
|
||||
<entry>string</entry>
|
||||
<entry>No</entry>
|
||||
<entry><emphasis>checkbox</emphasis></entry>
|
||||
<entry>name of checkbox 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 checkbox 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 checkbox buttons</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>selected</entry>
|
||||
<entry>string/array</entry>
|
||||
<entry>No</entry>
|
||||
<entry><emphasis>empty</emphasis></entry>
|
||||
<entry>the selected checkbox 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>
|
||||
</row>
|
||||
<row>
|
||||
<entry>separator</entry>
|
||||
<entry>string</entry>
|
||||
<entry>No</entry>
|
||||
<entry><emphasis>empty</emphasis></entry>
|
||||
<entry>string of text to separate each checkbox item</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>labels</entry>
|
||||
<entry>boolean</entry>
|
||||
<entry>No</entry>
|
||||
<entry><emphasis>true</emphasis></entry>
|
||||
<entry>add <label>-tags to the output</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
<para>
|
||||
html_checkboxes is a custom function that creates an html checkbox
|
||||
group with provided data. It takes care of which item(s) are
|
||||
selected by default as well. Required attributes are values and
|
||||
output, unless you use options instead. All output is XHTML
|
||||
compatible.
|
||||
</para>
|
||||
<para>
|
||||
All parameters that are not in the list above are printed as
|
||||
name/value-pairs inside each of the created <input>-tags.
|
||||
</para>
|
||||
<example>
|
||||
<title>html_checkboxes</title>
|
||||
<programlisting>
|
||||
index.php:
|
||||
<sect1 id="language.function.html.checkboxes">
|
||||
<title>html_checkboxes</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>Attribute Name</entry>
|
||||
<entry>Type</entry>
|
||||
<entry>Required</entry>
|
||||
<entry>Default</entry>
|
||||
<entry>Description</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>name</entry>
|
||||
<entry>string</entry>
|
||||
<entry>No</entry>
|
||||
<entry><emphasis>checkbox</emphasis></entry>
|
||||
<entry>name of checkbox 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 checkbox 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 checkbox buttons</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>selected</entry>
|
||||
<entry>string/array</entry>
|
||||
<entry>No</entry>
|
||||
<entry><emphasis>empty</emphasis></entry>
|
||||
<entry>the selected checkbox 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>
|
||||
</row>
|
||||
<row>
|
||||
<entry>separator</entry>
|
||||
<entry>string</entry>
|
||||
<entry>No</entry>
|
||||
<entry><emphasis>empty</emphasis></entry>
|
||||
<entry>string of text to separate each checkbox item</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>labels</entry>
|
||||
<entry>boolean</entry>
|
||||
<entry>No</entry>
|
||||
<entry><emphasis>true</emphasis></entry>
|
||||
<entry>add <label>-tags to the output</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
<para>
|
||||
html_checkboxes is a custom function that creates an html checkbox
|
||||
group with provided data. It takes care of which item(s) are
|
||||
selected by default as well. Required attributes are values and
|
||||
output, unless you use options instead. All output is XHTML
|
||||
compatible.
|
||||
</para>
|
||||
<para>
|
||||
All parameters that are not in the list above are printed as
|
||||
name/value-pairs inside each of the created <input>-tags.
|
||||
</para>
|
||||
<example>
|
||||
<title>html_checkboxes</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
require('Smarty.class.php');
|
||||
$smarty = new Smarty;
|
||||
$smarty->assign('cust_ids', array(1000,1001,1002,1003));
|
||||
$smarty->assign('cust_names', array('Joe Schmoe','Jack Smith','Jane Johnson','Charlie Brown'));
|
||||
$smarty->assign('customer_id', 1001);
|
||||
$smarty->display('index.tpl');
|
||||
$smarty->assign('cust_ids', array(1000,1001,1002,1003));
|
||||
$smarty->assign('cust_names', array('Joe Schmoe','Jack Smith','Jane Johnson','Charlie Brown'));
|
||||
$smarty->assign('customer_id', 1001);
|
||||
$smarty->display('index.tpl');
|
||||
|
||||
|
||||
index.tpl:
|
||||
|
||||
{html_checkboxes name="id" values=$cust_ids selected=$customer_id output=$cust_names separator="<br />"}
|
||||
|
||||
|
||||
index.php:
|
||||
?>
|
||||
]]
|
||||
</programlisting>
|
||||
<para>
|
||||
where index.tpl is:
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{html_checkboxes name="id" values=$cust_ids selected=$customer_id output=$cust_names separator="<br />"}
|
||||
]]
|
||||
</programlisting>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
require('Smarty.class.php');
|
||||
$smarty = new Smarty;
|
||||
$smarty->assign('cust_checkboxes', array(
|
||||
1000 => 'Joe Schmoe',
|
||||
1001 => 'Jack Smith',
|
||||
1002 => 'Jane Johnson',
|
||||
1003 => 'Charlie Brown'));
|
||||
$smarty->assign('customer_id', 1001);
|
||||
$smarty->display('index.tpl');
|
||||
|
||||
index.tpl:
|
||||
|
||||
$smarty->assign('cust_checkboxes', array(
|
||||
1000 => 'Joe Schmoe',
|
||||
1001 => 'Jack Smith',
|
||||
1002 => 'Jane Johnson',
|
||||
1003 => 'Charlie Brown'));
|
||||
$smarty->assign('customer_id', 1001);
|
||||
$smarty->display('index.tpl');
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
where index.tpl is:
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{html_checkboxes name="id" options=$cust_checkboxes selected=$customer_id separator="<br />"}
|
||||
|
||||
|
||||
OUTPUT: (both examples)
|
||||
|
||||
<label><input type="checkbox" name="id[]" value="1000" />Joe Schmoe</label><br />
|
||||
<label><input type="checkbox" name="id[]" value="1001" checked="checked" />Jack Smith</label><br />
|
||||
<label><input type="checkbox" name="id[]" value="1002" />Jane Johnson</label><br />
|
||||
<label><input type="checkbox" name="id[]" value="1003" />Charlie Brown</label><br /></programlisting>
|
||||
</example>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
both examples will output:
|
||||
</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
<label><input type="checkbox" name="id[]" value="1000" />Joe Schmoe</label><br />
|
||||
<label><input type="checkbox" name="id[]" value="1001" checked="checked" />Jack Smith</label><br />
|
||||
<label><input type="checkbox" name="id[]" value="1002" />Jane Johnson</label><br />
|
||||
<label><input type="checkbox" name="id[]" value="1003" />Charlie Brown</label><br />
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</sect1>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
@@ -1,318 +1,323 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<sect1 id="language.function.html.select.time">
|
||||
<title>html_select_time</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>Attribute Name</entry>
|
||||
<entry>Type</entry>
|
||||
<entry>Required</entry>
|
||||
<entry>Default</entry>
|
||||
<entry>Description</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>prefix</entry>
|
||||
<entry>string</entry>
|
||||
<entry>No</entry>
|
||||
<entry>Time_</entry>
|
||||
<entry>what to prefix the var name with</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>time</entry>
|
||||
<entry>timestamp</entry>
|
||||
<entry>No</entry>
|
||||
<entry>current time</entry>
|
||||
<entry>what date/time to use</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>display_hours</entry>
|
||||
<entry>boolean</entry>
|
||||
<entry>No</entry>
|
||||
<entry>true</entry>
|
||||
<entry>whether or not to display hours</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>display_minutes</entry>
|
||||
<entry>boolean</entry>
|
||||
<entry>No</entry>
|
||||
<entry>true</entry>
|
||||
<entry>whether or not to display minutes</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>display_seconds</entry>
|
||||
<entry>boolean</entry>
|
||||
<entry>No</entry>
|
||||
<entry>true</entry>
|
||||
<entry>whether or not to display seconds</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>display_meridian</entry>
|
||||
<entry>boolean</entry>
|
||||
<entry>No</entry>
|
||||
<entry>true</entry>
|
||||
<entry>whether or not to display meridian (am/pm)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>use_24_hours</entry>
|
||||
<entry>boolean</entry>
|
||||
<entry>No</entry>
|
||||
<entry>true</entry>
|
||||
<entry>whether or not to use 24 hour clock</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>minute_interval</entry>
|
||||
<entry>integer</entry>
|
||||
<entry>No</entry>
|
||||
<entry>1</entry>
|
||||
<entry>number interval in minute dropdown</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>second_interval</entry>
|
||||
<entry>integer</entry>
|
||||
<entry>No</entry>
|
||||
<entry>1</entry>
|
||||
<entry>number interval in second dropdown</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>field_array</entry>
|
||||
<entry>string</entry>
|
||||
<entry>No</entry>
|
||||
<entry>n/a</entry>
|
||||
<entry>outputs values to array of this name</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>all_extra</entry>
|
||||
<entry>string</entry>
|
||||
<entry>No</entry>
|
||||
<entry>null</entry>
|
||||
<entry>adds extra attributes to select/input tags if
|
||||
<sect1 id="language.function.html.select.time">
|
||||
<title>html_select_time</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>Attribute Name</entry>
|
||||
<entry>Type</entry>
|
||||
<entry>Required</entry>
|
||||
<entry>Default</entry>
|
||||
<entry>Description</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>prefix</entry>
|
||||
<entry>string</entry>
|
||||
<entry>No</entry>
|
||||
<entry>Time_</entry>
|
||||
<entry>what to prefix the var name with</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>time</entry>
|
||||
<entry>timestamp</entry>
|
||||
<entry>No</entry>
|
||||
<entry>current time</entry>
|
||||
<entry>what date/time to use</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>display_hours</entry>
|
||||
<entry>boolean</entry>
|
||||
<entry>No</entry>
|
||||
<entry>true</entry>
|
||||
<entry>whether or not to display hours</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>display_minutes</entry>
|
||||
<entry>boolean</entry>
|
||||
<entry>No</entry>
|
||||
<entry>true</entry>
|
||||
<entry>whether or not to display minutes</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>display_seconds</entry>
|
||||
<entry>boolean</entry>
|
||||
<entry>No</entry>
|
||||
<entry>true</entry>
|
||||
<entry>whether or not to display seconds</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>display_meridian</entry>
|
||||
<entry>boolean</entry>
|
||||
<entry>No</entry>
|
||||
<entry>true</entry>
|
||||
<entry>whether or not to display meridian (am/pm)</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>use_24_hours</entry>
|
||||
<entry>boolean</entry>
|
||||
<entry>No</entry>
|
||||
<entry>true</entry>
|
||||
<entry>whether or not to use 24 hour clock</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>minute_interval</entry>
|
||||
<entry>integer</entry>
|
||||
<entry>No</entry>
|
||||
<entry>1</entry>
|
||||
<entry>number interval in minute dropdown</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>second_interval</entry>
|
||||
<entry>integer</entry>
|
||||
<entry>No</entry>
|
||||
<entry>1</entry>
|
||||
<entry>number interval in second dropdown</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>field_array</entry>
|
||||
<entry>string</entry>
|
||||
<entry>No</entry>
|
||||
<entry>n/a</entry>
|
||||
<entry>outputs values to array of this name</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>all_extra</entry>
|
||||
<entry>string</entry>
|
||||
<entry>No</entry>
|
||||
<entry>null</entry>
|
||||
<entry>adds extra attributes to select/input tags if
|
||||
given</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>hour_extra</entry>
|
||||
<entry>string</entry>
|
||||
<entry>No</entry>
|
||||
<entry>null</entry>
|
||||
<entry>adds extra attributes to select/input tags if
|
||||
</row>
|
||||
<row>
|
||||
<entry>hour_extra</entry>
|
||||
<entry>string</entry>
|
||||
<entry>No</entry>
|
||||
<entry>null</entry>
|
||||
<entry>adds extra attributes to select/input tags if
|
||||
given</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>minute_extra</entry>
|
||||
<entry>string</entry>
|
||||
<entry>No</entry>
|
||||
<entry>null</entry>
|
||||
<entry>adds extra attributes to select/input tags if
|
||||
</row>
|
||||
<row>
|
||||
<entry>minute_extra</entry>
|
||||
<entry>string</entry>
|
||||
<entry>No</entry>
|
||||
<entry>null</entry>
|
||||
<entry>adds extra attributes to select/input tags if
|
||||
given</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>second_extra</entry>
|
||||
<entry>string</entry>
|
||||
<entry>No</entry>
|
||||
<entry>null</entry>
|
||||
<entry>adds extra attributes to select/input tags if
|
||||
</row>
|
||||
<row>
|
||||
<entry>second_extra</entry>
|
||||
<entry>string</entry>
|
||||
<entry>No</entry>
|
||||
<entry>null</entry>
|
||||
<entry>adds extra attributes to select/input tags if
|
||||
given</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>meridian_extra</entry>
|
||||
<entry>string</entry>
|
||||
<entry>No</entry>
|
||||
<entry>null</entry>
|
||||
<entry>adds extra attributes to select/input tags if
|
||||
</row>
|
||||
<row>
|
||||
<entry>meridian_extra</entry>
|
||||
<entry>string</entry>
|
||||
<entry>No</entry>
|
||||
<entry>null</entry>
|
||||
<entry>adds extra attributes to select/input tags if
|
||||
given</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
<para>
|
||||
html_select_time is a custom function that
|
||||
creates time dropdowns for you. It can display
|
||||
any or all of hour, minute, second and
|
||||
meridian.
|
||||
</para>
|
||||
<para>
|
||||
The time-attribute can have different
|
||||
formats. It can be a uniq-timestamp or a
|
||||
string containing Y-M-D. YYYY-MM-DD may be the
|
||||
most common, but months and days with less
|
||||
than two digits are also recognized. If one of
|
||||
the 3 values (Y,M,D) is the empty string, than
|
||||
the according select-box is not pre-selected
|
||||
at all. This is especially useful with the
|
||||
empty_year-, -month- and -day-attritbutes.
|
||||
</para>
|
||||
|
||||
<example>
|
||||
<title>html_select_time</title>
|
||||
<programlisting>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
<para>
|
||||
html_select_time is a custom function that
|
||||
creates time dropdowns for you. It can display
|
||||
any or all of hour, minute, second and
|
||||
meridian.
|
||||
</para>
|
||||
<para>
|
||||
The time-attribute can have different
|
||||
formats. It can be a uniq-timestamp or a
|
||||
string containing Y-M-D. YYYY-MM-DD may be the
|
||||
most common, but months and days with less
|
||||
than two digits are also recognized. If one of
|
||||
the 3 values (Y,M,D) is the empty string, than
|
||||
the according select-box is not pre-selected
|
||||
at all. This is especially useful with the
|
||||
empty_year-, -month- and -day-attritbutes.
|
||||
</para>
|
||||
<example>
|
||||
<title>html_select_time</title>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{html_select_time use_24_hours=true}
|
||||
|
||||
|
||||
OUTPUT:
|
||||
|
||||
<select name="Time_Hour">
|
||||
<option value="00">00</option>
|
||||
<option value="01">01</option>
|
||||
<option value="02">02</option>
|
||||
<option value="03">03</option>
|
||||
<option value="04">04</option>
|
||||
<option value="05">05</option>
|
||||
<option value="06">06</option>
|
||||
<option value="07">07</option>
|
||||
<option value="08">08</option>
|
||||
<option value="09" selected>09</option>
|
||||
<option value="10">10</option>
|
||||
<option value="11">11</option>
|
||||
<option value="12">12</option>
|
||||
<option value="13">13</option>
|
||||
<option value="14">14</option>
|
||||
<option value="15">15</option>
|
||||
<option value="16">16</option>
|
||||
<option value="17">17</option>
|
||||
<option value="18">18</option>
|
||||
<option value="19">19</option>
|
||||
<option value="20">20</option>
|
||||
<option value="21">21</option>
|
||||
<option value="22">22</option>
|
||||
<option value="23">23</option>
|
||||
</select>
|
||||
<select name="Time_Minute">
|
||||
<option value="00">00</option>
|
||||
<option value="01">01</option>
|
||||
<option value="02">02</option>
|
||||
<option value="03">03</option>
|
||||
<option value="04">04</option>
|
||||
<option value="05">05</option>
|
||||
<option value="06">06</option>
|
||||
<option value="07">07</option>
|
||||
<option value="08">08</option>
|
||||
<option value="09">09</option>
|
||||
<option value="10">10</option>
|
||||
<option value="11">11</option>
|
||||
<option value="12">12</option>
|
||||
<option value="13">13</option>
|
||||
<option value="14">14</option>
|
||||
<option value="15">15</option>
|
||||
<option value="16">16</option>
|
||||
<option value="17">17</option>
|
||||
<option value="18">18</option>
|
||||
<option value="19">19</option>
|
||||
<option value="20" selected>20</option>
|
||||
<option value="21">21</option>
|
||||
<option value="22">22</option>
|
||||
<option value="23">23</option>
|
||||
<option value="24">24</option>
|
||||
<option value="25">25</option>
|
||||
<option value="26">26</option>
|
||||
<option value="27">27</option>
|
||||
<option value="28">28</option>
|
||||
<option value="29">29</option>
|
||||
<option value="30">30</option>
|
||||
<option value="31">31</option>
|
||||
<option value="32">32</option>
|
||||
<option value="33">33</option>
|
||||
<option value="34">34</option>
|
||||
<option value="35">35</option>
|
||||
<option value="36">36</option>
|
||||
<option value="37">37</option>
|
||||
<option value="38">38</option>
|
||||
<option value="39">39</option>
|
||||
<option value="40">40</option>
|
||||
<option value="41">41</option>
|
||||
<option value="42">42</option>
|
||||
<option value="43">43</option>
|
||||
<option value="44">44</option>
|
||||
<option value="45">45</option>
|
||||
<option value="46">46</option>
|
||||
<option value="47">47</option>
|
||||
<option value="48">48</option>
|
||||
<option value="49">49</option>
|
||||
<option value="50">50</option>
|
||||
<option value="51">51</option>
|
||||
<option value="52">52</option>
|
||||
<option value="53">53</option>
|
||||
<option value="54">54</option>
|
||||
<option value="55">55</option>
|
||||
<option value="56">56</option>
|
||||
<option value="57">57</option>
|
||||
<option value="58">58</option>
|
||||
<option value="59">59</option>
|
||||
</select>
|
||||
<select name="Time_Second">
|
||||
<option value="00">00</option>
|
||||
<option value="01">01</option>
|
||||
<option value="02">02</option>
|
||||
<option value="03">03</option>
|
||||
<option value="04">04</option>
|
||||
<option value="05">05</option>
|
||||
<option value="06">06</option>
|
||||
<option value="07">07</option>
|
||||
<option value="08">08</option>
|
||||
<option value="09">09</option>
|
||||
<option value="10">10</option>
|
||||
<option value="11">11</option>
|
||||
<option value="12">12</option>
|
||||
<option value="13">13</option>
|
||||
<option value="14">14</option>
|
||||
<option value="15">15</option>
|
||||
<option value="16">16</option>
|
||||
<option value="17">17</option>
|
||||
<option value="18">18</option>
|
||||
<option value="19">19</option>
|
||||
<option value="20">20</option>
|
||||
<option value="21">21</option>
|
||||
<option value="22">22</option>
|
||||
<option value="23" selected>23</option>
|
||||
<option value="24">24</option>
|
||||
<option value="25">25</option>
|
||||
<option value="26">26</option>
|
||||
<option value="27">27</option>
|
||||
<option value="28">28</option>
|
||||
<option value="29">29</option>
|
||||
<option value="30">30</option>
|
||||
<option value="31">31</option>
|
||||
<option value="32">32</option>
|
||||
<option value="33">33</option>
|
||||
<option value="34">34</option>
|
||||
<option value="35">35</option>
|
||||
<option value="36">36</option>
|
||||
<option value="37">37</option>
|
||||
<option value="38">38</option>
|
||||
<option value="39">39</option>
|
||||
<option value="40">40</option>
|
||||
<option value="41">41</option>
|
||||
<option value="42">42</option>
|
||||
<option value="43">43</option>
|
||||
<option value="44">44</option>
|
||||
<option value="45">45</option>
|
||||
<option value="46">46</option>
|
||||
<option value="47">47</option>
|
||||
<option value="48">48</option>
|
||||
<option value="49">49</option>
|
||||
<option value="50">50</option>
|
||||
<option value="51">51</option>
|
||||
<option value="52">52</option>
|
||||
<option value="53">53</option>
|
||||
<option value="54">54</option>
|
||||
<option value="55">55</option>
|
||||
<option value="56">56</option>
|
||||
<option value="57">57</option>
|
||||
<option value="58">58</option>
|
||||
<option value="59">59</option>
|
||||
</select>
|
||||
<select name="Time_Meridian">
|
||||
<option value="am" selected>AM</option>
|
||||
<option value="pm">PM</option>
|
||||
</select></programlisting>
|
||||
</example>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
This will output:
|
||||
</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
<select name="Time_Hour">
|
||||
<option value="00">00</option>
|
||||
<option value="01">01</option>
|
||||
<option value="02">02</option>
|
||||
<option value="03">03</option>
|
||||
<option value="04">04</option>
|
||||
<option value="05">05</option>
|
||||
<option value="06">06</option>
|
||||
<option value="07">07</option>
|
||||
<option value="08">08</option>
|
||||
<option value="09" selected>09</option>
|
||||
<option value="10">10</option>
|
||||
<option value="11">11</option>
|
||||
<option value="12">12</option>
|
||||
<option value="13">13</option>
|
||||
<option value="14">14</option>
|
||||
<option value="15">15</option>
|
||||
<option value="16">16</option>
|
||||
<option value="17">17</option>
|
||||
<option value="18">18</option>
|
||||
<option value="19">19</option>
|
||||
<option value="20">20</option>
|
||||
<option value="21">21</option>
|
||||
<option value="22">22</option>
|
||||
<option value="23">23</option>
|
||||
</select>
|
||||
<select name="Time_Minute">
|
||||
<option value="00">00</option>
|
||||
<option value="01">01</option>
|
||||
<option value="02">02</option>
|
||||
<option value="03">03</option>
|
||||
<option value="04">04</option>
|
||||
<option value="05">05</option>
|
||||
<option value="06">06</option>
|
||||
<option value="07">07</option>
|
||||
<option value="08">08</option>
|
||||
<option value="09">09</option>
|
||||
<option value="10">10</option>
|
||||
<option value="11">11</option>
|
||||
<option value="12">12</option>
|
||||
<option value="13">13</option>
|
||||
<option value="14">14</option>
|
||||
<option value="15">15</option>
|
||||
<option value="16">16</option>
|
||||
<option value="17">17</option>
|
||||
<option value="18">18</option>
|
||||
<option value="19">19</option>
|
||||
<option value="20" selected>20</option>
|
||||
<option value="21">21</option>
|
||||
<option value="22">22</option>
|
||||
<option value="23">23</option>
|
||||
<option value="24">24</option>
|
||||
<option value="25">25</option>
|
||||
<option value="26">26</option>
|
||||
<option value="27">27</option>
|
||||
<option value="28">28</option>
|
||||
<option value="29">29</option>
|
||||
<option value="30">30</option>
|
||||
<option value="31">31</option>
|
||||
<option value="32">32</option>
|
||||
<option value="33">33</option>
|
||||
<option value="34">34</option>
|
||||
<option value="35">35</option>
|
||||
<option value="36">36</option>
|
||||
<option value="37">37</option>
|
||||
<option value="38">38</option>
|
||||
<option value="39">39</option>
|
||||
<option value="40">40</option>
|
||||
<option value="41">41</option>
|
||||
<option value="42">42</option>
|
||||
<option value="43">43</option>
|
||||
<option value="44">44</option>
|
||||
<option value="45">45</option>
|
||||
<option value="46">46</option>
|
||||
<option value="47">47</option>
|
||||
<option value="48">48</option>
|
||||
<option value="49">49</option>
|
||||
<option value="50">50</option>
|
||||
<option value="51">51</option>
|
||||
<option value="52">52</option>
|
||||
<option value="53">53</option>
|
||||
<option value="54">54</option>
|
||||
<option value="55">55</option>
|
||||
<option value="56">56</option>
|
||||
<option value="57">57</option>
|
||||
<option value="58">58</option>
|
||||
<option value="59">59</option>
|
||||
</select>
|
||||
<select name="Time_Second">
|
||||
<option value="00">00</option>
|
||||
<option value="01">01</option>
|
||||
<option value="02">02</option>
|
||||
<option value="03">03</option>
|
||||
<option value="04">04</option>
|
||||
<option value="05">05</option>
|
||||
<option value="06">06</option>
|
||||
<option value="07">07</option>
|
||||
<option value="08">08</option>
|
||||
<option value="09">09</option>
|
||||
<option value="10">10</option>
|
||||
<option value="11">11</option>
|
||||
<option value="12">12</option>
|
||||
<option value="13">13</option>
|
||||
<option value="14">14</option>
|
||||
<option value="15">15</option>
|
||||
<option value="16">16</option>
|
||||
<option value="17">17</option>
|
||||
<option value="18">18</option>
|
||||
<option value="19">19</option>
|
||||
<option value="20">20</option>
|
||||
<option value="21">21</option>
|
||||
<option value="22">22</option>
|
||||
<option value="23" selected>23</option>
|
||||
<option value="24">24</option>
|
||||
<option value="25">25</option>
|
||||
<option value="26">26</option>
|
||||
<option value="27">27</option>
|
||||
<option value="28">28</option>
|
||||
<option value="29">29</option>
|
||||
<option value="30">30</option>
|
||||
<option value="31">31</option>
|
||||
<option value="32">32</option>
|
||||
<option value="33">33</option>
|
||||
<option value="34">34</option>
|
||||
<option value="35">35</option>
|
||||
<option value="36">36</option>
|
||||
<option value="37">37</option>
|
||||
<option value="38">38</option>
|
||||
<option value="39">39</option>
|
||||
<option value="40">40</option>
|
||||
<option value="41">41</option>
|
||||
<option value="42">42</option>
|
||||
<option value="43">43</option>
|
||||
<option value="44">44</option>
|
||||
<option value="45">45</option>
|
||||
<option value="46">46</option>
|
||||
<option value="47">47</option>
|
||||
<option value="48">48</option>
|
||||
<option value="49">49</option>
|
||||
<option value="50">50</option>
|
||||
<option value="51">51</option>
|
||||
<option value="52">52</option>
|
||||
<option value="53">53</option>
|
||||
<option value="54">54</option>
|
||||
<option value="55">55</option>
|
||||
<option value="56">56</option>
|
||||
<option value="57">57</option>
|
||||
<option value="58">58</option>
|
||||
<option value="59">59</option>
|
||||
</select>
|
||||
<select name="Time_Meridian">
|
||||
<option value="am" selected>AM</option>
|
||||
<option value="pm">PM</option>
|
||||
</select>
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</sect1>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
@@ -1,28 +1,31 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<sect1 id="language.function.popup.init">
|
||||
<title>popup_init</title>
|
||||
<para>
|
||||
popup is an integration of overLib, a library used for popup
|
||||
windows. These are used for context sensitive information, such as
|
||||
help windows or tooltips. popup_init must be called once at the
|
||||
top of any page you plan on using the <link
|
||||
linkend="language.function.popup">popup</link> function. overLib
|
||||
was written by Erik Bosrup, and the homepage is located at
|
||||
http://www.bosrup.com/web/overlib/.
|
||||
</para>
|
||||
<para>
|
||||
As of Smarty version 2.1.2, overLib does NOT come with the release.
|
||||
Download overLib, place the overlib.js file under your document
|
||||
root and supply the relative path to this file as the "src"
|
||||
parameter to popup_init.
|
||||
</para>
|
||||
<example>
|
||||
<title>popup_init</title>
|
||||
<programlisting>
|
||||
<sect1 id="language.function.popup.init">
|
||||
<title>popup_init</title>
|
||||
<para>
|
||||
popup is an integration of overLib, a library used for popup
|
||||
windows. These are used for context sensitive information, such as
|
||||
help windows or tooltips. popup_init must be called once at the
|
||||
top of any page you plan on using the <link
|
||||
linkend="language.function.popup">popup</link> function. overLib
|
||||
was written by Erik Bosrup, and the homepage is located at
|
||||
http://www.bosrup.com/web/overlib/.
|
||||
</para>
|
||||
<para>
|
||||
As of Smarty version 2.1.2, overLib does NOT come with the release.
|
||||
Download overLib, place the overlib.js file under your document
|
||||
root and supply the relative path to this file as the "src"
|
||||
parameter to popup_init.
|
||||
</para>
|
||||
<example>
|
||||
<title>popup_init</title>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{* popup_init must be called once at the top of the page *}
|
||||
{popup_init src="/javascripts/overlib.js"}</programlisting>
|
||||
</example>
|
||||
{popup_init src="/javascripts/overlib.js"}
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</sect1>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
Reference in New Issue
Block a user