BBCode Tables

Started by SMiFFER, October 11, 2018, 04:12:13 AM

Previous topic - Next topic

SMiFFER

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 the day: A troll is an obstinate bloke who only hungers for your attention. If you feed him, he will puke all over you!

Arantor

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.

aegersz

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 160+ 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). My (House) music DJ dedication page is here

aegersz

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 160+ 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). My (House) music DJ dedication page is here

aegersz

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:

[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 160+ 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). My (House) music DJ dedication page is here

Advertisement: