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