1. - Top - End - #2
    Ogre in the Playground
    Join Date
    Feb 2012
    Location
    Germany

    Default Re: [table]s in the Playground - All you want to know about the [table] code

    Conversion Guideline

    This is a simple Conversion Guideline how to convert the old table code (retired in the forum upgrade in 2014 - it can be spotted in old post as {table]...) with the new table code.

    The basic table structured hasn't really changed that much. Only the delimiters (and some syntax for advanced stuff) changed.

    The best way if you simply want to convert your old table to the new code is to do the following steps - "\n" stands for the newline character, "\t" for the tab character. I cannot really say how your word processor masks these characters. If you are not sure, it should be possible to insert them through copy&paste:

    1. Copy your table code (and only that!) to a (simple) word processing software (gedit, notepad, etc should do the trick).
    2. Search&Replace "\n" with "[/TD]\n[/TR]\n[TR]\n\t[TD]". A newline represented the start of a new table row. (The \n and \t in the new version are optional.)
    3. Search&Replace "|" with "[/TD]\n\t[TD]". A "|" represented the start of a new cell. (The \n and \t in the new version are optional.)
    4. Replace the "[/TABLE]" with "[/TD]\n[/TR]\n[/TABLE]"
    5. Replace the broken "{table...]" with "[TABLE="class:grid head alt1 alt2"]\n[TR]\n\t[TD]".
    6. Change your table class to the one you think fits best (or use none if you want a table without grid). If you want a header row replace all [TD]...[/TD] in your first row (but only the first row!) with [TH]...[/TH]
    7. Copy the table code back to your post


    This should work for all "basic" tables. Some stuff that needs more fixing:
    • Colspan: If you have cells featuring {colsp=:##} you need to change these cells to [TD="colspan:##"]...[/TD]
    • BR: If you used the BR code to have linebreaks in your tables, it should not work (at least Rawhide said he would remove it/that it will not longer work). But you can simple do that by doing a newline in the post where you need it. Since it isn't used any more for starting a new table row, it will start a new line in the table cell.
    • Nested tables: I'm not sure if the above will work for nested tables (I think it should). If not just convert each table separately.
    • If your table code had additional newlines, this conversion guide produces empty tables row with one empty cell ("[TR]\n\t[TD][/TD]\n[/TR]"). These should be just removed.


    If this doesn't work, feel free to say what problems arise and I will try to help whit that. Best point out which table code troubles you.


    [I will not help (or 'advertise' in using any of the posted "table converters", because I think they aren't necessary, and I don't want to debug any problems that may arise while using one of them.]
    Last edited by ChristianSt; 2014-09-06 at 03:05 AM.