Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

BBCode tables

JibstaMan

Towns Guard
Xy$
0.00
I could use some help creating tables for on the forum. I've tried everything I can.

This is what I think it should look like:

Code:
[table]
[tr]
    [th][/th]
    [th][/th]
    [th][/th]
[/tr]
[tr]
    [td][/td]
    [td][/td]
    [td][/td]
[/tr]
[/table]
I've tried it with the tags upper-cased and without enters and spaced between the tags. When I've done that, no code is visible, but also no table.

The documentation isn't very helpful. Tried finding XenForo's table BBCode stuff and found this, example doesn't work either.

This is a header cellThis is a header cell
[TR1][TD]This is a left aligned cell[/TD][TD1]This is a centre aligned cell[/TD1][/TR1][TR2][TD2]This is a right aligned cell[/TD2][TD]Left aligned[/TD][/TR2][TR1][TD1]Centre aligned[/TD1][TD2]Right aligned[/TD2][/TR1]

What am I doing wrong? Or might it be a problem with the forums?
 

LTN Games

Master Mind
Resource Team
Xy$
0.01
Yup, you're right, nothing works, I tried everything as well. I did a bit of reading about it and I don't think the table BBCode comes packed with Xenforo forum software. Luckily I found a few plugins for it, I'll tag @Xyphien so he sees this, and I'm sure there won't be a problem adding this to the community, should be useful for many of the members. Thank you for letting us know (cheeky)

Table BBcode Plugins
CTA Table BB Codes (free)
Brivium Advanced Table BB Code ( paid)
Datatables BB Code by Waindigo ( paid)
 

Amysaurus

Digital Artist
Staff member
Resource Team
I, uh, can't exactly think of what we'd need tables for, but, if it's something you'd like, I'm sure it can be added. :)
 

Macro

Pantologist
Xy$
0.00
I'm almost hesitant about adding plugins since a friend of mine says more plugins = more security holes (that's what I heard anyway).

Personally I'd just make them in Excel/Calc and screendrop it. In my opinion, it seems like a chore doing all those codes in a forum post when it can be done so easily another way.

In wikis, yea, I can see it being useful to have tables though, maybe...
 

LTN Games

Master Mind
Resource Team
Xy$
0.01
@Macro with any other forum software I would have to say this is true, but Xenforo was literally built for security, and is well known for this reason. I could only assume plugins made for it have to reach a certain standard before being allows to be sold and hosted on Xenforo's website. Though your idea of making a table within Excel or free spreadsheet software then sharing a screenshot sounds much easier than playing with BBcode to get what you want and is probably what I would use over the table BBcode. So that being said It does no harm adding it into the forum, but it raises the question of how many people would use it? I guess we can wait to see if more people would like this feature or not before proceeding. Either way I'm happy lol
 

Amysaurus

Digital Artist
Staff member
Resource Team
Yeah, I'm with you two, lol. Seeing the code for it, and considering I still mess up the list codes frequently, using Excel or a screenshot looks like less effort, tbh. xD

We'll see, though~ (cat)
 

JibstaMan

Towns Guard
Xy$
0.00
Tables can be hard indeed. Long ago, I even made a program that would generate tables for you, to remove much of the hassle :D.

The table I've made is easy enough, with two columns. However, using Excel removes the site styling, so I'd prefer the hassle of building the table in BBCodes for quality sake.

The use case is mostly in code documentation, where you have key value pairs. Consider plugin configuration for example, where you might like to use tables for each parameter that can be set for the plugin. The table would have tree columns: parameter name, description, default value. I'm using it for a tutorial.

Anyhow, I guess strictly speaking, nobody has had the need for them, because I'm the first to stumble upon the problem.
 

Amysaurus

Digital Artist
Staff member
Resource Team
I was wondering if it'd be helpful with plugins - that makes sense to me. *grabs a megaphone* Thoughts, plugin-creators???? It could potentially be useful for people setting up shop threads for pricing, etc. as well. It's more a matter of how many people will use it. (smile)
 

Xyphien

Owner
Staff member
Administrator
Resource Team
Xy$
9.57
Hello and thank you for the suggestion. I've added the table to the forums, and it seems that it isn't currently functional with this release. I tried several different things and I cannot seem to get it to work. I'll continue to try out the free one, and once we get enough funds if the free one doesn't work I'll invest in one of the paid ones :)
 

JibstaMan

Towns Guard
Xy$
0.00
Thanks for looking into this, it's greatly appreciated. If the free options aren't working, I'd be willing to donate $10 bucks to show my support. I can only imagine the headache these things can bring when things don't work as advertised.

I've just posted a regex tutorial in which I would have used the tables. Already, I can spot typos and other improvements... images aren't great for quickly making changes. (wink)
 

JibstaMan

Towns Guard
Xy$
0.00
Another problem with images is you can't tell if someone is using Light or Dark theme.
Yeah. I tried working with a transparent background, but since the font color changes drastically, that's just not doable. There's no telling what other themes will be available in the future, so you have to set colors for readability over compatibility with the themes. Also, it will probably not work optimal for small devices (I made the table not very wide with this in mind). So there are a lot of things to consider.
 

LTN Games

Master Mind
Resource Team
Xy$
0.01
[ LTN Games cats Ressurection spell ]. I believe it's a good idea to see what can be done about this BBcode for tables, now that we have @HotfireLegend as the web dev for the theme, it may be wise to do this in conjunction with the new theme.
 
Before doing anything, I will just throw in a mention - when you create a bbcode or html table, this will probably throw off the responsive format of the topic in question in the mobile view, as bbcode tables are not (by default and by their very nature) responsive. The cell size isn't very adjustable on the fly, particularly in regards to content.
 

LTN Games

Master Mind
Resource Team
Xy$
0.01
Hmm interesting, I don't like when layout responsiveness breaks, it's almost not worth adding then. Do you know of any other options for creating tables or something similar and still be able to keep responsiveness intact?
 

JibstaMan

Towns Guard
Xy$
0.00
It's true that making tables responsive can be rather daunting. But it all depends on the use-case.

My use-case is a two-column table, where some of the text in the second column is quite long. This makes the table automatically fill the width of the post as well as make the first column as short as possible.

This example is created by adding the table into the forum using Chrome DevTools. I did change the border color from black to #777, for visibility.

The responsiveness is broken when you try to add an excessive amount of columns in the table.

Notice the horizontal scrollbar.


On mobile, I believe the table won't be visible entirely, but can be scrolled horizontal without scrolling the rest of the content. Haven't tested this though.

Do you know of any other options for creating tables or something similar and still be able to keep responsiveness intact?
I'm mostly curious about the alternatives, since I can't think of anything that's as maintainable as BBCode tables, unless it's off-site (external link), which is obviously not preferred.

So, what I'm saying is, tables are responsive-ish, if you keep the data in them simple. This does beg the question, with such a limited use-case, is it worthwhile?
 
Top