Results 1 to 30 of 36

Thread: Table Tag

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Nur-ad-Din Forum Administrator TosaInu's Avatar
    Join Date
    Jul 2002
    Posts
    12,326

    Default Table Tag

    Credit to Mouzafphaerre for this.

    Table tag. Table tags are normally dangerous for forum layouts, for example because it isn't closed properly. This hack does not have that unwanted side effect as far as I can see. Usage may be a bit confusing at first, but I guess anyone can get used to it. The hack is still under development, so it may become more userfriendly.

    It works pretty simple {table} or {table 1 2 3} is the opening tag and {/table} closes it. Difference is tableborder, padding and spacing (use numbers to your liking). Each new line is a row. A | makes a new cell. There are also 7 styles that can be used for each line. Use them like this 5^ . Style 7 is default and can be omited. Use [ instead of { and ] instead of }.

    {table 1 3 0}
    1|2|test 16798789789797979799879797979|4|5|6|7
    1^~right with colspan
    2^333|=center with colspan
    3^1|2|left with colspan
    4^1|~center without colspan|3|4|5|6|7
    5^1|blablabla|3|4|5
    6^1|2|3|4|5|6|7
    {/table}

    Gives


    Just {table}


    I've briefly tested it and this hack seems to be ok, it will be removed however until /unless it gets improved when there are unwanted effects.

    Feel free to experiment away and have fun.
    Ja mata

    TosaInu

  2. #2
    Nur-ad-Din Forum Administrator TosaInu's Avatar
    Join Date
    Jul 2002
    Posts
    12,326

    Default Re: Table Tag

    Note: the WYSIWYG mode does not allow to edit the table after it's posted, that happens with some other code too. Use the normal editor then (UserCP/edit options).
    Ja mata

    TosaInu

  3. #3
    Research Fiend Technical Administrator Tetris Champion, Summer Games Champion, Snakeman Champion, Ms Pacman Champion therother's Avatar
    Join Date
    Feb 2004
    Location
    UK
    Posts
    2,640

    Default Re: Table Tag

    Just playing about with it now - looks excellent. A great addition for presenting research data. Thanks very much Tosa for the work, and Mouzafphaerre for the idea.
    Nullius addictus iurare in verba magistri -- Quintus Horatius Flaccus

    History is a pack of lies about events that never happened told by people who weren't there -- George Santayana

  4. #4
    Research Fiend Technical Administrator Tetris Champion, Summer Games Champion, Snakeman Champion, Ms Pacman Champion therother's Avatar
    Join Date
    Feb 2004
    Location
    UK
    Posts
    2,640

    Default Re: Table Tag

    A question: I'm trying to format this data into a table. I've chosen {table 1 2 2} as my options, and each entry is centred with no style. The problem seems to be that every so often the "=" appears or there is a space in between figures. I've manually checked through the table (the data was generated by a script) but I can find no obvious reason for the aberrations. Any ideas on what is causing it? I fiddled with the settings a little, but no joy.

    Edit: Removed one decimal place in the 2nd column of affected rows, and the problem seems to vanish. Very curious...

    Oh well, they were extraneous digits anyway.

    Last edited by therother; 12-23-2004 at 11:39.
    Nullius addictus iurare in verba magistri -- Quintus Horatius Flaccus

    History is a pack of lies about events that never happened told by people who weren't there -- George Santayana

  5. #5
    Urwendur Ûrîbêl Senior Member Mouzafphaerre's Avatar
    Join Date
    Nov 2003
    Location
    Mikligarðr
    Posts
    6,899

    Default Re: Table Tag

    -
    Many thanks for making my humble idea a reality, and with an ingenius hack, dear patron.


    _
    Ja mata Tosa Inu-sama, Hore Tore, Adrian II, Sigurd, Fragony

    Mouzafphaerre is known elsewhere as Urwendil/Urwendur/Kibilturg...
    .

  6. #6
    Urwendur Ûrîbêl Senior Member Mouzafphaerre's Avatar
    Join Date
    Nov 2003
    Location
    Mikligarðr
    Posts
    6,899

    Lightbulb Re: Table Tag

    -
    Oh most honourable Tosa Inu sama,

    It seems that the table tag has a problem with smiley text codes (eg. ) but image tags work perfectly.
    Also, is there a way to hack the each linebreak makes a new row rule to enable multiple lines per cell?
    -
    Ja mata Tosa Inu-sama, Hore Tore, Adrian II, Sigurd, Fragony

    Mouzafphaerre is known elsewhere as Urwendil/Urwendur/Kibilturg...
    .

  7. #7
    Nur-ad-Din Forum Administrator TosaInu's Avatar
    Join Date
    Jul 2002
    Posts
    12,326

    Default Re: Table Tag

    Hello Mouzafphaerre,

    It's a hack made by JohnWoo, I only added it.

    Smilycodes, ok will see. I assume you want more than one line in a cell?
    Ja mata

    TosaInu

  8. #8
    Urwendur Ûrîbêl Senior Member Mouzafphaerre's Avatar
    Join Date
    Nov 2003
    Location
    Mikligarðr
    Posts
    6,899

    Default Re: Table Tag

    -
    Yes, more than a line per cell would be better. Smileycodes aren't as big a problem since they can always be inserted as images when necessary.
    -
    Ja mata Tosa Inu-sama, Hore Tore, Adrian II, Sigurd, Fragony

    Mouzafphaerre is known elsewhere as Urwendil/Urwendur/Kibilturg...
    .

  9. #9
    Nur-ad-Din Forum Administrator TosaInu's Avatar
    Join Date
    Jul 2002
    Posts
    12,326

    Default Re: Table Tag

    therother, seems that each cell is using = from a worksheet? I'm pretty sure that shouldn't be there (possibly only visible in the WYSIWYG editor).


    It's not perfect (adds a space between bl and a near end) but it should do in some cases.

    It's adding extra " with the smiley, I guess the textparser can be fixed for this.
    Ja mata

    TosaInu

  10. #10
    Urwendur Ûrîbêl Senior Member Mouzafphaerre's Avatar
    Join Date
    Nov 2003
    Location
    Mikligarðr
    Posts
    6,899

    Default Re: Table Tag

    -
    Thank you very much Tosa. I believe I can hack the autobreaking lines with my own tricks for now.
    -
    Ja mata Tosa Inu-sama, Hore Tore, Adrian II, Sigurd, Fragony

    Mouzafphaerre is known elsewhere as Urwendil/Urwendur/Kibilturg...
    .

  11. #11
    Urwendur Ûrîbêl Senior Member Mouzafphaerre's Avatar
    Join Date
    Nov 2003
    Location
    Mikligarðr
    Posts
    6,899

    Exclamation Re: Table Tag

    .
    We have a situation sir:
    Quote Originally Posted by The samnite
    ...it breaks without editing after one viewing. I tried again in the same thread for a new post.

    So a more detailed description:

    I start a new topic, use the table code {table 1 3 0} to start and {/table} to end. Used only 2 columns, and used 4^ to highlight some rows.

    I post the message, and it takes me to the post and the table looks fine. I either refresh the page or click on the topic again and the table code breaks. It looks like the exact code in the editor.

    If I edit again in standard mode and save changes in fixes it again. However it breaks once again after I refresh the page. I can continue this cycle forever it seems.
    Could it be related with the trouble with the code tag, as in both originating from the same glitch?
    .
    Ja mata Tosa Inu-sama, Hore Tore, Adrian II, Sigurd, Fragony

    Mouzafphaerre is known elsewhere as Urwendil/Urwendur/Kibilturg...
    .

  12. #12
    Research Fiend Technical Administrator Tetris Champion, Summer Games Champion, Snakeman Champion, Ms Pacman Champion therother's Avatar
    Join Date
    Feb 2004
    Location
    UK
    Posts
    2,640

    Default Re: Table Tag

    Hmm, I have a few tables around the forums, and bar the new Table code being a bit more fastiduous about spaces, it seems to work pretty much the same as the old one.

    Testing:


    Edit: Hmm, odd. Disappeared on refresh. Doesn't happen with my table here.
    Last edited by therother; 10-19-2005 at 13:35.
    Nullius addictus iurare in verba magistri -- Quintus Horatius Flaccus

    History is a pack of lies about events that never happened told by people who weren't there -- George Santayana

  13. #13
    Nur-ad-Din Forum Administrator TosaInu's Avatar
    Join Date
    Jul 2002
    Posts
    12,326

    Default Re: Table Tag

    Strange things.
    Ja mata

    TosaInu

  14. #14
    Nur-ad-Din Forum Administrator TosaInu's Avatar
    Join Date
    Jul 2002
    Posts
    12,326

    Default Re: Table Tag

    Ja mata

    TosaInu

  15. #15
    Nur-ad-Din Forum Administrator TosaInu's Avatar
    Join Date
    Jul 2002
    Posts
    12,326

    Default Re: Table Tag

    Quick-fixed.
    Ja mata

    TosaInu

  16. #16

    Default Re: Table Tag

    Quote Originally Posted by TosaInu
    bold
    You know that 7(squared) is 49? Not 47.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO