mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-03 05:41:37 +01:00
2410 lines
98 KiB
XML
2410 lines
98 KiB
XML
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||
|
|
<!-- $Revision$ -->
|
||
|
|
<chapter id="language.custom.functions">
|
||
|
|
<title>Eigene Funktionen</title>
|
||
|
|
<para>
|
||
|
|
Smarty wird mit verschiedenen massgeschneiderten Funktionen geliefert, welche Sie in
|
||
|
|
Ihren Templates verwenden können.
|
||
|
|
</para>
|
||
|
|
<sect1 id="language.function.assign">
|
||
|
|
<title>assign (zuweisen)</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>Attribut Name</entry>
|
||
|
|
<entry>Typ</entry>
|
||
|
|
<entry>Erforderlich</entry>
|
||
|
|
<entry>Standardwert</entry>
|
||
|
|
<entry>Beschreibung</entry>
|
||
|
|
</row>
|
||
|
|
</thead>
|
||
|
|
<tbody>
|
||
|
|
<row>
|
||
|
|
<entry>var</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Ja</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Der Name der zuzuweisenden Variable.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>value</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Ja</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Der zuzuweisende Wert.</entry>
|
||
|
|
</row>
|
||
|
|
</tbody>
|
||
|
|
</tgroup>
|
||
|
|
</informaltable>
|
||
|
|
<para>
|
||
|
|
'assign' wird verwendet um einer Template-Variable einen Wert zuzuweisen.
|
||
|
|
</para>
|
||
|
|
<example>
|
||
|
|
<title>assign (zuweisen)</title>
|
||
|
|
<programlisting>
|
||
|
|
{assign var="name" value="Bob"}
|
||
|
|
|
||
|
|
Der Wert von $name ist {$name}.
|
||
|
|
|
||
|
|
AUSGABE:
|
||
|
|
|
||
|
|
Der Wert von $name ist Bob.</programlisting>
|
||
|
|
</example>
|
||
|
|
</sect1>
|
||
|
|
<sect1 id="language.function.counter">
|
||
|
|
<title>counter (Zähler)</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>Attribut Name</entry>
|
||
|
|
<entry>Typ</entry>
|
||
|
|
<entry>Erforderlich</entry>
|
||
|
|
<entry>Standardwert</entry>
|
||
|
|
<entry>Beschreibung</entry>
|
||
|
|
</row>
|
||
|
|
</thead>
|
||
|
|
<tbody>
|
||
|
|
<row>
|
||
|
|
<entry>name</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>default</emphasis></entry>
|
||
|
|
<entry>Der Name des Zählers.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>start</entry>
|
||
|
|
<entry>number</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>1</emphasis></entry>
|
||
|
|
<entry>Der Initialwert.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>skip</entry>
|
||
|
|
<entry>number</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>1</emphasis></entry>
|
||
|
|
<entry>Der Interval.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>direction</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>up</emphasis></entry>
|
||
|
|
<entry>Die Richtung (up/down).</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>print</entry>
|
||
|
|
<entry>boolean</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>true</emphasis></entry>
|
||
|
|
<entry>Definiert ob der Wert ausgegeben werden soll.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>assign</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Die Template-Variable welcher der Wert zugewiesen werden soll.</entry>
|
||
|
|
</row>
|
||
|
|
</tbody>
|
||
|
|
</tgroup>
|
||
|
|
</informaltable>
|
||
|
|
<para>
|
||
|
|
'counter' wird verwendet um eine Zahlenreihe auszugeben. Sie können
|
||
|
|
den Initialwert bestimmen, den Zählinterval, die Richtung in der
|
||
|
|
gezählt werden soll und ob der Wert ausgegeben wird. Sie können
|
||
|
|
mehrere Zähler gleichzeitig laufen lassen, in dem Sie ihnen einmalige
|
||
|
|
Namen geben. Wenn Sie keinen Wert für 'name' übergeben, wird 'default'
|
||
|
|
verwendet.
|
||
|
|
</para>
|
||
|
|
<para>
|
||
|
|
Wenn Sie das spezielle 'assign'-Attribut verwenden, wird die Ausgabe des Zählers
|
||
|
|
dieser Template-Variable zugewiesen anstatt ausgegeben zu werden.
|
||
|
|
</para>
|
||
|
|
<example>
|
||
|
|
<title>counter (Zähler)</title>
|
||
|
|
<programlisting>
|
||
|
|
|
||
|
|
{* initialisieren *}
|
||
|
|
{counter start=0 skip=2 print=false}
|
||
|
|
|
||
|
|
{counter}<br>
|
||
|
|
{counter}<br>
|
||
|
|
{counter}<br>
|
||
|
|
{counter}<br>
|
||
|
|
|
||
|
|
AUSGABE:
|
||
|
|
|
||
|
|
2<br>
|
||
|
|
4<br>
|
||
|
|
6<br>
|
||
|
|
8<br></programlisting>
|
||
|
|
</example>
|
||
|
|
</sect1>
|
||
|
|
<sect1 id="language.function.cycle">
|
||
|
|
<title>cycle (Zyklus)</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>Attribut Name</entry>
|
||
|
|
<entry>Typ</entry>
|
||
|
|
<entry>Erforderlich</entry>
|
||
|
|
<entry>Standardwert</entry>
|
||
|
|
<entry>Beschreibung</entry>
|
||
|
|
</row>
|
||
|
|
</thead>
|
||
|
|
<tbody>
|
||
|
|
<row>
|
||
|
|
<entry>name</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>default</emphasis></entry>
|
||
|
|
<entry>Der Name des Zyklus.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>values</entry>
|
||
|
|
<entry>mixed</entry>
|
||
|
|
<entry>Ja</entry>
|
||
|
|
<entry><emphasis>N/A</emphasis></entry>
|
||
|
|
<entry>
|
||
|
|
Die Werte durch die zirkuliert werden soll, entweder als
|
||
|
|
Komma separierte Liste (siehe 'delimiter'-Attribut), oder
|
||
|
|
als Array.
|
||
|
|
</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>print</entry>
|
||
|
|
<entry>boolean</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>true</emphasis></entry>
|
||
|
|
<entry>Definiert ob die Werte ausgegeben werden sollen oder nicht.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>advance</entry>
|
||
|
|
<entry>boolean</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>true</emphasis></entry>
|
||
|
|
<entry>Definiert ob der nächste Wert automatisch angesprungen werden soll.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>delimiter</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>,</emphasis></entry>
|
||
|
|
<entry>Das zu verwendende Trennzeichen.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>assign</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Der Name der Template-Variable welcher die Ausgabe zugewiesen werden soll.</entry>
|
||
|
|
</row>
|
||
|
|
</tbody>
|
||
|
|
</tgroup>
|
||
|
|
</informaltable>
|
||
|
|
<para>
|
||
|
|
'cycle' wird verwendet um durch ein Set von Werten zu zirkulieren.
|
||
|
|
Dies vereinfacht die Handhabung von zwei oder mehr Farben in einer
|
||
|
|
Tabelle, oder um einen Array zu durchlaufen.
|
||
|
|
</para>
|
||
|
|
<para>
|
||
|
|
Sie können durch mehrere Sets gleichzeitig iterieren, indem
|
||
|
|
Sie den Sets einmalige Namen geben.
|
||
|
|
</para>
|
||
|
|
<para>
|
||
|
|
Um den aktuellen Wert nicht auszugeben, kann das 'print' Attribut auf
|
||
|
|
'false' gesetzt werden. Dies könnte sinnvoll sein, wenn man einen
|
||
|
|
einzelnen Wert überspringen möchte.
|
||
|
|
</para>
|
||
|
|
<para>
|
||
|
|
Das 'advance'-Attribut wird verwendet um einen Wert zu wiederholen.
|
||
|
|
Wenn auf 'false' gesetzt, wird bei der nächsten Iteration der selbe
|
||
|
|
Wert erneut ausgegeben.
|
||
|
|
</para>
|
||
|
|
<para>
|
||
|
|
Wenn sie das spezielle 'assign'-Attribut übergeben, wird die Ausgabe
|
||
|
|
der 'cycle'-Funktion in dieser Template-Variable abgelegt, anstatt ausgegeben zu werden.
|
||
|
|
</para>
|
||
|
|
<example>
|
||
|
|
<title>cycle (Zyklus)</title>
|
||
|
|
<programlisting>
|
||
|
|
|
||
|
|
{* initialisieren *}
|
||
|
|
{cycle values="#eeeeee,#d0d0d0"}
|
||
|
|
{cycle}
|
||
|
|
{cycle}
|
||
|
|
|
||
|
|
|
||
|
|
AUSGABE:
|
||
|
|
|
||
|
|
#eeeeee
|
||
|
|
#d0d0d0
|
||
|
|
#eeeeee</programlisting>
|
||
|
|
</example>
|
||
|
|
</sect1>
|
||
|
|
<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>Attribut Name</entry>
|
||
|
|
<entry>Typ</entry>
|
||
|
|
<entry>Erforderlich</entry>
|
||
|
|
<entry>Standardwert</entry>
|
||
|
|
<entry>Beschreibung</entry>
|
||
|
|
</row>
|
||
|
|
</thead>
|
||
|
|
<tbody>
|
||
|
|
<row>
|
||
|
|
<entry>output</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>html</emphasis></entry>
|
||
|
|
<entry>Ausgabe-Typ, entweder HTML oder Javascript.</entry>
|
||
|
|
</row>
|
||
|
|
</tbody>
|
||
|
|
</tgroup>
|
||
|
|
</informaltable>
|
||
|
|
<para>
|
||
|
|
{debug} zeigt die 'debugging'-Konsole auf der Seite an. <link linkend="chapter.debugging.console">$debug</link>
|
||
|
|
hat darauf keinen Einfluss. Da die Ausgabe zur Laufzeit geschieht, können die Template-Namen hier
|
||
|
|
nicht ausgegeben werden. Sie erhalten jedoch eine Liste aller zugewiesenen Variablen und deren Werten.
|
||
|
|
</para>
|
||
|
|
</sect1>
|
||
|
|
<sect1 id="language.function.eval">
|
||
|
|
<title>eval (auswerten)</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>Attribut Name</entry>
|
||
|
|
<entry>Typ</entry>
|
||
|
|
<entry>Erforderlich</entry>
|
||
|
|
<entry>Standardwert</entry>
|
||
|
|
<entry>Beschreibung</entry>
|
||
|
|
</row>
|
||
|
|
</thead>
|
||
|
|
<tbody>
|
||
|
|
<row>
|
||
|
|
<entry>var</entry>
|
||
|
|
<entry>mixed</entry>
|
||
|
|
<entry>Ja</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Variable oder Zeichenkette die ausgewertet werden soll.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>assign</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Die Template-Variable welcher die Ausgabe zugewiesen werden soll.</entry>
|
||
|
|
</row>
|
||
|
|
</tbody>
|
||
|
|
</tgroup>
|
||
|
|
</informaltable>
|
||
|
|
<para>
|
||
|
|
'eval' wird verwendet um eine Variable als Template auszuwerten. Dies kann
|
||
|
|
verwendet werden um Template-Tags/Variablen in einer Variable oder
|
||
|
|
einer Konfigurationsdatei abzulegen.
|
||
|
|
</para>
|
||
|
|
<para>
|
||
|
|
Wenn Sie das spezielle 'assign'-Attribut übergeben, wird die Ausgabe
|
||
|
|
von 'eval' in dieser Template-Variable gespeichert und nicht ausgegeben.
|
||
|
|
</para>
|
||
|
|
<note>
|
||
|
|
<title>Technische Bemerkung</title>
|
||
|
|
<para>
|
||
|
|
Evaluierte Variablen werden gleich wie Template-Variablen verwendet
|
||
|
|
und folgen den selben Maskierungs- und Sicherheits-Features.
|
||
|
|
</para>
|
||
|
|
</note>
|
||
|
|
<note>
|
||
|
|
<title>Technische Bemerkung</title>
|
||
|
|
<para>
|
||
|
|
Evaluierte Variablen werden bei jedem Aufruf neu ausgewertet. Die kompilierten
|
||
|
|
Versionen werden dabei nicht abgelegt! Falls sie caching eingeschaltet haben, wird
|
||
|
|
die Ausgabe jedoch mit dem Rest des Templates gecached.
|
||
|
|
</para>
|
||
|
|
</note>
|
||
|
|
<example>
|
||
|
|
<title>eval (auswerten)</title>
|
||
|
|
<programlisting>
|
||
|
|
setup.conf
|
||
|
|
----------
|
||
|
|
|
||
|
|
emphstart = <b>
|
||
|
|
emphend = </b>
|
||
|
|
title = Willkommen auf {$company}'s home page!
|
||
|
|
ErrorCity = Bitte geben Sie einen {#emphstart#}Stadtnamen{#emphend#} ein.
|
||
|
|
ErrorState = Bitte geben Sie einen {#emphstart#}Provinznamen{#emphend#} ein.
|
||
|
|
|
||
|
|
|
||
|
|
index.tpl
|
||
|
|
---------
|
||
|
|
|
||
|
|
{config_load file="setup.conf"}
|
||
|
|
|
||
|
|
{eval var=$foo}
|
||
|
|
{eval var=#title#}
|
||
|
|
{eval var=#ErrorCity#}
|
||
|
|
{eval var=#ErrorState# assign="state_error"}
|
||
|
|
{$state_error}
|
||
|
|
|
||
|
|
AUSGABE:
|
||
|
|
|
||
|
|
Dies ist der Inhalt von foo:
|
||
|
|
|
||
|
|
Willkommen auf Pub & Grill's home page!
|
||
|
|
Bitte geben Sie einen <b>Stadtnamen</b> ein.
|
||
|
|
Bitte geben Sie einen <b>Provinznamen</b> ein.
|
||
|
|
|
||
|
|
</programlisting>
|
||
|
|
</example>
|
||
|
|
</sect1>
|
||
|
|
<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>Attribut Name</entry>
|
||
|
|
<entry>Typ</entry>
|
||
|
|
<entry>Erforderlich</entry>
|
||
|
|
<entry>Standardwert</entry>
|
||
|
|
<entry>Beschreibung</entry>
|
||
|
|
</row>
|
||
|
|
</thead>
|
||
|
|
<tbody>
|
||
|
|
<row>
|
||
|
|
<entry>file</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Ja</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Die Datei, FTP oder HTTP Seite die geliefert werden soll.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>assign</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Die Template-Variable welcher die Ausgabe zugewiesen werden soll.</entry>
|
||
|
|
</row>
|
||
|
|
</tbody>
|
||
|
|
</tgroup>
|
||
|
|
</informaltable>
|
||
|
|
<para>
|
||
|
|
'fetch' wird verwendet um lokale oder via HTTP beziehungsweise FTP verfügbare Inhalte
|
||
|
|
auszugeben. Wenn der Dateiname mit 'http://' anfängt, wird die angegebene
|
||
|
|
Webseite geladen und angezeigt. Wenn der Dateiname mit 'ftp://' anfängt
|
||
|
|
wird die Datei vom FTP-Server geladen und angezeigt. Für lokale Dateien
|
||
|
|
muss der absolute Pfad, oder ein Pfad relativ zum ausgeführten Skript übergeben werden.
|
||
|
|
</para>
|
||
|
|
<para>
|
||
|
|
Wenn Sie das spezielle 'assign'-Attribut übergeben, wird die Ausgabe
|
||
|
|
der 'fetch'-Funktion dieser Template-Variable zugewiesen, anstatt ausgegeben
|
||
|
|
zu werden (seit Smarty 1.5.0).
|
||
|
|
</para>
|
||
|
|
<note>
|
||
|
|
<title>Technische Bemerkung</title>
|
||
|
|
<para>
|
||
|
|
HTTP-Redirects werden nicht unterstützt, stellen Sie sicher,
|
||
|
|
dass die aufgerufene URL falls nötig durch ein '/'-Zeichen (slash) beendet wird.
|
||
|
|
</para>
|
||
|
|
</note>
|
||
|
|
<note>
|
||
|
|
<title>Technische Bemerkung</title>
|
||
|
|
<para>
|
||
|
|
Wenn Sicherheit eingeschaltet ist, und Dateien vom lokalen System
|
||
|
|
geladen werden sollen, ist dies nur für Dateien erlaubt welche
|
||
|
|
sich in einem definierten sicheren Verzeichnis befinden. ($secure_dir)
|
||
|
|
</para>
|
||
|
|
</note>
|
||
|
|
<example>
|
||
|
|
<title>fetch</title>
|
||
|
|
<programlisting>
|
||
|
|
|
||
|
|
{* einbinden von javascript *}
|
||
|
|
{fetch file="/export/httpd/www.domain.com/docs/navbar.js"}
|
||
|
|
|
||
|
|
|
||
|
|
{* Wetter Informationen aus einer anderen Webseite bei uns anzeigen *}
|
||
|
|
{fetch file="http://www.myweather.com/68502/"}
|
||
|
|
|
||
|
|
|
||
|
|
{* News Datei via FTP auslesen *}
|
||
|
|
{fetch file="ftp://user:password@ftp.domain.com/path/to/currentheadlines.txt"}
|
||
|
|
|
||
|
|
|
||
|
|
{* die Ausgabe einer Template variable zuweisen *}
|
||
|
|
{fetch file="http://www.myweather.com/68502/" assign="weather"}
|
||
|
|
{if $weather ne ""}
|
||
|
|
<b>{$weather}</b>
|
||
|
|
{/if}</programlisting>
|
||
|
|
</example>
|
||
|
|
</sect1>
|
||
|
|
<sect1 id="language.function.html.checkboxes">
|
||
|
|
<title>html_checkboxes (Ausgabe von HTML-CHECKBOX Tag)</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>Attribut Name</entry>
|
||
|
|
<entry>Typ</entry>
|
||
|
|
<entry>Erforderlich</entry>
|
||
|
|
<entry>Standardwert</entry>
|
||
|
|
<entry>Beschreibung</entry>
|
||
|
|
</row>
|
||
|
|
</thead>
|
||
|
|
<tbody>
|
||
|
|
<row>
|
||
|
|
<entry>name</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>checkbox</emphasis></entry>
|
||
|
|
<entry>Name der checkbox Liste</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>values</entry>
|
||
|
|
<entry>array</entry>
|
||
|
|
<entry>ja, ausser wenn das option Attribut verwendet wird</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>ein Array mit Werten für die checkboxes</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>output</entry>
|
||
|
|
<entry>array</entry>
|
||
|
|
<entry>ja, ausser wenn das option Attribut verwendet wird</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>ein Array mit Werten für checkbox Knöpfe</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>selected</entry>
|
||
|
|
<entry>string/array</entry>
|
||
|
|
<entry>No</entry>
|
||
|
|
<entry><emphasis>empty</emphasis></entry>
|
||
|
|
<entry>das/die ausgewählten checkbox Elemente</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>options</entry>
|
||
|
|
<entry>assoziatives array</entry>
|
||
|
|
<entry>Ja, ausser values/output wird verwendet</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>ein assoziatives Array mit Werten und Ausgaben</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>separator</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>No</entry>
|
||
|
|
<entry><emphasis>empty</emphasis></entry>
|
||
|
|
<entry>Zeichenkette die zwischen den checkbox Elementen eingefügt werden soll</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>labels</entry>
|
||
|
|
<entry>boolean</entry>
|
||
|
|
<entry>No</entry>
|
||
|
|
<entry><emphasis>true</emphasis></entry>
|
||
|
|
<entry>fügt der Ausgabe <label>-Tags hinzu</entry>
|
||
|
|
</row>
|
||
|
|
</tbody>
|
||
|
|
</tgroup>
|
||
|
|
</informaltable>
|
||
|
|
<para>
|
||
|
|
html_checkboxes ist eine Funktion die aus den übergebenen Daten html checkbox
|
||
|
|
Elemente erstellt und kümmert sich darum welche Elemente ausgewählt sind.
|
||
|
|
Erforderliche Attribute sind Wert/Ausgabe oder Options. Die Ausgabe ist XHTML kompatibel
|
||
|
|
</para>
|
||
|
|
<para>
|
||
|
|
Alle Parameter die nicht in der Liste erwähnt werden, werden ausgegeben.
|
||
|
|
</para>
|
||
|
|
<example>
|
||
|
|
<title>html_checkboxes</title>
|
||
|
|
<programlisting>
|
||
|
|
index.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');
|
||
|
|
|
||
|
|
|
||
|
|
index.tpl:
|
||
|
|
|
||
|
|
{html_checkboxes values=$cust_ids checked=$customer_id output=$cust_names separator="<br />"}
|
||
|
|
|
||
|
|
|
||
|
|
index.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:
|
||
|
|
|
||
|
|
{html_checkboxes name="id" options=$cust_checkboxes checked=$customer_id separator="<br />"}
|
||
|
|
|
||
|
|
|
||
|
|
AUSGABE: (beider Beispiele)
|
||
|
|
|
||
|
|
<label><input type="checkbox" name="checkbox[]" value="1000" />Joe Schmoe</label><br />
|
||
|
|
<label><input type="checkbox" name="checkbox[]" value="1001" checked="checked" />Jack Smith</label><br />
|
||
|
|
<label><input type="checkbox" name="checkbox[]" value="1002" />Jane Johnson</label><br />
|
||
|
|
<label><input type="checkbox" name="checkbox[]" value="1003" />Charlie Brown</label><br /></programlisting>
|
||
|
|
</example>
|
||
|
|
</sect1>
|
||
|
|
<sect1 id="language.function.html.image">
|
||
|
|
<title>html_image (Ausgabe von HTML-IMG Tag)</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>Attribut Name</entry>
|
||
|
|
<entry>Typ</entry>
|
||
|
|
<entry>Erforderlich</entry>
|
||
|
|
<entry>Standardwert</entry>
|
||
|
|
<entry>Beschreibung</entry>
|
||
|
|
</row>
|
||
|
|
</thead>
|
||
|
|
<tbody>
|
||
|
|
<row>
|
||
|
|
<entry>file</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Ja</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Name/Pfad zum Bild</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>border</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>0</emphasis></entry>
|
||
|
|
<entry>Stärke des Rahmens</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>height</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>No</entry>
|
||
|
|
<entry><emphasis>Normale Höhe des Bildes</emphasis></entry>
|
||
|
|
<entry>Höhe des Bildes</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>width</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>No</entry>
|
||
|
|
<entry><emphasis>Normale Breite des Bildes</emphasis></entry>
|
||
|
|
<entry>Breite des Bildes</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>basedir</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>no</entry>
|
||
|
|
<entry><emphasis>DOCUMENTROOT</emphasis></entry>
|
||
|
|
<entry>Basisverzeichnis für relative Pfadangaben</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>alt</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>no</entry>
|
||
|
|
<entry><emphasis>""</emphasis></entry>
|
||
|
|
<entry>Alternative Beschreibung des Bildes</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>href</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>no</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Link für das Bild</entry>
|
||
|
|
</row>
|
||
|
|
</tbody>
|
||
|
|
</tgroup>
|
||
|
|
</informaltable>
|
||
|
|
<para>
|
||
|
|
html_image ist eine eigene Funktion die ein HTML Tag für ein Bild erzeugt.
|
||
|
|
Die Höhe und Breite der Ausgabe wird automatisch aus der Bilddatei berechnet
|
||
|
|
wenn die Werte nicht übergeben werden.
|
||
|
|
</para>
|
||
|
|
<para>
|
||
|
|
basedir ist der Basispfad der für die Verlinkung verwendet werden soll. Wenn kein
|
||
|
|
Wert übergeben wird, wird die Umgebungsvariable DOCUMENT_ROOT verwendet. Wenn Sicherheit
|
||
|
|
eingeschaltet ist, muss das Bild in einem sicheren Verzeichnis liegen.
|
||
|
|
</para>
|
||
|
|
<para>
|
||
|
|
<parameter>href</parameter> ist das href Attribut für das Image-Tag. Wenn dieser Wert übergeben wird,
|
||
|
|
wird um das Bild ein <a href="LINKVALUE"><a> Tag erzeugt.
|
||
|
|
</para>
|
||
|
|
<note>
|
||
|
|
<title>Technische Bemerkung</title>
|
||
|
|
<para>
|
||
|
|
html_image greift auf das Dateisystem zu um Höhe und Breite zu errechnen. Wenn Sie
|
||
|
|
caching nicht verwenden sollten Sie normalerweise auf diese Funktion aus performance Gründen verzichten.
|
||
|
|
</para>
|
||
|
|
</note>
|
||
|
|
<example>
|
||
|
|
<title>html_image</title>
|
||
|
|
<programlisting>
|
||
|
|
index.php:
|
||
|
|
|
||
|
|
require('Smarty.class.php');
|
||
|
|
$smarty = new Smarty;
|
||
|
|
$smarty->display('index.tpl');
|
||
|
|
|
||
|
|
index.tpl:
|
||
|
|
|
||
|
|
{html_image file="pumpkin.jpg"}
|
||
|
|
{html_image file="/path/from/docroot/pumpkin.jpg"}
|
||
|
|
{html_image file="../path/relative/to/currdir/pumpkin.jpg"}
|
||
|
|
|
||
|
|
AUSGABE: (möglich)
|
||
|
|
|
||
|
|
<img src="pumpkin.jpg" alt="" border="0" width="44" height="68" />
|
||
|
|
<img src="/path/from/docroot/pumpkin.jpg" alt="" border="0" width="44" height="68" />
|
||
|
|
<img src="../path/relative/to/currdir/pumpkin.jpg" alt="" border="0" width="44" height="68" /></programlisting>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</example>
|
||
|
|
</sect1>
|
||
|
|
<sect1 id="language.function.html.options">
|
||
|
|
<title>html_options (Ausgabe von HTML-Options)</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>Attribut Name</entry>
|
||
|
|
<entry>Typ</entry>
|
||
|
|
<entry>Erforderlich</entry>
|
||
|
|
<entry>Standardwert</entry>
|
||
|
|
<entry>Beschreibung</entry>
|
||
|
|
</row>
|
||
|
|
</thead>
|
||
|
|
<tbody>
|
||
|
|
<row>
|
||
|
|
<entry>values</entry>
|
||
|
|
<entry>array</entry>
|
||
|
|
<entry>Ja, ausser 'options'-Attribut wird verwendet.</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Array mit Werten für die dropdown-Liste.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>output</entry>
|
||
|
|
<entry>array</entry>
|
||
|
|
<entry>Ja, ausser 'options'-Attribut wird verwendet.</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Arrays mit Namen für die dropdown-Liste.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>selected</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>empty</emphasis></entry>
|
||
|
|
<entry>Das ausgewählte Array Element.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>options</entry>
|
||
|
|
<entry>associative array</entry>
|
||
|
|
<entry>Ja, ausser wenn das 'values'- und das 'output'-Attribut verwendet werden.</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Assoziatives Array mit Werten die ausgegeben werden sollen.</entry>
|
||
|
|
</row>
|
||
|
|
</tbody>
|
||
|
|
</tgroup>
|
||
|
|
</informaltable>
|
||
|
|
<para>
|
||
|
|
'html_options' wird verwendet um HTML-Options Listen mit den übergebenen Daten
|
||
|
|
zu erzeugen. Die Funktion kümmert sich ebenfalls um das setzen des ausgewählten
|
||
|
|
Standardwertes. Die Attribute 'values' und 'output' sind erforderlich,
|
||
|
|
ausser man verwendet das Attribut 'options'. Wenn ein Wert als Array erkannt wird,
|
||
|
|
wird er als HTML-OPTGROUP ausgegeben und die Werte werden in Gruppen dargestellt.
|
||
|
|
Rekursion wird unterstützt. Die Ausgabe ist XHTML kompatibel.
|
||
|
|
</para>
|
||
|
|
<example>
|
||
|
|
<title>html_options</title>
|
||
|
|
<programlisting>
|
||
|
|
{* nehmen Sie an, dass $cust_ids und $cust_names Arrays mit Werten sind,
|
||
|
|
während $customer_id auch leer sein kann *}
|
||
|
|
|
||
|
|
<select name=customer_id>
|
||
|
|
{html_options values=$cust_ids selected=$customer_id output=$cust_names}
|
||
|
|
</select>
|
||
|
|
|
||
|
|
|
||
|
|
{* alternativ können die Werte aus 'values' und 'output' als assoziative Arrays
|
||
|
|
an 'options' übergeben werden. $customer_options ist in diesem Beispiel ein assoziatives Array *}
|
||
|
|
|
||
|
|
<select name=customer_id>
|
||
|
|
{html_options options=$customer_options selected=$customer_id}
|
||
|
|
</select>
|
||
|
|
|
||
|
|
|
||
|
|
AUSGABE:
|
||
|
|
|
||
|
|
<select name=customer_id>
|
||
|
|
<option value="1000">Joe Schmoe</option>
|
||
|
|
<option value="1001" selected="selected">Jack Smith</option>
|
||
|
|
<option value="1002">Jane Johnson</option>
|
||
|
|
<option value="1003">Charlie Brown</option>
|
||
|
|
</select></programlisting>
|
||
|
|
</example>
|
||
|
|
</sect1>
|
||
|
|
<sect1 id="language.function.html.radios">
|
||
|
|
<title>html_radios (Ausgabe von HTML-RADIO Tags)</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>Attribut Name</entry>
|
||
|
|
<entry>Typ</entry>
|
||
|
|
<entry>Erforderlich</entry>
|
||
|
|
<entry>Standardwert</entry>
|
||
|
|
<entry>Beschreibung</entry>
|
||
|
|
</row>
|
||
|
|
</thead>
|
||
|
|
<tbody>
|
||
|
|
<row>
|
||
|
|
<entry>name</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>radio</emphasis></entry>
|
||
|
|
<entry>Name der Radio Liste</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>values</entry>
|
||
|
|
<entry>array</entry>
|
||
|
|
<entry>Ja, ausser 'options'-Attribut wird verwendet.</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Array mit Werten für die dropdown-Liste.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>output</entry>
|
||
|
|
<entry>array</entry>
|
||
|
|
<entry>Ja, ausser 'options'-Attribut wird verwendet.</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Arrays mit Namen für die dropdown-Liste.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>selected</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>empty</emphasis></entry>
|
||
|
|
<entry>Das ausgewählte Array Element.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>options</entry>
|
||
|
|
<entry>associative array</entry>
|
||
|
|
<entry>Ja, ausser wenn das 'values'- und das 'output'-Attribut verwendet werden.</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Assoziatives Array mit Werten die ausgegeben werden sollen.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>separator</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>No</entry>
|
||
|
|
<entry><emphasis>empty</emphasis></entry>
|
||
|
|
<entry>Die Zeichenkette die zwischen 2 Radioelemente eingefügt werden soll.</entry>
|
||
|
|
</row>
|
||
|
|
</tbody>
|
||
|
|
</tgroup>
|
||
|
|
</informaltable>
|
||
|
|
<para>
|
||
|
|
html_radio ist eine Funktion die aus den übergebenen Daten html radio
|
||
|
|
Elemente erstellt und kümmert sich darum welche Elemente ausgewählt sind.
|
||
|
|
Erforderliche Attribute sind Wert/Ausgabe oder Options. Die Ausgabe ist XHTML kompatibel
|
||
|
|
</para>
|
||
|
|
<example>
|
||
|
|
<title>html_radios</title>
|
||
|
|
<programlisting>
|
||
|
|
index.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','Carlie Brown'));
|
||
|
|
$smarty->assign('customer_id', 1001);
|
||
|
|
$smarty->display('index.tpl');
|
||
|
|
|
||
|
|
|
||
|
|
index.tpl:
|
||
|
|
|
||
|
|
{html_radios values=$cust_ids checked=$customer_id output=$cust_names separator="<br />"}
|
||
|
|
|
||
|
|
|
||
|
|
index.php:
|
||
|
|
|
||
|
|
require('Smarty.class.php');
|
||
|
|
$smarty = new Smarty;
|
||
|
|
$smarty->assign('cust_radios', array(
|
||
|
|
1001 => 'Joe Schmoe',
|
||
|
|
1002 => 'Jack Smith',
|
||
|
|
1003 => 'Jane Johnson',
|
||
|
|
1004 => 'Charlie Brown'));
|
||
|
|
$smarty->assign('customer_id', 1001);
|
||
|
|
$smarty->display('index.tpl');
|
||
|
|
|
||
|
|
|
||
|
|
index.tpl:
|
||
|
|
|
||
|
|
{html_radios name="id" options=$cust_radios checked=$customer_id separator="<br />"}
|
||
|
|
|
||
|
|
|
||
|
|
AUSGABE: (beider Beispiele)
|
||
|
|
|
||
|
|
<input type="radio" name="id[]" value="1000">Joe Schmoe<br />
|
||
|
|
<input type="radio" name="id[]" value="1001" checked="checked"><br />
|
||
|
|
<input type="radio" name="id[]" value="1002">Jane Johnson<br />
|
||
|
|
<input type="radio" name="id[]" value="1003">Charlie Brown<br /></programlisting>
|
||
|
|
</example>
|
||
|
|
</sect1>
|
||
|
|
|
||
|
|
<sect1 id="language.function.html.select.date">
|
||
|
|
<title>html_select_date (Ausgabe von Daten als HTML-'options')</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>Attribut Name</entry>
|
||
|
|
<entry>Typ</entry>
|
||
|
|
<entry>Erforderlich</entry>
|
||
|
|
<entry>Standardwert</entry>
|
||
|
|
<entry>Beschreibung</entry>
|
||
|
|
</row>
|
||
|
|
</thead>
|
||
|
|
<tbody>
|
||
|
|
<row>
|
||
|
|
<entry>prefix</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry>Date_</entry>
|
||
|
|
<entry>Prefix für die Namen.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>time</entry>
|
||
|
|
<entry>timestamp/YYYY-MM-DD</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry>Aktuelle Zeit als Unix-Timestamp, oder in YYYY-MM-DD format.</entry>
|
||
|
|
<entry>Das zu verwendende Datum.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>start_year</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry>aktuelles Jahr</entry>
|
||
|
|
<entry>Das erste Jahr in der dropdown-Liste, entweder als Jahreszahl oder relativ zum aktuellen Jahr (+/- N).</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>end_year</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry>Gegenteil von start_year</entry>
|
||
|
|
<entry>Das letzte Jahr in der dropdown-Liste, entweder als Jahreszahl oder relativ zum aktuellen Jahr (+/- N).</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>display_days</entry>
|
||
|
|
<entry>boolean</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry>true</entry>
|
||
|
|
<entry>Definiert ob Tage ausgegeben sollen oder nicht.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>display_months</entry>
|
||
|
|
<entry>boolean</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry>true</entry>
|
||
|
|
<entry>Definiert ob Monate ausgegeben werden sollen oder nicht.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>display_years</entry>
|
||
|
|
<entry>boolean</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry>true</entry>
|
||
|
|
<entry>Definiert ob Jahre ausgegeben werden sollen oder nicht.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>month_format</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry>%B</entry>
|
||
|
|
<entry>Format in welchem der Monat ausgegeben werden soll. (strftime)</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>day_format</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry>%02d</entry>
|
||
|
|
<entry>Definiert das Format in welchem der Tag ausgegeben werden soll. (sprintf)</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>year_as_text</entry>
|
||
|
|
<entry>boolean</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry>false</entry>
|
||
|
|
<entry>Definiert ob das Jahr als Text ausgegeben werden soll oder nicht.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>reverse_years</entry>
|
||
|
|
<entry>boolean</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry>false</entry>
|
||
|
|
<entry>Definiert ob die Daten in verkehrter Reihenfolge ausgegeben werden sollen.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>field_array</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry>null</entry>
|
||
|
|
<entry>
|
||
|
|
Wenn ein Namen übergeben wird, werden die Daten in der Form name[Day], name[Year], name[Month] an PHP zurückgegeben.
|
||
|
|
</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>day_size</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry>null</entry>
|
||
|
|
<entry>Fügt dem 'select'-Tag das Attribut 'size' hinzu.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>month_size</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry>null</entry>
|
||
|
|
<entry>Fügt dem 'select'-Tag das Attribut 'size' hinzu.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>year_size</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry>null</entry>
|
||
|
|
<entry>Fügt dem 'select'-Tag das Attribut 'size' hinzu.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>all_extra</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry>null</entry>
|
||
|
|
<entry>Fügt allen 'select'-Tags zusätzliche Attribute hinzu.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>day_extra</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry>null</entry>
|
||
|
|
<entry>Fügt 'select'-Tags zusätzliche Attribute hinzu.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>month_extra</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry>null</entry>
|
||
|
|
<entry>Fügt 'select'-Tags zusätzliche Attribute hinzu.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>year_extra</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry>null</entry>
|
||
|
|
<entry>Fügt 'select'-Tags zusätzliche Attribute hinzu.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>field_order</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry>MDY</entry>
|
||
|
|
<entry>Die Reihenfolge in der die Felder ausgegeben werden.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>field_separator</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry>\n</entry>
|
||
|
|
<entry>Zeichenkette die zwischen den Feldern ausgegeben werden soll.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>month_value_format</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry>%m</entry>
|
||
|
|
<entry>Format zur Ausgabe der Monats-Werte, Standardwert ist %m. (strftime)</entry>
|
||
|
|
</row>
|
||
|
|
</tbody>
|
||
|
|
</tgroup>
|
||
|
|
</informaltable>
|
||
|
|
<para>
|
||
|
|
'html_select_date' wird verwendet um Datums-Dropdown-Listen zu erzeugen,
|
||
|
|
und kann einen oder alle der folgenden Werte darstellen: Jahr, Monat und Tag
|
||
|
|
</para>
|
||
|
|
<example>
|
||
|
|
<title>html_select_date</title>
|
||
|
|
<programlisting>
|
||
|
|
{html_select_date}
|
||
|
|
|
||
|
|
|
||
|
|
AUSGABE:
|
||
|
|
|
||
|
|
<select name="Date_Month">
|
||
|
|
<option value="1">January</option>
|
||
|
|
<option value="2">February</option>
|
||
|
|
<option value="3">March</option>
|
||
|
|
<option value="4">April</option>
|
||
|
|
<option value="5">May</option>
|
||
|
|
<option value="6">June</option>
|
||
|
|
<option value="7">July</option>
|
||
|
|
<option value="8">August</option>
|
||
|
|
<option value="9">September</option>
|
||
|
|
<option value="10">October</option>
|
||
|
|
<option value="11">November</option>
|
||
|
|
<option value="12" selected>December</option>
|
||
|
|
</select>
|
||
|
|
<select name="Date_Day">
|
||
|
|
<option value="1">01</option>
|
||
|
|
<option value="2">02</option>
|
||
|
|
<option value="3">03</option>
|
||
|
|
<option value="4">04</option>
|
||
|
|
<option value="5">05</option>
|
||
|
|
<option value="6">06</option>
|
||
|
|
<option value="7">07</option>
|
||
|
|
<option value="8">08</option>
|
||
|
|
<option value="9">09</option>
|
||
|
|
<option value="10">10</option>
|
||
|
|
<option value="11">11</option>
|
||
|
|
<option value="12">12</option>
|
||
|
|
<option value="13" selected>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>
|
||
|
|
<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>
|
||
|
|
</select>
|
||
|
|
<select name="Date_Year">
|
||
|
|
<option value="2001" selected>2001</option>
|
||
|
|
</select></programlisting>
|
||
|
|
</example>
|
||
|
|
|
||
|
|
|
||
|
|
<example>
|
||
|
|
<title>html_select_date</title>
|
||
|
|
<programlisting>
|
||
|
|
|
||
|
|
|
||
|
|
{* Start- und End-Jahr können relativ zum aktuellen Jahr definiert werden. *}
|
||
|
|
{html_select_date prefix="StartDate" time=$time start_year="-5" end_year="+1" display_days=false}
|
||
|
|
|
||
|
|
AUSGABE: (aktuelles Jahr ist 2000)
|
||
|
|
|
||
|
|
<select name="StartDateMonth">
|
||
|
|
<option value="1">January</option>
|
||
|
|
<option value="2">February</option>
|
||
|
|
<option value="3">March</option>
|
||
|
|
<option value="4">April</option>
|
||
|
|
<option value="5">May</option>
|
||
|
|
<option value="6">June</option>
|
||
|
|
<option value="7">July</option>
|
||
|
|
<option value="8">August</option>
|
||
|
|
<option value="9">September</option>
|
||
|
|
<option value="10">October</option>
|
||
|
|
<option value="11">November</option>
|
||
|
|
<option value="12" selected>December</option>
|
||
|
|
</select>
|
||
|
|
<select name="StartDateYear">
|
||
|
|
<option value="1999">1995</option>
|
||
|
|
<option value="1999">1996</option>
|
||
|
|
<option value="1999">1997</option>
|
||
|
|
<option value="1999">1998</option>
|
||
|
|
<option value="1999">1999</option>
|
||
|
|
<option value="2000" selected>2000</option>
|
||
|
|
<option value="2001">2001</option>
|
||
|
|
</select></programlisting>
|
||
|
|
</example>
|
||
|
|
</sect1>
|
||
|
|
<sect1 id="language.function.html.select.time">
|
||
|
|
<title>html_select_time (Ausgabe von Zeiten als HTML-'options')</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>Attribut Name</entry>
|
||
|
|
<entry>Typ</entry>
|
||
|
|
<entry>Erforderlich</entry>
|
||
|
|
<entry>Standardwert</entry>
|
||
|
|
<entry>Beschreibung</entry>
|
||
|
|
</row>
|
||
|
|
</thead>
|
||
|
|
<tbody>
|
||
|
|
<row>
|
||
|
|
<entry>prefix</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry>Time_</entry>
|
||
|
|
<entry>Prefix des Namens.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>time</entry>
|
||
|
|
<entry>timestamp</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry>Aktuelle Uhrzeit.</entry>
|
||
|
|
<entry>Definiert die zu verwendende Uhrzeit.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>display_hours</entry>
|
||
|
|
<entry>boolean</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry>true</entry>
|
||
|
|
<entry>Definiert ob Stunden ausgegeben werden sollen.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>display_minutes</entry>
|
||
|
|
<entry>boolean</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry>true</entry>
|
||
|
|
<entry>Definiert ob Minuten ausgegeben werden sollen.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>display_seconds</entry>
|
||
|
|
<entry>boolean</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry>true</entry>
|
||
|
|
<entry>Definiert ob Sekunden ausgegeben werden sollen.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>display_meridian</entry>
|
||
|
|
<entry>boolean</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry>true</entry>
|
||
|
|
<entry>Definiert ob der Meridian (am/pm) ausgegeben werden soll.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>use_24_hours</entry>
|
||
|
|
<entry>boolean</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry>true</entry>
|
||
|
|
<entry>Definiert ob die Stunden in 24-Stunden Format angezeigt werden sollen oder nicht.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>minute_interval</entry>
|
||
|
|
<entry>integer</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry>1</entry>
|
||
|
|
<entry>Definiert den Interval in der Minuten-Dropdown-Liste.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>second_interval</entry>
|
||
|
|
<entry>integer</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry>1</entry>
|
||
|
|
<entry>Definiert den Interval in der Sekunden-Dropdown-Liste.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>field_array</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry>n/a</entry>
|
||
|
|
<entry>Gibt die Daten in einen Array dieses Namens aus.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>all_extra</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry>null</entry>
|
||
|
|
<entry>Fügt allen 'select'-Tags zusätzliche Attribute hinzu.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>hour_extra</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry>null</entry>
|
||
|
|
<entry>Fügt dem Stunden-'select'-Tag zusätzliche Attribute hinzu.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>minute_extra</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry>null</entry>
|
||
|
|
<entry>Fügt dem Minuten-'select'-Tag zusätzliche Attribute hinzu.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>second_extra</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry>null</entry>
|
||
|
|
<entry>Fügt dem Sekunden-'select'-Tag zusätzliche Attribute hinzu.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>meridian_extra</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>No</entry>
|
||
|
|
<entry>null</entry>
|
||
|
|
<entry>Fügt dem Meridian-'select'-Tag zusätzliche Attribute hinzu.</entry>
|
||
|
|
</row>
|
||
|
|
</tbody>
|
||
|
|
</tgroup>
|
||
|
|
</informaltable>
|
||
|
|
<para>
|
||
|
|
'html_select_time' wird verwendet um Zeit-Dropdown-Listen zu erzeugen.
|
||
|
|
Die Funktion kann alle oder eines der folgenden Felder ausgeben: Stunde, Minute, Sekunde und Meridian.
|
||
|
|
</para>
|
||
|
|
<example>
|
||
|
|
<title>html_select_time</title>
|
||
|
|
<programlisting>
|
||
|
|
{html_select_time use_24_hours=true}
|
||
|
|
|
||
|
|
|
||
|
|
AUSGABE:
|
||
|
|
|
||
|
|
<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>
|
||
|
|
</sect1>
|
||
|
|
<sect1 id="language.function.html.table">
|
||
|
|
<title>html_table (Ausgabe von HTML-TABLE Tag)</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>Attribut Name</entry>
|
||
|
|
<entry>Typ</entry>
|
||
|
|
<entry>Erforderlich</entry>
|
||
|
|
<entry>Standartwert</entry>
|
||
|
|
<entry>Beschreibung</entry>
|
||
|
|
</row>
|
||
|
|
</thead>
|
||
|
|
<tbody>
|
||
|
|
<row>
|
||
|
|
<entry>loop</entry>
|
||
|
|
<entry>array</entry>
|
||
|
|
<entry>Ja</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Array mit den Daten für den Loop</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>cols</entry>
|
||
|
|
<entry>integer</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>3</emphasis></entry>
|
||
|
|
<entry>Anzahl Spalten in einer Tabelle</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>table_attr</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>No</entry>
|
||
|
|
<entry><emphasis>border="1"</emphasis></entry>
|
||
|
|
<entry>Attribute für das Table-Tag</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>tr_attr</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>No</entry>
|
||
|
|
<entry><emphasis>empty</emphasis></entry>
|
||
|
|
<entry>Attribute für das tr-Tag (Arrays werden durchlaufen)</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>td_attr</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>No</entry>
|
||
|
|
<entry><emphasis>empty</emphasis></entry>
|
||
|
|
<entry>Attribute für das tr-Tag (Arrays werden durchlaufen)</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>trailpad</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>No</entry>
|
||
|
|
<entry><emphasis>&nbsp;</emphasis></entry>
|
||
|
|
<entry>Wert für leere Zellen</entry>
|
||
|
|
</row>
|
||
|
|
|
||
|
|
<row>
|
||
|
|
<entry>hdir</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>No</entry>
|
||
|
|
<entry><emphasis>right</emphasis></entry>
|
||
|
|
<entry>Richtung in der die Zeilen gerendered werden. Mögliche Werte: <emphasis>left</emphasis>/<emphasis>right</emphasis></entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>vdir</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>No</entry>
|
||
|
|
<entry><emphasis>down</emphasis></entry>
|
||
|
|
<entry>Richtung in der die Spalten gerendered werden. Mögliche Werte: <emphasis>up</emphasis>/<emphasis>down</emphasis></entry>
|
||
|
|
</row>
|
||
|
|
</tbody>
|
||
|
|
</tgroup>
|
||
|
|
</informaltable>
|
||
|
|
<para>
|
||
|
|
<emphasis>html_table</emphasis> ist eine eigene Funktion die einen Array als
|
||
|
|
Tabelle ausgibt. Das <emphasis>cols</emphasis> Attribut definiert die Menge
|
||
|
|
von Spalten die ausgegeben werden sollen. <emphasis>table_attr</emphasis>, <emphasis>tr_attr</emphasis>
|
||
|
|
und <emphasis>td_attr</emphasis> definieren die Attribute für die HTML Tags. Wenn <emphasis>tr_attr</emphasis>
|
||
|
|
oder <emphasis>td_attr</emphasis> Arrays sind, werden diese durchlaufen. <emphasis>trailpad</emphasis>
|
||
|
|
wird in leere Zellen eingefügt.
|
||
|
|
</para>
|
||
|
|
<example>
|
||
|
|
<title>html_table</title>
|
||
|
|
<programlisting>
|
||
|
|
index.php:
|
||
|
|
|
||
|
|
require('Smarty.class.php');
|
||
|
|
$smarty = new Smarty;
|
||
|
|
$smarty->assign('data',array(1,2,3,4,5,6,7,8,9));
|
||
|
|
$smarty->assign('tr',array('bgcolor="#eeeeee"','bgcolor="#dddddd"'));
|
||
|
|
$smarty->display('index.tpl');
|
||
|
|
|
||
|
|
index.tpl:
|
||
|
|
|
||
|
|
{html_table loop=$data}
|
||
|
|
{html_table loop=$data cols=4 table_attr='border="0"'}
|
||
|
|
{html_table loop=$data cols=4 tr_attr=$tr}
|
||
|
|
|
||
|
|
AUSGABE:
|
||
|
|
|
||
|
|
<table border="1">
|
||
|
|
<tr><td>1</td><td>2</td><td>3</td></tr>
|
||
|
|
<tr><td>4</td><td>5</td><td>6</td></tr>
|
||
|
|
<tr><td>7</td><td>8</td><td>9</td></tr>
|
||
|
|
</table>
|
||
|
|
<table border="0">
|
||
|
|
<tr><td>1</td><td>2</td><td>3</td><td>4</td></tr>
|
||
|
|
<tr><td>5</td><td>6</td><td>7</td><td>8</td></tr>
|
||
|
|
<tr><td>9</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>
|
||
|
|
</table>
|
||
|
|
<table border="1">
|
||
|
|
<tr bgcolor="#eeeeee"><td>1</td><td>2</td><td>3</td><td>4</td></tr>
|
||
|
|
<tr bgcolor="#dddddd"><td>5</td><td>6</td><td>7</td><td>8</td></tr>
|
||
|
|
<tr bgcolor="#eeeeee"><td>9</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>
|
||
|
|
</table></programlisting>
|
||
|
|
</example>
|
||
|
|
</sect1>
|
||
|
|
<sect1 id="language.function.math">
|
||
|
|
<title>math (Mathematik)</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>Attribut Name</entry>
|
||
|
|
<entry>Typ</entry>
|
||
|
|
<entry>Erforderlich</entry>
|
||
|
|
<entry>Standardwert</entry>
|
||
|
|
<entry>Beschreibung</entry>
|
||
|
|
</row>
|
||
|
|
</thead>
|
||
|
|
<tbody>
|
||
|
|
<row>
|
||
|
|
<entry>equation</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Ja</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Der auszuführende Vergleich.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>format</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Format der Ausgabe. (sprintf)</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>var</entry>
|
||
|
|
<entry>numeric</entry>
|
||
|
|
<entry>Ja</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Wert der Vergleichsvariable.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>assign</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Template-Variable welcher die Ausgabe zugewiesen werden soll.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>[var ...]</entry>
|
||
|
|
<entry>numeric</entry>
|
||
|
|
<entry>Yes</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Zusätzliche Werte.</entry>
|
||
|
|
</row>
|
||
|
|
</tbody>
|
||
|
|
</tgroup>
|
||
|
|
</informaltable>
|
||
|
|
<para>
|
||
|
|
'math' ermöglicht es dem Designer, mathematische Gleichungen
|
||
|
|
durchzuführen. Alle numerischen Template-Variablen
|
||
|
|
können dazu verwendet werden und die Ausgabe wird an
|
||
|
|
die Stelle des Tags geschrieben. Die Variablen werden
|
||
|
|
der Funktion als Parameter übergeben, dabei kann es sich
|
||
|
|
um statische oder um Template-Variablen handeln. Erlaubte Operatoren
|
||
|
|
umfassen: +, -, /, *, abs, ceil, cos, exp, floor, log, log10, max,
|
||
|
|
min, pi, pow, rand, round, sin, sqrt, srans und tan. Konsultieren Sie
|
||
|
|
die PHP-Dokumentation für zusätzliche Informationen zu dieser
|
||
|
|
Funktion.
|
||
|
|
</para>
|
||
|
|
<para>
|
||
|
|
Falls Sie die spezielle 'assign' Variable übergeben, wird die
|
||
|
|
Ausgabe der 'math'-Funktion der Template-Variablen mit dem selben
|
||
|
|
Namen zugewiesen anstatt ausgegeben zu werden.
|
||
|
|
</para>
|
||
|
|
<note>
|
||
|
|
<title>Technische Bemerkung</title>
|
||
|
|
<para>
|
||
|
|
Die 'math'-Funktion ist wegen ihres Gebrauchs der 'eval()'-Funktion
|
||
|
|
äusserst Ressourcen intensiv. Mathematik direkt im PHP-Skript
|
||
|
|
zu verwenden ist wesentlich performanter. Sie sollten daher
|
||
|
|
- wann immer möglich - auf die Verwendung verzichten. Stellen
|
||
|
|
Sie jedoch auf jeden Fall sicher, dass Sie keine 'math'-Tags in 'sections'
|
||
|
|
oder anderen 'loop'-Konstrukten verwenden.
|
||
|
|
</para>
|
||
|
|
</note>
|
||
|
|
<example>
|
||
|
|
<title>math (Mathematik)</title>
|
||
|
|
<programlisting>
|
||
|
|
{* $height=4, $width=5 *}
|
||
|
|
|
||
|
|
{math equation="x + y" x=$height y=$width}
|
||
|
|
|
||
|
|
AUSGABE:
|
||
|
|
|
||
|
|
9
|
||
|
|
|
||
|
|
|
||
|
|
{* $row_height = 10, $row_width = 20, #col_div# = 2, aus Template zugewiesen *}
|
||
|
|
|
||
|
|
{math equation="height * width / division"
|
||
|
|
height=$row_height
|
||
|
|
width=$row_width
|
||
|
|
division=#col_div#}
|
||
|
|
|
||
|
|
AUSGABE:
|
||
|
|
|
||
|
|
100
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
{* Sie können auch Klammern verwenden *}
|
||
|
|
|
||
|
|
{math equation="(( x + y ) / z )" x=2 y=10 z=2}
|
||
|
|
|
||
|
|
AUSGABE:
|
||
|
|
|
||
|
|
6
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
{* Sie können als Ausgabeformat alle von sprintf unterstötzen Definitionen verwenden *}
|
||
|
|
|
||
|
|
{math equation="x + y" x=4.4444 y=5.0000 format="%.2f"}
|
||
|
|
|
||
|
|
AUSGABE:
|
||
|
|
|
||
|
|
9.44</programlisting>
|
||
|
|
</example>
|
||
|
|
</sect1>
|
||
|
|
<sect1 id="language.function.popup.init">
|
||
|
|
<title>popup_init (Popup Initialisieren)</title>
|
||
|
|
<para>
|
||
|
|
'popup' ist eine Integration von 'overLib', einer Javascript
|
||
|
|
Library für 'popup'-Fenster. Dies kann verwendet werden um
|
||
|
|
Zusatzinformationen als Context-Menu oder Tooltip auszugeben.
|
||
|
|
'popup_init' muss am Anfang jedes Templates aufgerufen werden,
|
||
|
|
falls Sie planen darin die <link linkend="language.function.popup">popup</link>-Funktion
|
||
|
|
zu verwenden. Der Author von 'overLib' ist Erik Bosrup, und die
|
||
|
|
Homepage ist unter http://www.bosrup.com/web/overlib/ erreichbar.
|
||
|
|
</para>
|
||
|
|
<para>
|
||
|
|
Seit Smarty 2.1.2 wird 'overLib' NICHT mehr mitgeliefert. Laden
|
||
|
|
Sie 'overLib' herunter und platzieren Sie es in Ihrer Document Root.
|
||
|
|
Danach können Sie mit dem Attribut 'src' definieren an welcher
|
||
|
|
Stelle die Datei liegt.
|
||
|
|
</para>
|
||
|
|
<example>
|
||
|
|
<title>popup_init</title>
|
||
|
|
<programlisting>
|
||
|
|
|
||
|
|
{* 'popup_init' muss einmalig am Anfang der Seite aufgerufen werden *}
|
||
|
|
{popup_init src="/javascripts/overlib.js"}</programlisting>
|
||
|
|
</example>
|
||
|
|
</sect1>
|
||
|
|
<sect1 id="language.function.popup">
|
||
|
|
<title>popup (Popup-Inhalt definieren)</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>Attribut Name</entry>
|
||
|
|
<entry>Typ</entry>
|
||
|
|
<entry>Erforderlich</entry>
|
||
|
|
<entry>Standardwert</entry>
|
||
|
|
<entry>Beschreibung</entry>
|
||
|
|
</row>
|
||
|
|
</thead>
|
||
|
|
<tbody>
|
||
|
|
<row>
|
||
|
|
<entry>text</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Ja</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Text/HTML der im Popup ausgegeben werden soll.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>trigger</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>onMouseOver</emphasis></entry>
|
||
|
|
<entry>Definiert bei welchem Event das Popup aufgerufen werden soll. Erlaubte Werte sind: onMouseOver und onClick</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>sticky</entry>
|
||
|
|
<entry>boolean</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>false</emphasis></entry>
|
||
|
|
<entry>Definiert ob das Popup geöffnet bleiben soll bis es manuell geschlossen wird.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>caption</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Definiert die Überschrift.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>fgcolor</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Hintergrundfarbe des Popups.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>bgcolor</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Rahmenfarbe des Popups.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>textcolor</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Farbe des Textes im Popup.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>capcolor</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Farbe der Popup-Überschrift.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>closecolor</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Die Farbe des 'close'-Textes.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>textfont</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Die Farbe des Textes.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>captionfont</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Die Schriftart für die Überschrift.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>closefont</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Die Schriftart für den 'close'-Text.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>textsize</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Die Schriftgrösse des Textes.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>captionsize</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Die Schriftgrösse der Überschrift.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>closesize</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Die Schriftgrösse des 'close'-Textes.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>width</entry>
|
||
|
|
<entry>integer</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Die Breite der Popup-Box.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>height</entry>
|
||
|
|
<entry>integer</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Die Höhe der Popup-Box.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>left</entry>
|
||
|
|
<entry>boolean</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>false</emphasis></entry>
|
||
|
|
<entry>Öffnet die Popup-Box links von Mauszeiger.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>right</entry>
|
||
|
|
<entry>boolean</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>false</emphasis></entry>
|
||
|
|
<entry>Öffnet die Popup-Box rechts von Mauszeiger.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>center</entry>
|
||
|
|
<entry>boolean</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>false</emphasis></entry>
|
||
|
|
<entry>Öffnet die Popup-Box in der Mitte des Mauszeigers.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>above</entry>
|
||
|
|
<entry>boolean</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>false</emphasis></entry>
|
||
|
|
<entry>Öffnet die Popup-Box oberhalb des Mauszeigers. Achtung: nur möglich wenn 'height' definiert ist.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>below</entry>
|
||
|
|
<entry>boolean</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>false</emphasis></entry>
|
||
|
|
<entry>Öffnet die Popup-Box unterhalb des Mauszeigers.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>border</entry>
|
||
|
|
<entry>integer</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Die Rahmenbreite der Popup-Box.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>offsetx</entry>
|
||
|
|
<entry>integer</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Horizontale Distanz zum Mauszeiger bei der das Popup geöffnet bleibt.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>offsety</entry>
|
||
|
|
<entry>integer</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Vertikale Distanz zum Mauszeiger bei der das Popup geöffnet bleibt.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>fgbackground</entry>
|
||
|
|
<entry>url to image</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Das Hintergundbild.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>bgbackground</entry>
|
||
|
|
<entry>url to image</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>
|
||
|
|
Definiert das Bild welches verwendet werden soll um den Rahmen zu zeichnen.
|
||
|
|
Achtung: Sie müssen 'bgcolor' auf '' setzen, da die Farbe sonst angezeigt wird.
|
||
|
|
Achtung: Wenn sie einen 'close'-Link verwenden, wird Netscape (4.x) die Zellen
|
||
|
|
mehrfach rendern, was zu einer falschen Anzeige führen kann.
|
||
|
|
</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>closetext</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Definiert den Text des 'close'-Links.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>noclose</entry>
|
||
|
|
<entry>boolean</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Zeigt den 'close'-Link nicht an.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>status</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Definiert den Text der in der Browser-Statuszeile ausgegeben wird.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>autostatus</entry>
|
||
|
|
<entry>boolean</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Gibt als Statusinformationen den Popup-Text aus. Achtung: Dies überschreibt die definierten Statuswerte.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>autostatuscap</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Zeigt in der Statusleiste den Wert der Popup-Überschrift an. Achtung: Dies überschreibt die definierten Statuswerte.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>inarray</entry>
|
||
|
|
<entry>integer</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>
|
||
|
|
Weist 'overLib' an, den Wert aus dem in 'overlib.js' definierten Array 'ol_text' zu lesen.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>caparray</entry>
|
||
|
|
<entry>integer</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Weist 'overLib' an, die Überschrift aus dem in 'overlib.js' definierten Array 'ol_caps' zu lesen.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>capicon</entry>
|
||
|
|
<entry>url</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Zeigt das übergebene Bild vor der Überschrift an.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>snapx</entry>
|
||
|
|
<entry>integer</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Aliniert das Popup an einem horizontalen Gitter.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>snapy</entry>
|
||
|
|
<entry>integer</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Aliniert das Popup an einem vertikalen Gitter.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>fixx</entry>
|
||
|
|
<entry>integer</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Fixiert das Popup an der definierten horizontalen Position. Achtung: überschreibt alle anderen horizontalen Positionen.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>fixy</entry>
|
||
|
|
<entry>integer</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Fixiert das Popup an der definierten vertikalen Position. Achtung: überschreibt alle anderen vertikalen Positionen.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>background</entry>
|
||
|
|
<entry>url</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Definiert das Hintergrundbild welches anstelle des Tabellenhintergrundes verwendet werden soll.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>padx</entry>
|
||
|
|
<entry>integer,integer</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Erzeugt horizontale Leerzeichen, um den Text platzieren zu können. Achtung: Dies ist eine 2-Parameter Funktion.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>pady</entry>
|
||
|
|
<entry>integer,integer</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Erzeugt vertikale Leerzeichen, um den Text platzieren zu können. Achtung: Dies ist eine 2-Parameter Funktion.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>fullhtml</entry>
|
||
|
|
<entry>boolean</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Lässt Sie den HTML-Code betreffend einem Hintergrundbild komplett kontrollieren.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>frame</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Kontrolliert Popups in einem anderen Frame. Sehen sie die 'overLib'-Seite für zusätzliche Informationen zu dieser Funktion.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>timeout</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Führt die übergebene Javascript-Funktion aus, und verwendet deren Ausgabe als Text für das Popup.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>delay</entry>
|
||
|
|
<entry>integer</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Macht, dass sich das Popup wie ein Tooltip verhält, und nach den definierten Millisekunden verschwindet.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>hauto</entry>
|
||
|
|
<entry>boolean</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Lässt 'overLib' automatisch definieren an welcher Seite (links/rechts) des Mauszeigers das Popup ausgegeben werden soll.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>vauto</entry>
|
||
|
|
<entry>boolean</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Lässt 'overLib' automatisch definieren an welcher Seite (oben/unten) des Mauszeigers das Popup ausgegeben werden soll.</entry>
|
||
|
|
</row>
|
||
|
|
</tbody>
|
||
|
|
</tgroup>
|
||
|
|
</informaltable>
|
||
|
|
<para>
|
||
|
|
'popup' wird verwendet um Javascript-Popup-Fenster zu erzeugen.
|
||
|
|
</para>
|
||
|
|
<example>
|
||
|
|
<title>popup</title>
|
||
|
|
<programlisting>
|
||
|
|
|
||
|
|
{* 'popup_init' muss am Anfang jeder Seite aufgerufen werden die 'popup' verwendet *}
|
||
|
|
{popup_init src="/javascripts/overlib.js"}
|
||
|
|
|
||
|
|
{* create a link with a popup window when you move your mouse over *}
|
||
|
|
{* ein link mit einem Popup welches geöffnet wird wenn die Maus über dem Link ist. *}
|
||
|
|
<A href="mypage.html" {popup text="This link takes you to my page!"}>mypage</A>
|
||
|
|
|
||
|
|
|
||
|
|
{* Sie können in einem Popup text, html, links und weiteres verwenden *}
|
||
|
|
<A href="mypage.html" {popup sticky=true caption="mypage contents"
|
||
|
|
text="<UL><LI>links<LI>pages<LI>images</UL>" snapx=10 snapy=10}>mypage</A>
|
||
|
|
|
||
|
|
AUSGABE:
|
||
|
|
|
||
|
|
|
||
|
|
(Für Beispiele können Sie sich die Smarty Homepage anschauen.)</programlisting>
|
||
|
|
</example>
|
||
|
|
</sect1>
|
||
|
|
<sect1 id="language.function.textformat">
|
||
|
|
<title>textformat (Textformatierung)</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>Attribut Name</entry>
|
||
|
|
<entry>Typ</entry>
|
||
|
|
<entry>Erforderlich</entry>
|
||
|
|
<entry>Standardwert</entry>
|
||
|
|
<entry>Beschreibung</entry>
|
||
|
|
</row>
|
||
|
|
</thead>
|
||
|
|
<tbody>
|
||
|
|
<row>
|
||
|
|
<entry>style</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>aktueller Stil</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>indent</entry>
|
||
|
|
<entry>number</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>0</emphasis></entry>
|
||
|
|
<entry>Anzahl Zeichen die für das einrücken von Zeilen verwendet werden.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>indent_first</entry>
|
||
|
|
<entry>number</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>0</emphasis></entry>
|
||
|
|
<entry>Anzahl Zeichen die für das Einrücken der ersten Zeile verwendet werden.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>indent_char</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>(single space)</emphasis></entry>
|
||
|
|
<entry>Das Zeichen welches zum Einrücken verwendet werden soll.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>wrap</entry>
|
||
|
|
<entry>number</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>80</emphasis></entry>
|
||
|
|
<entry>Maximale Zeilenlänge bevor die Zeile umgebrochen wird.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>wrap_char</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>\n</emphasis></entry>
|
||
|
|
<entry>Das für Zeilenumbrüche zu verwendende Zeichen.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>wrap_cut</entry>
|
||
|
|
<entry>boolean</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>false</emphasis></entry>
|
||
|
|
<entry>Wenn auf 'true' gesetzt, wird die Zeile an der definierten Position abgeschnitten.</entry>
|
||
|
|
</row>
|
||
|
|
<row>
|
||
|
|
<entry>assign</entry>
|
||
|
|
<entry>string</entry>
|
||
|
|
<entry>Nein</entry>
|
||
|
|
<entry><emphasis>n/a</emphasis></entry>
|
||
|
|
<entry>Die Template-Variable welcher die Ausgabe zugewiesen werden soll.</entry>
|
||
|
|
</row>
|
||
|
|
</tbody>
|
||
|
|
</tgroup>
|
||
|
|
</informaltable>
|
||
|
|
<para>
|
||
|
|
'textformat' ist eine Funktion um Text zu formatieren. Die Funktion
|
||
|
|
entfernt überflüssige Leerzeichen und formatiert Paragrafen
|
||
|
|
indem sie die Zeilen einrückt und umbricht.
|
||
|
|
</para>
|
||
|
|
<para>
|
||
|
|
Sie können entweder den aktuellen Stil verwenden, oder ihn anhand
|
||
|
|
der Parameter selber definieren. Im Moment ist 'email' der einzig verfügbare Stil.
|
||
|
|
</para>
|
||
|
|
<example>
|
||
|
|
<title>textformat (Text Formatierung)</title>
|
||
|
|
<programlisting>
|
||
|
|
{textformat wrap=40}
|
||
|
|
|
||
|
|
This is foo.
|
||
|
|
This is foo.
|
||
|
|
This is foo.
|
||
|
|
This is foo.
|
||
|
|
This is foo.
|
||
|
|
This is foo.
|
||
|
|
|
||
|
|
This is bar.
|
||
|
|
|
||
|
|
bar foo bar foo foo.
|
||
|
|
bar foo bar foo foo.
|
||
|
|
bar foo bar foo foo.
|
||
|
|
bar foo bar foo foo.
|
||
|
|
bar foo bar foo foo.
|
||
|
|
bar foo bar foo foo.
|
||
|
|
bar foo bar foo foo.
|
||
|
|
|
||
|
|
{/textformat}
|
||
|
|
|
||
|
|
AUSGABE:
|
||
|
|
|
||
|
|
This is foo. This is foo. This is foo.
|
||
|
|
This is foo. This is foo. This is foo.
|
||
|
|
|
||
|
|
This is bar.
|
||
|
|
|
||
|
|
bar foo bar foo foo. bar foo bar foo
|
||
|
|
foo. bar foo bar foo foo. bar foo bar
|
||
|
|
foo foo. bar foo bar foo foo. bar foo
|
||
|
|
bar foo foo. bar foo bar foo foo.
|
||
|
|
|
||
|
|
|
||
|
|
{textformat wrap=40 indent=4}
|
||
|
|
|
||
|
|
This is foo.
|
||
|
|
This is foo.
|
||
|
|
This is foo.
|
||
|
|
This is foo.
|
||
|
|
This is foo.
|
||
|
|
This is foo.
|
||
|
|
|
||
|
|
This is bar.
|
||
|
|
|
||
|
|
bar foo bar foo foo.
|
||
|
|
bar foo bar foo foo.
|
||
|
|
bar foo bar foo foo.
|
||
|
|
bar foo bar foo foo.
|
||
|
|
bar foo bar foo foo.
|
||
|
|
bar foo bar foo foo.
|
||
|
|
bar foo bar foo foo.
|
||
|
|
|
||
|
|
{/textformat}
|
||
|
|
|
||
|
|
AUSGABE:
|
||
|
|
|
||
|
|
This is foo. This is foo. This is
|
||
|
|
foo. This is foo. This is foo. This
|
||
|
|
is foo.
|
||
|
|
|
||
|
|
This is bar.
|
||
|
|
|
||
|
|
bar foo bar foo foo. bar foo bar foo
|
||
|
|
foo. bar foo bar foo foo. bar foo
|
||
|
|
bar foo foo. bar foo bar foo foo.
|
||
|
|
bar foo bar foo foo. bar foo bar
|
||
|
|
foo foo.
|
||
|
|
|
||
|
|
{textformat wrap=40 indent=4 indent_first=4}
|
||
|
|
|
||
|
|
This is foo.
|
||
|
|
This is foo.
|
||
|
|
This is foo.
|
||
|
|
This is foo.
|
||
|
|
This is foo.
|
||
|
|
This is foo.
|
||
|
|
|
||
|
|
This is bar.
|
||
|
|
|
||
|
|
bar foo bar foo foo.
|
||
|
|
bar foo bar foo foo.
|
||
|
|
bar foo bar foo foo.
|
||
|
|
bar foo bar foo foo.
|
||
|
|
bar foo bar foo foo.
|
||
|
|
bar foo bar foo foo.
|
||
|
|
bar foo bar foo foo.
|
||
|
|
|
||
|
|
{/textformat}
|
||
|
|
|
||
|
|
AUSGABE:
|
||
|
|
|
||
|
|
This is foo. This is foo. This
|
||
|
|
is foo. This is foo. This is foo.
|
||
|
|
This is foo.
|
||
|
|
|
||
|
|
This is bar.
|
||
|
|
|
||
|
|
bar foo bar foo foo. bar foo bar
|
||
|
|
foo foo. bar foo bar foo foo. bar
|
||
|
|
foo bar foo foo. bar foo bar foo
|
||
|
|
foo. bar foo bar foo foo. bar foo
|
||
|
|
bar foo foo.
|
||
|
|
|
||
|
|
{textformat style="email"}
|
||
|
|
|
||
|
|
This is foo.
|
||
|
|
This is foo.
|
||
|
|
This is foo.
|
||
|
|
This is foo.
|
||
|
|
This is foo.
|
||
|
|
This is foo.
|
||
|
|
|
||
|
|
This is bar.
|
||
|
|
|
||
|
|
bar foo bar foo foo.
|
||
|
|
bar foo bar foo foo.
|
||
|
|
bar foo bar foo foo.
|
||
|
|
bar foo bar foo foo.
|
||
|
|
bar foo bar foo foo.
|
||
|
|
bar foo bar foo foo.
|
||
|
|
bar foo bar foo foo.
|
||
|
|
|
||
|
|
{/textformat}
|
||
|
|
|
||
|
|
AUSGABE:
|
||
|
|
|
||
|
|
This is foo. This is foo. This is foo. This is foo. This is foo. This is
|
||
|
|
foo.
|
||
|
|
|
||
|
|
This is bar.
|
||
|
|
|
||
|
|
bar foo bar foo foo. bar foo bar foo foo. bar foo bar foo foo. bar foo
|
||
|
|
bar foo foo. bar foo bar foo foo. bar foo bar foo foo. bar foo bar foo
|
||
|
|
foo.
|
||
|
|
|
||
|
|
</programlisting>
|
||
|
|
</example>
|
||
|
|
</sect1>
|
||
|
|
</chapter>
|
||
|
|
<!-- Keep this comment at the end of the file
|
||
|
|
Local variables:
|
||
|
|
mode: sgml
|
||
|
|
sgml-omittag:t
|
||
|
|
sgml-shorttag:t
|
||
|
|
sgml-minimize-attributes:nil
|
||
|
|
sgml-always-quote-attributes:t
|
||
|
|
sgml-indent-step:1
|
||
|
|
sgml-indent-data:t
|
||
|
|
indent-tabs-mode:nil
|
||
|
|
sgml-parent-document:nil
|
||
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
||
|
|
sgml-exposed-tags:nil
|
||
|
|
sgml-local-catalogs:nil
|
||
|
|
sgml-local-ecat-files:nil
|
||
|
|
End:
|
||
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||
|
|
vim: et tw=78 syn=sgml
|
||
|
|
vi: ts=1 sw=1
|
||
|
|
-->
|