Jump to content

Community

[Suggestion] Table BBCode


SuperBlob

Recommended Posts

(I still haven't bought my license yet, but this is a suggestion I thought was worth making beforehand.)

On my current, free message board software, there exists a BBCode for making inline Tables. The table title line draws its style from the category header CSS, the line that holds the titles for the individual columns draws its style from the 'Forums/Stats/Last Post Info' line from the forum listings, and the individual table cells draws its style from the forum listing itself, or even just from the regular post box. While I'm not saying you couldn't add a way to format the different column widths, the BBCode on the software I use adjusts the width of each column to fit accordingly with the other columns. For example, if there's one column where each row only has one letter, and another one where each row has a full sentence, it automatically shifts the majority of the width of the table over to the latter column to accommodate. So, for example, the basic code for a table might look like this:


So, in the above table, the table would automatically shift to the next row after 'Color' and 'Pink', because you specified that each row has only 3 cells in the original code, and it detects that you've added in 3 cells since the last linebreak.

I know for a fact that it can be done, because I've seen it done, it's just a matter of effort versus profit, I suppose. And you could even expand on it if you wanted to, by adding the option to custom skin tables on-the-spot if you wanted to, or something like that. It doesn't really matter to me, but I know other people might ask that, so throwing that in there now.

Anyway, I know that it's too big of a feature to add in any release of 3.0.x, but maybe something to think about for 3.1?

[table=# OF COLUMNS,TABLE TITLE]CELL 1 [c]CELL 2[c]CELL 3...[/table][/CODE]

In the above example, [c] represents New Cell, which ends the previous cell and starts the next one. By way of the '# of Columns' field, the BBCode can automatically shift info to the next line without you having to put any other type of tag except for [c] to separate cells. So, for example, the code for a table with 3 rows (including a category header row) and 3 columns about cabbage might look like this:


[CODE][table=3,Cabbage]Flavor[c]Place of Origin[c]Color[c]Chocolate[c]Argentina[c]Pink[c]Strawberry[c]Texas[c]Brown[/table]
Link to comment
Share on other sites

I realize this, but you can do that with a lot of the BBCodes you have pre-installed. I was talking about making it a standard BBCode. And plus, if it was developed by IPB and not as an add-on, it could potentially be a lot more useful and advanced.

Link to comment
Share on other sites

I see this as having a lot of potential problems. Don't get me wrong, I see benefits too, but the problems with trying to implement such a feature would be difficult, with trying to overcome potential risks to it messing up the appearance of the page being displayed.

Link to comment
Share on other sites

[quote name='SuperBlob' date='03 August 2009 - 09:08 PM' timestamp='1249348100' post='1837821']
I realize this, but you can do that with a lot of the BBCodes you have pre-installed. I was talking about making it a standard BBCode. And plus, if it was developed by IPB and not as an add-on, it could potentially be a lot more useful and advanced.

Technically, all bbcodes in IPB are now custom bbcodes. I can't see this being that useful to enough boards to actually make it part of the base product, it's best suited to be a mod.

Link to comment
Share on other sites

1) The internet is moving away from tables to format data. It's fine for tabular data, but that's not what most people tend to use it for (they use it for formatting). We wouldn't want to promote that, if you ask me. Though it's not a good enough reason to not include it really. ;)

2) I can see some user forgetting a closing tag, or adding an opening cell but no opening row (e.g. <table><td> without the <tr>). There's a lot of factors when you deal with so many users - I'm sure you understand how a table works, but the average user on a hobby site might not, and they'd find a way to break it.

3) There has to be a limit to what bbcodes we ship with. We can't include every bbcode (and for sure, this isn't the first request we've had to include a specific custom bbcode by default).

Link to comment
Share on other sites

Set up a custom bbcode and try this as the replacement:

<table cellspacing='0' cellpadding='0'><tr> <td>{option}</td> <td>{content}</td> </tr></table>

This will let you use (as an example):
[table=[b]Hello there!]How are you?[/table]

That will give you a left/right 1 row table. You can use whatever bbCode name you want though.






Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We use technologies, such as cookies, to customise content and advertising, to provide social media features and to analyse traffic to the site. We also share information about your use of our site with our trusted social media, advertising and analytics partners. See more about cookies and our Privacy Policy