====== Referenz MipForms ====== Die mip-forms (Modul Input Forms) stellen Funktionen zur einfachen Erstellung von Formularen bereit und sind dazu gedacht, die Modulentwicklung im Bereich der Konfiguration zu beschleunigen. Dadurch kann die Modulkonfiguration sehr schnell und flexibel entwickelt werden, komplexe Konfigurationsmöglichkeiten werden ohne große Mühe möglich. ===== Einleitendes Beispiel ===== ==== Ein einfaches Beispiel ==== Es wird ein Modul entwickelt, welches einen Text aus dem Seitenkonfigurationsdialog übernimmt und auf der Seite mit CSS- Styles formatiert ausgibt. Programmcode für das Konfigurationfeld: Die oben getätigte Eingabe führt dann im Konfigurationsdialog zu folgendem Ergebnis: Programmcode für die Frontendausgabe (das Ergebnis grafisch, siehe Abbildung rechts): MOD_VALUE[1] ==== Erklärung ==== **$mip_form['0']['cat'] = 'txt'** \\ Die erste Zeile des ersten Blocks. In diesem Block wird das Textfeld definiert. Die Kategorie 'cat' hat die Bezeichnung „txt“ und damit ein Textfeld (Zur Zeit stehen die Kategorien txtarea, option, chk, radio und app_x zur Verfügung). **$mip_form['0']['type'] = ' ';** \\ 'type' bestimmt das Aussehen des Textfeldes. Mögliche Werte sind, 'chk', 'radio', 'long', 'chk_long', 'radio_long'. Wird kein Wert angegeben (wie in diesem Beispiel), wird der Defaultwert '[Beschreibung] [Textbox]' genommen. Im "default"- Fall kann die Variable auch weggelassen werden. Die einzelenen type- Werte für Textfelder im Überblick: * **[LEER]:** [Beschreibung][Textbox] * **'chk':** [Checkbox] [Beschreibung] [Textbox] * **'radio':** [Radiobutton] [Beschreibung] [Textbox] * **'long':** [Beschreibung] [große Textbox] * **'chk_long':** [Checkbox] [Beschreibung] [große Textbox] * **'radio_long':** [Radiobutton] [Beschreibung] [große Textbox] **$mip_form['0']['desc']='Beschreibung';** \\ Die Beschriftung des Textfeldes (Label) **$mip_form['0']['cms_var']=$cms_mod['value']['1']; $mip_form['0']['cms_val']='MOD_VALUE[1]';** \\ Die Variable, in denen Sefrengo den Wert speichern wird. **$mip_form['0']['cms_val_default'] = 'Hallo Welt';** \\ Ist die betreffende MOD_VAR[x] noch leer, wird ein defaultwert eingetragen. **$mip_form['0']['tab'] = '0';** \\ Hiermit können Konfigurationsfelder eingerückt werden. Erleichtert die Übersicht bei komplexen Konfigurationen. Es folgt der zweite Block. Hier wird der CSS- Parser konfiguriert. **$mip_form['1']['cat']='app_css';** \\ Der CSS-Parser wird aufgerufen. Kleine Applikationen gehören bei den mip-forms immer in die Kategorie app_xxx **$mip_form['1']['output_cat']='option';** \\ 'output_cat' gibt die Kategorie an, wie das Formularfeld später beschaffen sein soll und entspricht im Endeffekt 'cat', 'option' oder 'radio' sind sinnvoll. Empfehlung: 'option' **$mip_form['1']['flag'] = 'id_only';**\\ 'flag' ist ein optionaler Parameter. 'id_only' parst nur css-Id's, 'class_only' parst nur css-Klassen. Es wird dringend empfohlen, diesen Parameter zu setzen, da hinterher keine Rückschlüsse mehr auf die Herkunft gezogen werden können (z.B. wird die Klasse ".class_or_id" später zu der Variablen 'class_or_id', ebenso wird die CSS- ID '#class_or_id' zur Variablen 'class_or_id'. Die Meisten Module benutzen die Option 'class_only' **mip_formsp($mip_form['0']); mip_formsp($mip_form['1']);** \\ Die Formulare werden ausgegeben. Das 'p' bei 'mip_formsp' steht für print, also für die direkte Ausgabe im Browser. Alternativ können die einzelnen Formularbausteine auch in Variablen abgespeichert werden. Dies geschieht dann in der Art von $meine_variable = mip_forms($mip_form['0']); **unset($mip_form);** \\ Hier wird der Array mip_form[][] zerstört und der genutzte Speicher wieder freigegeben. Dies solltet ihr auf keinen Fall vergessen. Ich gehe einfach mal davon aus, dass bei der Modulentwicklung viele der hier angegebenen Beispiele per copy/ paste übernehmen werden. Daher wird in vielen Modulen der Array mip_form[][] vorkommen. Nicht zerstörte Arrays werden dann früher oder später dazu führen, dass einzelne Werte in verschiedenen Modulen miteinander kollidieren. Gerade die Typen 'option' und 'radio' werden davon betroffen sein. Im Konfigurationsbereich der Module gibt es bei nicht zurückgesetzten mip_form- Arrays noch ein zusätzliches Hindernis. Da auf Dehler bei der Modulbearbeitung hingewiesen wird, muß das Modul zwei mal ausgeführt werden. Einmal um das Modu zu testen und auf eventuelle Fehler aufmerksam zu machen und zum Anderen um die Ausgabe auf dem Bildschirm auszugeben. Wird hier das „unset“ vergessen, sind Einträge in den Dropdownboxen zumeist doppelt vorhanden. ===== Referenz ===== ==== Beschreibungsfelder ==== **[Beschreibung]** Beispiel: $mip_form['0']['cat'] = 'desc'; $mip_form['0']['type'] = ' '; $mip_form['0']['desc'] = 'Beschreibung'; $mip_form['0']['tab'] = '0'; mip_formsp($mip_form['0']); **[Checkbox][Beschreibung]** Beispiel: $mip_form['0']['cat'] = 'desc'; $mip_form['0']['type'] = 'chk'; $mip_form['0']['desc'] = 'Beschreibung'; $mip_form['0']['chk_var'] = 'MOD_VAR[0]'; $mip_form['0']['chk_val'] = $cms_mod['value']['0']; $mip_form['0']['tab'] = '0'; mip_formsp($mip_form['0']); **[Radiobutton][Beschreibung]** Beispiel: $mip_form['33']['cat'] = 'desc'; $mip_form['33']['type'] = 'radio'; $mip_form['33']['desc'] = 'Beschreibung'; $mip_form['33']['radio_var'] = 'MOD_VAR[34]'; $mip_form['33']['radio_val'] = $cms_mod['value']['34']; $mip_form['33']['radio_val_default'] = ' '; $mip_form['33']['radio_user_val'] = 'wenn_gleich_radio_val_dann_aktiviert'; $mip_form['33']['tab'] = '0'; mip_formsp($mip_form['33']); ==== Textfelder ==== **[Beschreibung][Textbox]** Beispiel: $mip_form['0']['cat'] = 'txt'; $mip_form['0']['type'] = ' '; $mip_form['0']['desc'] = 'Beschreibung'; $mip_form['0']['cms_var'] = 'MOD_VAR[1]'; $mip_form['0']['cms_val'] = $cms_mod['value']['1']; $mip_form['0']['cms_val_default'] = ' '; $mip_form['0']['tab'] = '0'; mip_formsp($mip_form['0']); **[Checkbox][Beschreibung][Textbox]** Beispiel: $mip_form['0']['cat'] = 'txt'; $mip_form['0']['type'] = 'chk'; $mip_form['0']['desc'] = 'Beschreibung'; $mip_form['0']['chk_var'] = 'MOD_VAR[0]'; $mip_form['0']['chk_val'] = $cms_mod['value']['0']; $mip_form['0']['cms_var'] = 'MOD_VAR[1]'; $mip_form['0']['cms_val'] = $cms_mod['value']['1']; $mip_form['0']['cms_val_default'] = ' '; $mip_form['0']['tab'] = '0'; mip_formsp($mip_form['0']); **[Radiobutton][Beschreibung][Textbox]** Beispiel: $mip_form['0']['cat'] = 'txt'; $mip_form['0']['type'] = 'radio'; $mip_form['0']['desc'] = 'Beschreibung Radiotext'; $mip_form['0']['radio_var'] = 'MOD_VAR[0]'; $mip_form['0']['radio_val'] = $cms_mod['value']['0']; $mip_form['0']['radio_user_val'] = 'wenn_gleich_radio_val_dann_aktiviert'; $mip_form['0']['radio_val_default'] = ' '; $mip_form['0']['cms_var'] = 'MOD_VAR[1]'; $mip_form['0']['cms_val'] = $cms_mod['value']['1']; $mip_form['0']['cms_val_default'] = ' '; $mip_form['0']['tab'] = '0'; mip_formsp($mip_form['0']); **[Textbox]** Beispiel: $mip_form['0']['cat'] = 'txt'; $mip_form['0']['type'] = 'long'; $mip_form['0']['desc'] = 'Beschreibung'; $mip_form['0']['cms_var'] = 'MOD_VAR[1]'; $mip_form['0']['cms_val'] =$cms_mod['value']['1']; $mip_form['0']['cms_val_default'] = ' '; $mip_form['0']['tab'] = '0'; mip_formsp($mip_form['0']); **[Checkbox][Beschreibung][Textbox]** Beispiel: $mip_form['0']['cat'] = 'txt'; $mip_form['0']['type'] = 'chk_long'; $mip_form['0']['desc'] = 'Beschreibung'; $mip_form['0']['chk_var'] = 'MOD_VAR[0]'; $mip_form['0']['chk_val'] =$cms_mod['value']['0']; $mip_form['0']['cms_var'] = 'MOD_VAR[1]'; $mip_form['0']['cms_val'] = $cms_mod['value']['1']; $mip_form['0']['cms_val_default'] = ' '; $mip_form['0']['tab'] = '0'; mip_formsp($mip_form['0']); **[Radiobutton][Beschreibung][Textbox]** Beispiel: $mip_form['0']['cat'] = 'txt'; $mip_form['0']['type'] = 'radio_long'; $mip_form['0']['desc'] = 'Beschreibung Radiotext'; $mip_form['0']['radio_var'] = 'MOD_VAR[0]'; $mip_form['0']['radio_val'] = $cms_mod['value']['0']; $mip_form['0']['radio_val_default'] = ' '; $mip_form['0']['radio_user_val'] = 'wenn_gleich_radio_val_dann_aktiviert'; $mip_form['0']['cms_var'] = 'MOD_VAR[1]'; $mip_form['0']['cms_val'] = $cms_mod['value']['1']; $mip_form['0']['cms_val_default'] = ' '; $mip_form['0']['tab'] = '0'; mip_formsp($mip_form['0']); ==== Textareas ==== **[Beschreibung][Textarea]** Beispiel: $mip_form['0']['cat'] = 'txtarea'; $mip_form['0']['rows'] = '3'; $mip_form['0']['type'] = ' '; $mip_form['0']['desc'] = 'Beschreibung'; $mip_form['0']['cms_var'] = 'MOD_VAR[1]'; $mip_form['0']['cms_val'] = $cms_mod['value']['1']; $mip_form['0']['cms_val_default'] = ' '; $mip_form['0']['tab'] = '0'; mip_formsp($mip_form['0']); **[Checkbox][Beschreibung][Textarea]** Beispiel: $mip_form['0']['cat'] = 'txtarea'; $mip_form['0']['rows'] = ' '; $mip_form['0']['type'] = 'chk'; $mip_form['0']['desc'] = 'Beschreibung'; $mip_form['0']['chk_var'] = MOD_VAR[0]'; $mip_form['0']['chk_val'] = '$cms_mod['value']['0']; $mip_form['0']['cms_var'] ='MOD_VAR[1]'; $mip_form['0']['cms_val'] = $cms_mod['value']['1']; $mip_form['0']['cms_val_default'] = ' '; $mip_form['0']['tab'] = '0'; mip_formsp($mip_form['0']); **[Radiobutton] [Beschreibung] [Textarea]** Beispiel: $mip_form['0']['cat'] = 'txtarea'; $mip_form['0']['rows'] = '3'; $mip_form['0']['type'] = 'radio'; $mip_form['0']['desc'] = 'Beschreibung Radiotext'; $mip_form['0']['radio_var'] = 'MOD_VAR[0]'; $mip_form['0']['radio_val'] = $cms_mod['value']['0']; $mip_form['0']['radio_user_val'] = 'wenn_gleich_radio_val_dann_aktiviert'; $mip_form['0']['radio_val_default'] = ' '; $mip_form['0']['cms_var'] = 'MOD_VAR[1]'; $mip_form['0']['cms_val'] = $cms_mod['value']['1']; $mip_form['0']['cms_val_default'] = ' '; $mip_form['0']['tab'] = '0'; mip_formsp($mip_form['0']); **[Beschreibung][Textarea]** Beispiel: $mip_form['0']['cat'] = 'txtarea'; $mip_form['0']['rows'] = '3'; $mip_form['0']['type'] = 'long'; $mip_form['0']['desc'] = 'Beschreibung'; $mip_form['0']['cms_var'] = 'MOD_VAR[1]'; $mip_form['0']['cms_val'] = $cms_mod['value']['1']; $mip_form['0']['cms_val_default'] = ' '; $mip_form['0']['tab'] = '0'; mip_formsp($mip_form['0']); **[Checkbox] [Beschreibung] [Textarea]** Beispiel: $mip_form['0']['cat'] = 'txtarea'; $mip_form['0']['rows'] = '3'; $mip_form['0']['type'] = 'chk_long'; $mip_form['0']['desc'] = 'Beschreibung'; $mip_form['0']['chk_var'] = 'MOD_VAR[0]'; $mip_form['0']['chk_val'] = $cms_mod['value']['0']; $mip_form['0']['cms_var'] = 'MOD_VAR[1]'; $mip_form['0']['cms_val'] = $cms_mod['value']['1']; $mip_form['0']['cms_val_default'] = ' '; $mip_form['0']['tab'] = '0'; mip_formsp($mip_form['0']); **[Radiobutton] [Beschreibung] [Textarea]** Beispiel: $mip_form['0']['cat'] = 'txtarea'; $mip_form['0']['rows'] = '3'; $mip_form['0']['type'] = 'radio_long'; $mip_form['0']['desc'] = 'Beschreibung Radiotext'; $mip_form['0']['radio_var'] = 'MOD_VAR[0]'; $mip_form['0']['radio_val'] = $cms_mod['value']['0']; $mip_form['0']['radio_user_val'] = 'wenn_gleich_radio_val_dann_aktiviert'; $mip_form['0']['radio_val_default'] = ' '; $mip_form['0']['cms_var'] = 'MOD_VAR[1]'; $mip_form['0']['cms_val'] = $cms_mod['value']['1']; $mip_form['0']['cms_val_default'] = ' '; $mip_form['0']['tab'] = '0'; mip_formsp($mip_form['0']); ==== Optionsfelder ==== **[Beschreibung] [Option x1] [Optionbeschreibung x1] [Option x2] [Optionbeschreibung x2] [Option x3] [Optionbeschreibung x3]** ... ... Beispiel: $mip_form['0']['cat'] = 'option'; $mip_form['0']['type'] = ''; $mip_form['0']['desc'] = 'Auswahl:'; $mip_form['0']['cms_var'] = 'MOD_VAR[0]'; $mip_form['0']['cms_val'] = $cms_mod['value']['0']; $mip_form['0']['cms_val_default'] = ' '; $mip_form['0']['option_desc']['0'] = 'Option 1'; $mip_form['0']['option_val']['0'] = 'val1'; $mip_form['0']['option_desc']['1'] = 'Option 2'; $mip_form['0']['option_val']['1'] = 'val2'; $mip_form['0']['option_desc']['2'] = ' '; $mip_form['0']['option_val']['2'] = 'wenn_desc_leer_value_wird_angezeigt'; $mip_form['0']['size'] = 1; $mip_form['0']['tab'] = '0'; mip_formsp($mip_form['0']); oder für ein mehrzeiliges Optionsfeld (hier ist der Parameter „size“ > 1 zu setzen): $mip_form['0']['cat'] = 'option'; $mip_form['0']['type'] = 'long'; $mip_form['0']['desc'] = 'Auswahl:'; $mip_form['0']['cms_var'] = 'MOD_VAR[0]'; $mip_form['0']['cms_val'] = $cms_mod['value']['0']; $mip_form['0']['cms_val_default'] = ' '; $mip_form['0']['option_desc']['0'] = 'Option 1'; $mip_form['0']['option_val']['0'] = 'val1'; $mip_form['0']['option_desc']['1'] = 'Option 2'; $mip_form['0']['option_val']['1'] = 'val2'; $mip_form['0']['option_desc']['2'] = ' '; $mip_form['0']['option_val']['2'] = 'wenn_desc_leer_value_wird_angezeigt'; $mip_form['0']['size'] = '3'; $mip_form['0']['flag'] = 'multiple'; $mip_form['0']['tab'] = '0'; mip_formsp($mip_form['0']); **[Checkbox] [Beschreibung] [Option x1] [Optionbeschreibung x1] [Option x2] [Optionbeschreibung x2]** Beispiel: $mip_form['0']['cat'] = 'option'; $mip_form['0']['type'] = 'chk'; $mip_form['0']['desc'] = 'Auswahl:'; $mip_form['0']['chk_var'] = 'MOD_VAR[4]'; $mip_form['0']['chk_val'] = $cms_mod['value']['4']; $mip_form['0']['cms_var'] = 'MOD_VAR[0]'; $mip_form['0']['cms_val'] =$cms_mod['value']['0']; $mip_form['0']['cms_val_default'] = ' '; $mip_form['0']['option_desc']['0'] = 'Option 1'; $mip_form['0']['option_val']['0'] = 'val1'; $mip_form['0']['option_desc']['1'] = 'Option 2'; $mip_form['0']['option_val']['1'] = 'val2'; $mip_form['0']['option_desc']['2'] = ' '; $mip_form['0']['option_val']['2'] = 'wenn_desc_leer_value_wird_angezeigt'; $mip_form['0']['tab'] = '0'; mip_formsp($mip_form['0']); **[Radiobutton] [Beschreibung] [Option x1] [Optionbeschreibung x1] [Option x2] [Optionbeschreibung x2]** Beispiel: $mip_form['0']['cat'] = 'option'; $mip_form['0']['type'] = 'radio'; $mip_form['0']['desc'] = 'Beschreibung'; $mip_form['0']['radio_var'] = 'MOD_VAR[4]'; $mip_form['0']['radio_val'] = $cms_mod['value']['4']; $mip_form['0']['radio_user_val'] = 'wenn_gleich_radio_val_dann_aktiviert'; $mip_form['0']['radio_val_default'] = ' '; $mip_form['0']['cms_var'] = 'MOD_VAR[0]'; $mip_form['0']['cms_val'] =$cms_mod['value']['0']; $mip_form['0']['cms_val_default'] = ' '; $mip_form['0']['option_desc']['0'] = 'Option 1'; $mip_form['0']['option_val']['0'] = 'val1'; $mip_form['0']['option_desc']['1'] = 'Option 2'; $mip_form['0']['option_val']['1'] = 'val2'; $mip_form['0']['option_desc']['2'] = ' '; $mip_form['0']['option_val']['2'] = 'wenn_desc_leer_value_wird_angezeigt'; $mip_form['0']['tab'] = '0'; mip_formsp($mip_form['0']); **[Beschreibung] [Option x1] [Optionbeschreibung x1] [Option x2] [Optionbeschreibung x2] [Option x3] [Optionbeschreibung x3] ...** Beispiel: $mip_form['0']['cat'] = 'option'; $mip_form['0']['type'] = 'long'; $mip_form['0']['desc'] = 'Auswahl:'; $mip_form['0']['cms_var'] = 'MOD_VAR[0]'; $mip_form['0']['cms_val'] =$cms_mod['value']['0']; $mip_form['0']['cms_val_default'] = ' '; $mip_form['0']['option_desc']['0'] = 'Option 1'; $mip_form['0']['option_val']['0'] = 'val1'; $mip_form['0']['option_desc']['1'] = 'Option 2'; $mip_form['0']['option_val']['1'] = 'val2'; $mip_form['0']['option_desc']['2'] = ' '; $mip_form['0']['option_val']['2'] = 'wenn_desc_leer_value_wird_angezeigt'; $mip_form['0']['tab'] = '0'; mip_formsp($mip_form['0']); **[Checkbox] [Beschreibung] [Option x1] [Optionbeschreibung x1] [Option x2] [Optionbeschreibung x2] ...** Beispiel: $mip_form['0']['cat'] = 'option'; $mip_form['0']['type'] = 'chk_long'; $mip_form['0']['desc'] = 'Auswahl:'; $mip_form['0']['chk_var'] = 'MOD_VAR[4]'; $mip_form['0']['chk_val'] = $cms_mod['value']['4']; $mip_form['0']['chk_val_default'] = ' '; $mip_form['0']['cms_var'] = 'MOD_VAR[0]'; $mip_form['0']['cms_val'] = $cms_mod['value']['0']; $mip_form['0']['cms_val_default'] = ' '; $mip_form['0']['option_desc']['0'] = 'Option 1'; $mip_form['0']['option_val']['0'] = 'val1'; $mip_form['0']['option_desc']['1'] = 'Option 2'; $mip_form['0']['option_val']['1'] = 'val2'; $mip_form['0']['option_desc']['2'] = ' '; $mip_form['0']['option_val']['2'] = 'wenn_desc_leer_value_wird_angezeigt'; $mip_form['0']['tab'] = '0'; mip_formsp($mip_form['0']); ** [Radiobutton] [Beschreibung] [Option x1] [Optionbeschreibung x1] [Option x2] [Optionbeschreibung x2] ** Beispiel: $mip_form['0']['cat'] = 'option'; $mip_form['0']['type'] = 'radio_long'; $mip_form['0']['desc'] = 'Beschreibung:'; $mip_form['0']['radio_var'] = 'MOD_VAR[4]'; $mip_form['0']['radio_val'] = $cms_mod['value']['4']; $mip_form['0']['radio_user_val'] = 'wenn_gleich_radio_val_dann_aktiviert'; $mip_form['0']['cms_var'] = 'MOD_VAR[0]'; $mip_form['0']['cms_val'] = $cms_mod['value']['0']; $mip_form['0']['cms_val_default'] = ' '; $mip_form['0']['option_desc']['0'] = 'Option 1'; $mip_form['0']['option_val']['0'] = 'val1'; $mip_form['0']['option_desc']['1'] = 'Option 2'; $mip_form['0']['option_val']['1'] = 'val2'; $mip_form['0']['option_desc']['2'] = ' '; $mip_form['0']['option_val']['2'] = 'wenn_desc_leer_value_wird_angezeigt'; $mip_form['0']['tab'] = '0'; mip_formsp($mip_form['0']); ==== Radiobuttons ==== **[Beschreibung] [Radiobutton x1] [Radiobuttonbeschreibung x1] [Radiobutton x2] [Radiobuttonbeschreibung x2] [Radiobutton x3] [Radiobuttonbeschreibung x3]** Beispiel: $mip_form['0']['cat'] = 'radio'; $mip_form['0']['type'] = ' '; $mip_form['0']['desc'] = 'Auswahl:'; $mip_form['0']['cms_var'] = 'MOD_VAR[0]'; $mip_form['0']['cms_val'] = $cms_mod['value']['0']; $mip_form['0']['cms_val_default'] = ' '; $mip_form['0']['option_desc']['0'] = 'Option 1'; $mip_form['0']['option_val']['0'] = 'val1'; $mip_form['0']['option_desc']['1'] = 'Option 2'; $mip_form['0']['option_val']['1'] = 'val2'; $mip_form['0']['option_desc']['2'] = ' '; $mip_form['0']['option_val']['2'] = 'wenn_desc_leer_value_wird_angezeigt'; $mip_form['0']['tab'] = '0'; mip_formsp($mip_form['0']); **[Checkbox] [Beschreibung] [Radiobutton x1] [Radiobuttonbeschreibung x1] [Radiobutton x2] [Radiobuttonbeschreibung x2]** Beispiel: $mip_form['0']['cat'] = 'radio'; $mip_form['0']['type'] = 'chk'; $mip_form['0']['desc'] = 'Auswahl:'; $mip_form['0']['chk_var'] = 'MOD_VAR[4]'; $mip_form['0']['chk_val'] = $cms_mod['value']['4']; $mip_form['0']['chk_val_default'] = ' '; $mip_form['0']['cms_var'] = 'MOD_VAR[0]'; $mip_form['0']['cms_val'] = $cms_mod['value']['0']; $mip_form['0']['cms_val_default'] = ' '; $mip_form['0']['option_desc']['0'] = 'Option 1'; $mip_form['0']['option_val']['0'] = 'val1'; $mip_form['0']['option_desc']['1'] = 'Option 2'; $mip_form['0']['option_val']['1'] = 'val2'; $mip_form['0']['option_desc']['2'] = ' '; $mip_form['0']['option_val']['2'] = 'wenn_desc_leer_value_wird_angezeigt'; $mip_form['0']['tab'] = '0'; mip_formsp($mip_form['0']); **[Radiobutton] [Beschreibung] [Radiobutton x1] [Radiobuttonbeschreibung x1] [Radiobutton x2] [Radiobuttonbeschreibung x2]** Beispiel: $mip_form['0']['cat'] = 'radio'; $mip_form['0']['type'] = 'radio'; $mip_form['0']['desc'] = 'Beschreibung'; $mip_form['0']['radio_var'] = 'MOD_VAR[4]'; $mip_form['0']['radio_val'] = $cms_mod['value']['4']; $mip_form['0']['radio_user_val'] = 'wenn_gleich_radio_val_dann_aktiviert'; $mip_form['0']['radio_val_default'] = 'wenn_radio_val_leer__dieser_wert'; $mip_form['0']['cms_var'] = 'MOD_VAR[0]'; $mip_form['0']['cms_val'] = $cms_mod['value']['0']; $mip_form['0']['cms_val_default'] = ' '; $mip_form['0']['option_desc']['0'] = 'Option 1'; $mip_form['0']['option_val']['0'] = 'val1'; $mip_form['0']['option_desc']['1'] = 'Option 2'; $mip_form['0']['option_val']['1'] = 'val2'; $mip_form['0']['option_desc']['2'] = ' '; $mip_form['0']['option_val']['2'] = 'wenn_desc_leer_value_wird_angezeigt'; $mip_form['0']['tab'] = '0'; mip_formsp($mip_form['0']); **[Beschreibung] [Radiobutton x1] [Radiobuttonbeschreibung x1] [Radiobutton x2] [Radiobuttonbeschreibung x2] [Radiobutton x3] [Radiobuttonbeschreibung x3]** Beispiel: $mip_form['0']['cat'] = 'radio'; $mip_form['0']['type'] = 'long'; $mip_form['0']['desc'] = 'Auswahl:'; $mip_form['0']['cms_var'] = 'MOD_VAR[0]'; $mip_form['0']['cms_val'] = $cms_mod['value']['0']; $mip_form['0']['cms_val_default'] = ' '; $mip_form['0']['option_desc']['0'] = 'Option 1'; $mip_form['0']['option_val']['0'] = 'val1'; $mip_form['0']['option_desc']['1'] = 'Option 2'; $mip_form['0']['option_val']['1'] = 'val2'; $mip_form['0']['option_desc']['2'] = ' '; $mip_form['0']['option_val']['2'] = 'wenn_desc_leer_value_wird_angezeigt'; $mip_form['0']['tab'] = '0'; mip_formsp($mip_form['0']); **[Checkbox] [Beschreibung] [Radiobutton x1] [Radiobuttonbeschreibung x1] [Radiobutton x2] [Radiobuttonbeschreibung x2]** Beispiel: $mip_form['0']['cat'] = 'radio'; $mip_form['0']['type'] = 'chk_long'; $mip_form['0']['desc'] = 'Auswahl:'; $mip_form['0']['chk_var'] = 'MOD_VAR[4]'; $mip_form['0']['chk_val'] = $cms_mod['value']['4']; $mip_form['0']['chk_val_default'] = ' '; $mip_form['0']['cms_var'] = 'MOD_VAR[0]'; $mip_form['0']['cms_val'] = $cms_mod['value']['0']; $mip_form['0']['cms_val_default'] = ' '; $mip_form['0']['option_desc']['0'] = 'Option 1'; $mip_form['0']['option_val']['0'] = 'val1'; $mip_form['0']['option_desc']['1'] = 'Option 2'; $mip_form['0']['option_val']['1'] = 'val2'; $mip_form['0']['option_desc']['2'] = ' '; $mip_form['0']['option_val']['2'] = 'wenn_desc_leer_value_wird_angezeigt'; $mip_form['0']['tab'] = '0'; mip_formsp($mip_form['0']); **[Radiobutton] [Beschreibung] [Radiobutton x1] [Radiobuttonbeschreibung x1] [Radiobutton x2] [Radiobuttonbeschreibung x2]** Beispiel: $mip_form['0']['cat'] = 'radio'; $mip_form['0']['type'] = 'radio_long'; $mip_form['0']['desc'] = 'Beschreibung:'; $mip_form['0']['radio_var'] = 'MOD_VAR[4]'; $mip_form['0']['radio_val'] = $cms_mod['value']['4']; $mip_form['0']['radio_user_val'] = 'wenn_gleich_radio_val_dann_aktiviert'; $mip_form['0']['radio_val_default'] = ' '; $mip_form['0']['cms_var'] = 'MOD_VAR[0]'; $mip_form['0']['cms_val'] = $cms_mod['value']['0']; $mip_form['0']['cms_val_default'] = ' '; $mip_form['0']['option_desc']['0'] = 'Option 1'; $mip_form['0']['option_val']['0'] = 'val1'; $mip_form['0']['option_desc']['1'] = 'Option 2'; $mip_form['0']['option_val']['1'] = 'val2'; $mip_form['0']['option_desc']['2'] = ' '; $mip_form['0']['option_val']['2'] = 'wenn_desc_leer_value_wird_angezeigt'; $mip_form['0']['tab'] = '0'; mip_formsp($mip_form['0']); ==== Checkboxen ==== **[Beschreibung] [Checkbox x1] [Checkboxbeschreibung x1] [Checkbox x2] [Checkboxbeschreibung x2] [Checkbox x3] [Checkboxbeschreibung x3]** Beispiel: $mip_form['0']['cat'] = 'chk'; $mip_form['0']['type'] = ''; $mip_form['0']['desc'] = 'Auswahl:'; $mip_form['0']['option_desc']['0'] = 'Checkbox 1'; $mip_form['0']['option_var']['0'] = 'MOD_VAR[0]'; $mip_form['0']['option_val']['0'] = $cms_mod['value']['0']; $mip_form['0']['option_val_select']['0'] = 'gecheckt'; $mip_form['0']['option_desc']['1'] = 'Checkbox 2'; $mip_form['0']['option_var']['1'] = 'MOD_VAR[1]'; $mip_form['0']['option_val']['1'] = $cms_mod['value']['1']; $mip_form['0']['option_val_select']['1'] = 'gecheckt'; $mip_form['0']['option_desc']['2'] = 'Checkbox 3'; $mip_form['0']['option_var']['2'] = 'MOD_VAR[2]'; $mip_form['0']['option_val']['2'] = $cms_mod['value']['2']; $mip_form['0']['option_val_select']['2'] = 'gecheckt'; $mip_form['0']['tab'] = '0'; mip_formsp($mip_form['0']); **[Checkbox] [Beschreibung] [Checkbox x1] [Checkboxbeschreibung x1] [Checkbox x2] [Checkboxbeschreibung x2]** Beispiel: $mip_form['0']['cat'] = 'chk'; $mip_form['0']['type'] = 'chk'; $mip_form['0']['desc'] = 'Auswahl:'; $mip_form['0']['chk_var'] = 'MOD_VAR[4]'; $mip_form['0']['chk_val'] = $cms_mod['value']['4']; $mip_form['0']['chk_val_default'] = ' '; $mip_form['0']['option_desc']['0'] = 'Checkbox 1'; $mip_form['0']['option_var']['0'] = 'MOD_VAR[0]'; $mip_form['0']['option_val']['0'] = $cms_mod['value']['0']; $mip_form['0']['option_val_select']['0'] = 'gecheckt'; $mip_form['0']['option_desc']['1'] = 'Checkbox 2'; $mip_form['0']['option_var']['1'] = 'MOD_VAR[1]'; $mip_form['0']['option_val']['1'] = $cms_mod['value']['1']; $mip_form['0']['option_val_select']['1'] = 'gecheckt'; $mip_form['0']['option_desc']['2'] = 'Checkbox 3'; $mip_form['0']['option_var']['2'] = 'MOD_VAR[2]'; $mip_form['0']['option_val']['2'] = $cms_mod['value']['2']; $mip_form['0']['option_val_select']['2'] = 'gecheckt'; $mip_form['0']['tab'] = '0'; mip_formsp($mip_form['0']); **[Radiobutton] [Beschreibung] [Checkbox x1] [Checkboxbeschreibung x1] [Checkbox x2] [Checkboxbeschreibung x2]** Beispiel: $mip_form['0']['cat'] = 'chk'; $mip_form['0']['type'] = 'radio'; $mip_form['0']['desc'] = 'Radiobuttonbeschreibung:'; $mip_form['0']['radio_var'] = 'MOD_VAR[4]'; $mip_form['0']['radio_val'] = $cms_mod['value']['4']; $mip_form['0']['radio_user_val'] = 'wenn_gleich_radio_val_dann_aktiviert'; $mip_form['0']['radio_val_default'] = ' '; $mip_form['0']['option_desc']['0'] = 'Checkbox 1'; $mip_form['0']['option_var']['0'] = 'MOD_VAR[0]'; $mip_form['0']['option_val']['0'] = $cms_mod['value']['0']; $mip_form['0']['option_val_select']['0'] = 'gecheckt'; $mip_form['0']['option_desc']['1'] = 'Checkbox 2'; $mip_form['0']['option_var']['1'] = 'MOD_VAR[1]'; $mip_form['0']['option_val']['1'] = $cms_mod['value']['1']; $mip_form['0']['option_val_select']['1'] = 'gecheckt'; $mip_form['0']['option_desc']['2'] = 'Checkbox 3'; $mip_form['0']['option_var']['2'] = 'MOD_VAR[2]'; $mip_form['0']['option_val']['2'] = $cms_mod['value']['2']; $mip_form['0']['option_val_select']['2'] = 'gecheckt'; $mip_form['0']['tab'] = '0'; mip_formsp($mip_form['0']); **[Beschreibung] [Checkbox x1] [Checkboxbeschreibung x1] [Checkbox x2] [Checkboxbeschreibung x2] [Checkbox x3] [Checkboxbeschreibung x3]** Beispiel: $mip_form['0']['cat'] = 'chk'; $mip_form['0']['type'] = 'long'; $mip_form['0']['desc'] = 'Auswahl:'; $mip_form['0']['option_desc']['0'] = 'Checkbox 1'; $mip_form['0']['option_var']['0'] = 'MOD_VAR[0]'; $mip_form['0']['option_val']['0'] = $cms_mod['value']['0']; $mip_form['0']['option_val_select']['0'] = 'gecheckt'; $mip_form['0']['option_desc']['1'] = 'Checkbox 2'; $mip_form['0']['option_var']['1'] = 'MOD_VAR[1]'; $mip_form['0']['option_val']['1'] = $cms_mod['value']['1']; $mip_form['0']['option_val_select']['1'] = 'gecheckt'; $mip_form['0']['option_desc']['2'] = 'Checkbox 3'; $mip_form['0']['option_var']['2'] = 'MOD_VAR[2]'; $mip_form['0']['option_val']['2'] = $cms_mod['value']['2']; $mip_form['0']['option_val_select']['2'] = 'gecheckt'; $mip_form['0']['tab'] = '0'; mip_formsp($mip_form['0']); **[Checkbox] [Beschreibung] [Checkbox x1] [Checkboxbeschreibung x1] [Checkbox x2] [Checkboxbeschreibung x2]** Beispiel: $mip_form['0']['cat'] = 'chk'; $mip_form['0']['type'] = 'chk_long'; $mip_form['0']['desc'] = 'Auswahl:'; $mip_form['0']['chk_var'] = 'MOD_VAR[4]'; $mip_form['0']['chk_val'] = $cms_mod['value']['4']; $mip_form['0']['option_desc']['0'] = 'Checkbox 1'; $mip_form['0']['option_var']['0'] = 'MOD_VAR[0]'; $mip_form['0']['option_val']['0'] = $cms_mod['value']['0']; $mip_form['0']['option_val_select']['0'] = 'gecheckt'; $mip_form['0']['option_desc']['1'] = 'Checkbox 2'; $mip_form['0']['option_var']['1'] = 'MOD_VAR[1]'; $mip_form['0']['option_val']['1'] = $cms_mod['value']['1']; $mip_form['0']['option_val_select']['1'] = 'gecheckt'; $mip_form['0']['option_desc']['2'] = 'Checkbox 3'; $mip_form['0']['option_var']['2'] = 'MOD_VAR[2]'; $mip_form['0']['option_val']['2'] = $cms_mod['value']['2']; $mip_form['0']['option_val_select']['2'] = 'gecheckt'; $mip_form['0']['tab'] = '0'; mip_formsp($mip_form['0']); **[Radiobutton] [Beschreibung] [Checkbox x1] [Checkboxbeschreibung x1] [Checkbox x2] [Checkboxbeschreibung x2]** Beispiel: $mip_form['0']['cat'] = 'chk'; $mip_form['0']['type'] = 'radio_long'; $mip_form['0']['desc'] = 'Radiobuttonbeschreibung:'; $mip_form['0']['radio_var'] = 'MOD_VAR[4]'; $mip_form['0']['radio_val'] = $cms_mod['value']['4']; $mip_form['0']['radio_user_val'] = 'wenn_gleich_radio_val_dann_aktiviert'; $mip_form['0']['radio_val_default'] = ' '; $mip_form['0']['option_desc']['0'] = 'Checkbox 1'; $mip_form['0']['option_var']['0'] = 'MOD_VAR[0]'; $mip_form['0']['option_val']['0'] = $cms_mod['value']['0']; $mip_form['0']['option_val_select']['0'] = 'gecheckt'; $mip_form['0']['option_desc']['1'] = 'Checkbox 2'; $mip_form['0']['option_var']['1'] = 'MOD_VAR[1]'; $mip_form['0']['option_val']['1'] = $cms_mod['value']['1']; $mip_form['0']['option_val_select']['1'] = 'gecheckt'; $mip_form['0']['option_desc']['2'] = 'Checkbox 3'; $mip_form['0']['option_var']['2'] = 'MOD_VAR[2]'; $mip_form['0']['option_val']['2'] = $cms_mod['value']['2']; $mip_form['0']['option_val_select']['2'] = 'gecheckt'; $mip_form['0']['tab'] = '0'; mip_formsp($mip_form['0']); ==== Hidden ==== Erstellt ein unsichtbares hidden- Formularfeld **[hiddenformularfeld]** Beispiel: $mip_form['0']['cat'] = 'hidden'; $mip_form['0']['cms_var'] = $cms_mod['value']['0']; $mip_form['0']['cms_val'] = 'mein_wert'; mip_formsp($mip_form['0']); ==== Applikation ==== Erstellt Formularfelder, in denen schon bestimmte Sefrengo Funktionalitäten enthalten sind. Eine Applikation wird mit „$mip_form['X']['cat'] = 'app_XXX'“ initialisiert. „$mip_form['output_cat']“ gibt die Kategorie an, wie das Formularfeld später beschaffen sein soll. 'option' oder 'radio' werden unterstützt. Empfehlung: 'option'. === CSS- Styles === Stellt eine Liste aller intern verfügbaren Stylesheets zur Verfügung. $mip_form['flag'] ist ein optionaler Parameter. 'id_only' parst nur css-Id's, 'class_only' parst nur css-Klassen. Es wird dringend empfohlen, diesen Parameter zu setzen, da hinterher keine Rückschlüsse mehr auf die Herkunft gezogen werden können (z.B. wird die Klasse ".class_or_id" später zu der Variablen 'class_or_id', ebenso wird die CSS- ID '#class_or_id' zur Variablen 'class_or_id'. Beispiel: $mip_form['3']['desc'] = "Stylesheet"; $mip_form['3']['cat'] = 'app_css'; $mip_form['3']['output_cat'] = 'option'; $mip_form['3']['type'] = ; $mip_form['3']['cms_var'] = "MOD_VAR[3]"; $mip_form['3']['cms_val'] = $cms_mod['value']['3']; $mip_form['3']['cms_val_default'] = ; $mip_form['3']['flag'] = "class_only"; mip_formsp($mip_form['3']); === Kategorien (Ordner unter Redaktion-> Seiten) === Zeigt eine Liste aller verfügbaren Ordner des Bereiches Redaktion-> Seiten an. **$mip_form['X']['without_root_cat'] = false/ true;** \\ Ist dieser Wert auf true gesetzt, wird die Option „root“ nicht angezeigt. Standardmässig ist die Option mit „false“ vorbelegt. **$mip_form['X']['without_this_cat'] = false/ true;** \\ Ist dieser Wert auf true gesetzt, wird die Option „Dieser Ordner“ nicht angezeigt. Standardmässig ist die Option mit „false“ vorbelegt. Beispiel: $mip_form['3']['desc'] = "Kategorie"; $mip_form['3']['cat'] = 'app_cat'; $mip_form['3']['output_cat'] = 'option'; $mip_form['3']['size'] = 3; $mip_form['3']['cms_var'] = "MOD_VAR[3]"; $mip_form['3']['cms_val'] = $cms_mod['value']['3']; mip_formsp($mip_form['3']); === Benutzergruppen === Zeigt alle verfügbaren Gruppen aus dem Bereich Administration-> Gruppen an. **$mip_form['X']['without_all_groups'] = false/ true;** \\ Ist dieser Wert auf true gesetzt, wird die Option „Alle Ordner“ nicht angezeigt. Standardmässig ist die Option mit „false“ vorbelegt. Beispiel: $mip_form['3']['desc'] = "Wählen Sie eine Gruppe"; $mip_form['3']['cat'] = 'app_group'; $mip_form['3']['output_cat'] = 'option'; $mip_form['3']['size'] = 3; $mip_form['3']['cms_var'] = "MOD_VAR[3]"; $mip_form['3']['cms_val'] = $cms_mod['value']['3']; mip_formsp($mip_form['3']); === Verzeichnisse/ Ordner (Dateimanager) === Zeigt alle verfügbaren Ordner des Dateimanagers an. **$mip_form['X']['without_all_folders'] = false/ true;** \\ Ist dieser Wert auf true gesetzt, wird die Option „Alle Ordner“ nicht angezeigt. Standardmässig ist die Option mit „false“ vorbelegt. Beispiel: $mip_form['3']['desc'] = "Ordner des Dateimanagers"; $mip_form['3']['cat'] = 'app_directory'; $mip_form['3']['output_cat'] = 'option'; $mip_form['3']['size'] = 3; $mip_form['3']['cms_var'] = "MOD_VAR[3]"; $mip_form['3']['cms_val'] = $cms_mod['value']['3']; mip_formsp($mip_form['3']); === Dateien (Dateimanager) === Zeigt eine Liste aller verfügbaren Dateien des Dateimangers an. Dieser Typ kann auch mit 'app_directory' kombiniert werden, um nur Dateien aus einzelnen Ordnern anzeigen zu lassen. **$mip_form['X']['without_no_file'] = true/false;** \\ Ist dieser Wert auf true gesetzt, wird die Option „Keine Datei“ nicht angezeigt. Standardmässig ist die Option mit „false“ vorbelegt. **$mip_form['X']['filetypes'] = 'jpg,gif';** \\ Mit diesem Wert kann die Ausgabe auf bestimmte Dateitypen beschränkt werden. Die Dateitypen müssen mit einem Koma abgetrennte sein. **$mip_form['X']['folders'] = '1,2,3';** \\ Mit diesem Wert kann die Ausgabe auf bestimmte Ordner beschränkt werden. Die ID der Odner müssen mit einem Koma abgetrennte sein. '*' => Alle Dateien werden angezeigt **$mip_form['X']['without_root_cat'] = false/ true;** \\ Ist dieser Wert auf true gesetzt, wird die Option „root“ nicht angezeigt. Standardmässig ist die Option mit „false“ vorbelegt. **$mip_form['X']['without_this_cat'] = false/ true;** \\ Ist dieser Wert auf true gesetzt, wird die Option „Dieser Ordner“ nicht angezeigt. Standardmässig ist die Option mit „false“ vorbelegt. **$mip_form['X']['subfolders'] = true/false;** \\ Ist dieser Wert auf true gesetzt, wird auch die Unterverzeichnisse von 'folders' angezeigt. Standardmässig ist die Option mit „false“ vorbelegt. **$mip_form['X']['folders_by_name']= 'meinordner/unterordner/,nocheinordner/'** \\ Angabe der Ordner die durchsucht werden müssen. Werden beide Werte (folders, folders_by_name) gesetzt wird folders bevorzugt behandelt. Beispiel 1: $mip_form['3']['desc'] = "Seite"; $mip_form['3']['cat'] = 'app_file'; $mip_form['3']['output_cat'] = 'option'; $mip_form['3']['size'] = 3; $mip_form['3']['cms_var'] = "MOD_VAR[3]"; $mip_form['3']['cms_val'] = $cms_mod['value']['3']; mip_formsp($mip_form['3']); Beispiel 2: $mip_form['2']['desc'] = "Ordner des Dateimanagers"; $mip_form['2']['cat'] = 'app_directory'; $mip_form['2']['output_cat'] = 'option'; $mip_form['2']['size'] = 1; $mip_form['2']['cms_var'] = "MOD_VAR[2]"; $mip_form['2']['cms_val'] = $cms_mod['value']['2']; $mip_form['2']['without_all_folders'] = true; $mip_form['2']['flag'] = 'reload'; $mip_form['3']['desc'] = "Defaultbild wenn kein Bild angegeben"; $mip_form['3']['cat'] = 'app_file'; $mip_form['3']['output_cat'] = 'option'; $mip_form['3']['size'] = 5; $mip_form['3']['cms_var'] = "MOD_VAR[3]"; $mip_form['3']['cms_val'] = $cms_mod['value']['3']; $mip_form['3']['folders'] = $cms_mod['value']['2']; $mip_form['3']['filetypes'] = ""; mip_formsp($mip_form['2']); mip_formsp($mip_form['3']); === Dateitypen (Dateimanager) === Zeigt alle Dateitypen an, welche im Dateimanager verfügbar sind (z.B. jpg, gif, fla, doc...). Beispiel: $mip_form['3']['desc'] = "Dateitypen"; $mip_form['3']['cat'] = 'app_filetype'; $mip_form['3']['output_cat'] = 'option'; $mip_form['3']['size'] = 3; $mip_form['3']['cms_var'] = "MOD_VAR[3]"; $mip_form['3']['cms_val'] = $cms_mod['value']['3']; mip_formsp($mip_form['3']); ===== Tabs ===== **[Pro Tab-Bereich]** mip_forms_tabpane_beginp(); mip_forms_tabpane_endp(); **[Für jeden Tab]** mip_forms_tabitem_beginp('Hallo'); // Beschriftung des Tab-Item (Register) mip_forms_tabitem_endp(); Alle Tabs die als gemeinsamer Tab-Bereich erscheinen sollen müssen von einem 'mip_forms_tabpane_beginp' und 'mip_forms_tabpane_endp' umschlossen sein. Der gesamte Inhalt einer Tab-Seite muss von 'mip_forms_tabitem_beginp' und 'mip_forms_tabitem_endp' umschlossen sein. Dabei reicht es aus, dass die mip_formsp umschlossen sind, die Konfiguration selber muss nicht umschlossen sein. Die Tab-Bereiche können auch in einader verschachtelt werden. Beispiel:

Modulbeschreibung & Lizenz

Praesent mauris. Morbi tellus nibh, iaculis vitae, placerat non, luctus sit amet, massa. Quisque dictum neque tincidunt metus. Vivamus a magna. Ut auctor ipsum quis urna. Nulla augue augue, pharetra sed, dictum at, euismod ut, libero. Nullam sapien augue, molestie aliquet, nonummy sit amet, tincidunt eget, nunc.

* [[profil>1|Björn Brockmann]] * Mistral