Advertisement:

Author Topic: BBCode Tables  (Read 1658 times)

Offline SMiFFER

  • Jr. Member
  • **
  • Posts: 391
BBCode Tables
« on: October 11, 2018, 04:12:13 AM »
Hey SMF-friends.

Waiting for the new 2.1 takes long so I puzzle a bit with mods and here... TABLES!

Is there such thing as DESCRIBED HERE for SMF?.

I find it particularly interesting that even colors and borders are showing in simple BBCode.

Any input on this?
QUOTE OF Aleksi "Lex" Kilpinen: "That version is old enough to go to school itself."

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,401
    • StoryBB/StoryBB on GitHub
Re: BBCode Tables
« Reply #1 on: October 11, 2018, 04:17:41 AM »
Not without a fairly large retooling of the existing table bbcode. Tables exist along with tr and to bbcode but there is a piece of code that tries to fix tags if it thinks they don’t line up correctly or have proper matching end tags.

This code blows up spectacularly every time anyone tried to change it to support nice tables.

I think someone did do a mod a while ago where it just bypassed the table tags entirely and had a new tag name so the existing sanitiser doesn’t see it.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline aegersz

  • SMF Hero
  • ******
  • Posts: 1,490
  • Gender: Male
  • "mods" junkie
    • dopetalk
Re: BBCode Tables
« Reply #2 on: October 12, 2018, 05:47:11 PM »
i use dougie's Custom BBCode Manager  to quickly create new BBCodes.

just follow the documentation in that link to create the new BBCode & HTML pairs whilst carefully noting how arguments (content) get parsed so you can choose the right format when running the mod.

i had to fix a couple of bugs so see the comments about the mod.
The configuration of my Linux VPS (SMF 2.0 with 145 mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum)

Offline aegersz

  • SMF Hero
  • ******
  • Posts: 1,490
  • Gender: Male
  • "mods" junkie
    • dopetalk
Re: BBCode Tables
« Reply #3 on: October 13, 2018, 03:06:23 AM »
here is one that i tried to knock up quickly but was troubled with automatic insertion of <a href="..." </a> tags so  i am stripping the "http://" for simplicity (can't figure out a better way)

[audio=mpeg]128.199.200.202/private/100115 Feisty v Rollins Q Ball Mix.mp3[/audio]

see the attachments for the config of this and the icon:
The configuration of my Linux VPS (SMF 2.0 with 145 mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum)

Offline aegersz

  • SMF Hero
  • ******
  • Posts: 1,490
  • Gender: Male
  • "mods" junkie
    • dopetalk
Re: BBCode Tables
« Reply #4 on: October 13, 2018, 03:53:39 AM »
the "th" BBCode doesn't come with SMF so you have to build it.

this just displays as is:

[th]{TEXT}[/th]

but this HTML does what you posted:

Code: [Select]
[html]<table class="bbc_table"><tr><td>[th]Name[/th]<br />[th]Age[/th]<br /></td></tr><tr><td>John</td><td>65</td></tr><tr><td>Gitte</td><td>40</td></tr><tr><td>Sussie</td><td>19</td></tr></table>
[/html]
The configuration of my Linux VPS (SMF 2.0 with 145 mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum)