Wie lege ich in einem Beitrag eine Tabelle an

Thread Status
Hello, There was no answer in this thread for more than 30 days.
It can take a long time to get an up-to-date response or contact with relevant users.
Status
Für weitere Antworten geschlossen.

Klaus Harms

Administrator
Teammitglied
Administrator
Nun, das ist in der Tat nicht ganz einfach; und ich habe momentan auch nur eine englische Übersetzung parat, die ich noch übersetzen werden.

Versuchen wir es:

Auf der Portalseite seht Ihr eine Tabelle, in der wir die neuen Velbon Einbeinstative abgebildet haben. Diese zeigt Euch auch, dass Ihr mit sogenannten vb-Codes ALLES in eine Tabelle bringen könnt: Schritft, Schriftgröisse udne Farbe, Zentrierung, Grafiken, wals auch immer...

Der Code dafür ist erst einmal generell:

[ table ] text oder was auch .... [ /table ]

Die Leerzeichen in den eckigen Klammern NICHT setzen; ich habe sie setzen müssen, damit die Syntax hier angezeigt wird.

Wie setzt sich nun eine Tabelle zusammen?

Hier die Syntax, die die Tabelle formatiert; wie gesagt, erst einmal in englischer Sprache, da wir diese Modifikation aus den USA haben:

---------------

Introduction to options:
example:

The whole option list should be wrapped with quotes.
Options are seperated by a semicolon
If an option has a value it is assigned with "equal to" mark. (option2)
If the value contains blanks or special characters it has to be wrapped with apostrophes. (option3)
If an option has more than one value they are seperated by a comma. (option4)

Description of options:
head
This option defines the first line as head, so the first row is shown as head of the table. If the table sould be sorted, the head is not sorted.

sort=1d,2,3
This defines the table to be sorted by column 1, then column 2, then column 3. The "d" after the first colum specifies the order: descending (default: ascending)

autonum=1 (equal to autonum) autonum=a autonum=A
Defines that a new first column containing a numbering should be inserted.
1 -> 1, 2, 3, 4, ... , 999, 1000, ....
a -> a, b, c, ... , aa, ab, ... , zz
A -> A, B, C, ... , AA, BB, ... , ZZ

autonumtitle=oneword autonumtitle='long value with spaces'
Defines the title of the autonum-column. Can be left empty.

width=123px width=45em width=67%
Defines the width of the table.

debug
My plugin outputs a simple comment line after the table.
"<!-- table generated by StG's vB Code
v.0.1.4 o.31 -->"
With this option the output gets more verbose:
"<!-- table has 3 rows, 2 cols with 36 chars. Parsetime: 0.47 ms at Wed 17th 2006, 12:24:42 pm by StG's vB Code
v.0.1.4 o.31 -->"
This is helpful for debugging especially if you want to know if this table comes from the cache or was generated.

css=myclass
Defines the aditional css class of the whole table. Possible values have to be defined in admincp.
The value is prepended by stg_table_ so the resulting css class with above example would be stg_table_myclass
The css code has to be added to "Additional CSS Definitions" of your style (AdminCP -> Styles & Templates -> Style Manager -> (Dropdown) Main CSS -> Additional CSS Definitions)

Introduction to special options (formating cells and rows):
example: {option1=value1}{option2=value2}
These "special" options can be written as the very first content of a cell to format it.

Description of special options:
{colsp=5}
Defines a colspan from current cell with the length of 5 cells

{css=myclass}
Defines the css class of the current row. This value is only valid in the first cell of a row and should be the first option (colspan defined after it - currently reversing the order works, too).

---------------

Um das alles etwas verständlicher zu machen, habe ich einmal den Textcode zu unserer Velbon-Ankündigung als Anhang beigefügt.

In einem Thread gepostet sieht diese Tabelle dann so aus:

Velbon RUP-4​
|
Velbon RUP-40​
|
Velbon RUP-43​
| |
Gewicht: 0.47 kg|Gewicht: 0.36 kg|Gewicht: 0.44 kg|
Länge -geschlossen: 52.0 cm| Länge -geschlossen: 48.6 cm|Länge -geschlossen: 53cm
Maximale Höhe: 169.0 cm|Maximale Höhe: 158.4 cm|Maximale Höhe: 163.7 cm
Elemente: 4| 4|4

Vielleicht wird diese Anleitung dann etwas verständlicher.

Ich werde schauen, dass ich die Zeit finde, eine Übersetzung der Anleitung hier zu posten.
 

Anhänge

  • code.txt
    795 Bytes · Aufrufe: 21
Zuletzt bearbeitet:
Anzeigen
Status
Für weitere Antworten geschlossen.
-Anzeige-
Zurück
Oben Unten