Page 1 of 1

Tables feature

Posted: Fri Apr 24, 2015 1:55 pm
by sawhorse
I know it's possible to make tables in BB code, and it's easy with websites like this one:
http://www.teamopolis.com/tools/bbcode- ... rator.aspx

I can think of few types of forums that would benefit more from tables than this forum. I know there is the scrolling code ability, but it's not the same as a simple table.

Is there a reason the feature has been disabled?

Re: Tables feature

Posted: Sat May 02, 2015 1:02 pm
by LadyGeek
Hi,

It's not a matter of disabling a feature, it's a matter of enabling a lot of BBCodes to support a table.

We have limited resources for software support, so we keep as close to the "stock" version as possible.

Re: Tables feature

Posted: Wed May 13, 2015 1:38 pm
by sawhorse
Thanks for your response Lady Geek. I'm unfamiliar with the software side of things. Is it a matter of having to pay more to enable tables? Could you perhaps forego an "upgrade" (debatable term based on problems people have encountered with the new version) and use money to enable tables? It would really help to have the feature.

Re: Tables feature

Posted: Wed May 13, 2015 2:22 pm
by nordlead
sawhorse wrote:Thanks for your response Lady Geek. I'm unfamiliar with the software side of things. Is it a matter of having to pay more to enable tables? Could you perhaps forego an "upgrade" (debatable term based on problems people have encountered with the new version) and use money to enable tables? It would really help to have the feature.
phpBB is free. All they have to do is add table support and they would have it. On phpBB 3.0.X that meant creating custom BBCodes, I don't know about 3.1.x. When LadyGeek says "a lot" she means 3. One for Table, one for tr and one for td.

Basically, this website is free with no advertising. The people maintaining this website don't want to muck around with writing any extra software even if it is simple.

Re: Tables feature

Posted: Wed Mar 07, 2018 8:42 pm
by FiveK
LadyGeek wrote:
Wed Mar 07, 2018 4:37 pm
Thanks for trying, but remember that we also need to support the software. Allowing members to arrange their own HTML elements means that someone will get the order wrong (or leave out an element). With no further internal checks, the page will be incorrectly rendered in your browser.

For example, putting [/table] in the wrong spot will result in the entire thread being stuffed into a table. There's nothing we can do except edit the post causing the error. That's more work for the moderators, and frustration for the members who don't understand what's wrong.

For this reason, I don't think adding tables via BBCode will be helpful.

If you want to discuss further, feel free to bump Tables feature.
Above is from a recent question, "...any chance of adding the Table BBCode?"

If the phpBB® Forum Software truly has the "feature" that an incorrect [/table] entry can wreak havoc on an entire thread, then reluctance to allow that possibility is more than understandable.

Other forum software, e.g., Simple Machines® table, does not have that problem. The table feature is very helpful when posting financial info.

Do we know for sure that phpBB® still has this problem, or might it have been resolved so enabling the table feature would indeed be viable?

Re: Tables feature

Posted: Wed Mar 07, 2018 9:08 pm
by LadyGeek
Let me look into this a bit more to be sure. There's still no guarantee the BBCodes will be enabled, but I want to make sure what I think can happen, will.

Give me some time, as I'm running on a generator due to the latest Nor'easter storm. Nothing will be done until I'm on solid power and have time to work on it. (This has nothing to do with the server. It's fine.)

Re: Tables feature

Posted: Fri Mar 09, 2018 1:57 pm
by pondering
Do we allow svg graphics in line?

Re: Tables feature

Posted: Fri Mar 09, 2018 2:00 pm
by pondering
A couple of options are described here: https://stackoverflow.com/questions/698 ... ble-in-svg

Re: Tables feature

Posted: Fri Mar 09, 2018 8:59 pm
by LadyGeek
OK, I did a quick test. My concern about a corrupted page resulting from incorrect tag usage did not appear, but it was not an exhaustive test.

The forum software is not amenable to these BBCodes, as extra spaces are not displayed. The generated HTML is correct, but I suspect the style sheets are consuming the spaces. Long story short, it's not going to work - we're not modifying the style.

The example table is 2 rows x 4 columns. Column 3 is nothing but spaces.

Code: Select all

[TABLE]
[TR]
   [TD]Row 1 Col 1[/TD] [TD]Row 1 Col 2[/TD] [TD]         [/TD] [TD]Row 1 Col 4[/TD]
[/TR]
[TR]
   [TD]Row 2 Col 1[/TD] [TD]Row 2 Col 2[/TD] [TD]          [/TD] [TD]Row 2 Col 4[/TD]
[/TR]
[/TABLE]

[TABLE]
[TR]
   [TD]Stock ticker[/TD] [TD]Shares [/TD] [TD]         [/TD] [TD]Total[/TD]
[/TR]
[TR]
   [TD]ABC[/TD] [TD]100[/TD] [TD]          [/TD] [TD]$152.44[/TD]
[/TR]
[/TABLE]
Produced an unusable table:

Row 1 Col 1 Row 1 Col 2 Row 1 Col 4
Row 2 Col 1 Row 2 Col 2 Row 2 Col 4
Stock ticker Shares Total
ABC 100 $152.44

Quote this post and you'll see the Column 3 spaces in the post editing box - but not in the displayed post.

Using Chrome Inspect, the rendered HTML:

Code: Select all

<div class="content"><table>
<tbody><tr>
   <td>Row 1 Col 1</td> <td>Row 1 Col 2</td> <td>         </td> <td>Row 1 Col 4</td>
</tr>
<tr>
   <td>Row 2 Col 1</td> <td>Row 2 Col 2</td> <td>          </td> <td>Row 2 Col 4</td>
</tr>
</tbody></table>

<table>
<tbody><tr>
   <td>Stock ticker</td> <td>Shares </td> <td>         </td> <td>Total</td>
</tr>
<tr>
   <td>ABC</td> <td>100</td> <td>          </td> <td>$152.44</td>
</tr>
</tbody></table></div>

Re: Tables feature

Posted: Fri Mar 09, 2018 10:23 pm
by FiveK
LadyGeek wrote:
Fri Mar 09, 2018 8:59 pm
The generated HTML is correct, but I suspect the style sheets are consuming the spaces. Long story short, it's not going to work - we're not modifying the style.
That's too bad - thanks for trying.

If I understand correctly, it is the forum's chosen "style" that strips multiple spaces from all posts - correct?

And that stripping is hardcoded in the style? And there is no user setting (e.g., extra_space_strip=no) that is provided?

If so, well, if that's the worst thing to discover today, it's not so bad....

Re: Tables feature

Posted: Sat Mar 10, 2018 12:04 am
by pondering
This is a link to an svg table:

https://www.dropbox.com/s/oxbx81a4k4vxl ... e.svg?dl=0

This is the svg inline:

<?xml version='1.0' standalone='no'?>
<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN'
'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'>
<svg width='100%' height='100%' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'>

<title>SVG Table</title>

<g id='columnGroup'>
<rect x='65' y='10' width='75' height='110' fill='gainsboro'/>
<rect x='265' y='10' width='75' height='110' fill='gainsboro'/>

<text x='30' y='30' font-size='18px' font-weight='bold' fill='crimson'>
<tspan x='30' dy='1.5em'>Q1</tspan>
<tspan x='30' dy='1em'>Q2</tspan>
<tspan x='30' dy='1em'>Q3</tspan>
<tspan x='30' dy='1em'>Q4</tspan>
</text>

<text x='100' y='30' font-size='18px' text-anchor='middle'>
<tspan x='100' font-weight='bold' fill='crimson'>Sales</tspan>
<tspan x='100' dy='1.5em'>$ 223</tspan>
<tspan x='100' dy='1em'>$ 183</tspan>
<tspan x='100' dy='1em'>$ 277</tspan>
<tspan x='100' dy='1em'>$ 402</tspan>
</text>

<text x='200' y='30' font-size='18px' text-anchor='middle'>
<tspan x='200' font-weight='bold' fill='crimson'>Expenses</tspan>
<tspan x='200' dy='1.5em'>$ 195</tspan>
<tspan x='200' dy='1em'>$ 70</tspan>
<tspan x='200' dy='1em'>$ 88</tspan>
<tspan x='200' dy='1em'>$ 133</tspan>
</text>

<text x='300' y='30' font-size='18px' text-anchor='middle'>
<tspan x='300' font-weight='bold' fill='crimson'>Net</tspan>
<tspan x='300' dy='1.5em'>$ 28</tspan>
<tspan x='300' dy='1em'>$ 113</tspan>
<tspan x='300' dy='1em'>$ 189</tspan>
<tspan x='300' dy='1em'>$ 269</tspan>
</text>
</g>
</svg>

Re: Tables feature

Posted: Sat Mar 10, 2018 11:21 am
by LadyGeek
FiveK wrote:
Fri Mar 09, 2018 10:23 pm
LadyGeek wrote:
Fri Mar 09, 2018 8:59 pm
The generated HTML is correct, but I suspect the style sheets are consuming the spaces. Long story short, it's not going to work - we're not modifying the style.
That's too bad - thanks for trying.

If I understand correctly, it is the forum's chosen "style" that strips multiple spaces from all posts - correct?

And that stripping is hardcoded in the style? And there is no user setting (e.g., extra_space_strip=no) that is provided?

If so, well, if that's the worst thing to discover today, it's not so bad....
I actually found the root cause of the problem. There is no problem at all. In fact, it's intended behavior. Wait, what? The forum software does not interpret the HTML - your browser does. Since phpBB (the forum software) prevents HTML interpretation, it's up to your browser to do the interpretation. So... extra spaces won't be displayed - and is the correct way to render an HTML document.

Here's a deep-dive explanation: Re: Don't delete spaces (Apr 12, 2008) My testing duplicated this perfectly.

Re: Tables feature

Posted: Sat Mar 10, 2018 3:49 pm
by FiveK
LadyGeek wrote:
Sat Mar 10, 2018 11:21 am
So... extra spaces won't be displayed - and is the correct way to render an HTML document.

Here's a deep-dive explanation: Re: Don't delete spaces (Apr 12, 2008) My testing duplicated this perfectly.
Interesting, thanks.

Apparently the folks at Simple Machines have figured a way around this. E.g.,

Code: Select all

[table][tr][td]word1[/td][td]             [/td][td]word3[/td][/tr][/table]

word1                word3
displays as
Image

Also,
[table]
[tr][td]R1C1[/td][td]R1C2[/td][td]R1C3[/td][/tr]
[tr][td]R2C1[/td][td][/td][td]R2C3[/td][/tr]
[tr][td]R3C1[/td][td]R3C2[/td][td]R3C3[/td][/tr]
[/table]
displays as
Image

Don't know enough about the folks at phpBB to judge whether they would
- be offended by comparison with another forum hosting group, or
- see it as a challenge - i.e., "anything they can do, we can do better"...?

Re: Tables feature

Posted: Sun Mar 11, 2018 2:33 pm
by LadyGeek
^^^ I'm sure other forum software can do HTML interpretation, but phpBB was chosen by the site owners a long time ago. We'll stick with it.

As for a developer "challenge", the post I referenced is from 2008 - 10 years ago. Given that phpBB is the world's largest open source bulletin board software, I would think there's a very good reason HTML interpretation has not been implemented. Security is the first thing that comes to mind, but that's just a guess.
pondering wrote:
Fri Mar 09, 2018 1:57 pm
Do we allow svg graphics in line?
pondering wrote:
Fri Mar 09, 2018 2:00 pm
A couple of options are described here: https://stackoverflow.com/questions/698 ... ble-in-svg
pondering wrote:
Sat Mar 10, 2018 12:04 am
This is a link to an svg table:

https://www.dropbox.com/s/oxbx81a4k4vxl ... e.svg?dl=0
After some checking, SVG files are not supported by phpBB ("buggy"). I also tried a few things, but nothing seemed to worked.

It's not due to dropbox, as I found a way to display dropbox files in phpBB (change the "dl=0" parameter to "raw=1"). It works for a PNG file, but not SVG.

Re: Tables feature

Posted: Sun Mar 11, 2018 11:19 pm
by FiveK
LadyGeek wrote:
Sun Mar 11, 2018 2:33 pm
^^^ I'm sure other forum software can do HTML interpretation, but phpBB was chosen by the site owners a long time ago. We'll stick with it.

As for a developer "challenge", the post I referenced is from 2008 - 10 years ago. Given that phpBB is the world's largest open source bulletin board software, I would think there's a very good reason HTML interpretation has not been implemented. Security is the first thing that comes to mind, but that's just a guess.
Heh, yeah, I suppose you probably get "suggestions" from time to time about changing the whole forum software. This isn't of one those. :)

No idea whether HTML interpretation or any other particular approach is being used by Simple Machines - not my area of expertise.

There are many references to implementing tables in phpBB. Unfortunately, "table" is a common word, so many search hits aren't relevant.

Some recent relevant threads:
phpBB • phpBB and BBCode table tags.
phpBB • 3.2 BBCode for tables?
phpBB • Table BBCode broken after upgrade to 3.2.1

And yes, things always appear easier when someone else would have to implement them.... ;)

Re: Tables feature

Posted: Mon Mar 12, 2018 6:29 am
by pondering
This bulletin board implemented svg:

http://www.inkscapeforum.com/viewtopic.php?t=792

Is it worth finding out how they did it, and if it would be applicable here?

The underlying source code is as follows:

<img src="http://www.microugly.com/images/scraps/smiles.svg" alt="SVG Image" />

The Usage is [svg]http://svg_url[/svg].

Re: Tables feature

Posted: Mon Mar 12, 2018 3:19 pm
by LadyGeek
No, it's not worth investigating. Note the comment that says "browser support will vary..." which confirms that SVG is not fully supported. The listed BBCode is one I've already tried and discarded.
FiveK wrote:
Sun Mar 11, 2018 11:19 pm
There are many references to implementing tables in phpBB. Unfortunately, "table" is a common word, so many search hits aren't relevant.
Thanks. I saw those references as well.

At this point, I'd say that tables won't be supported any time soon.

Re: Tables feature

Posted: Mon Mar 12, 2018 3:34 pm
by FiveK
LadyGeek wrote:
Mon Mar 12, 2018 3:19 pm
FiveK wrote:
Sun Mar 11, 2018 11:19 pm
There are many references to implementing tables in phpBB. Unfortunately, "table" is a common word, so many search hits aren't relevant.
Thanks. I saw those references as well.
At this point, I'd say that tables won't be supported any time soon.
Fair enough - thanks for considering.

It would be a "nice to have" feature, so if you are ever looking for something to do...but obviously the forum has prospered despite its absence. :beer

Re: Tables feature

Posted: Wed Mar 14, 2018 2:00 pm
by Peculiar_Investor
Even the use of simple BBCodes can cause problems with a post, particularly when the user has to manually enter them. There are almost daily examples of members using the [quote] BBCode without properly closing it with [/quote].

Tables are far more complex and I would expect users would often want to cut-and-paste table data from other sources.

Using another part of the Bogleheads website as an example, as a wiki editor, I can say that creating/editing/updating table is one of the more challenging parts of editing an article. It is somewhat time consuming to ensure a wiki table is properly displayed, it takes editing then previewing, then sometimes making a correction, repeat, then Submit.

I agree it could be useful to improve the layout of some posts. But with apologies to all those who like the forum software to support a tables feature, be careful what you wish for.

Footnote to the reader. I changed the Options of this post and checked Disable BBCode so the [quote] [/quote] codes are displayed.

Re: Tables feature

Posted: Wed Mar 14, 2018 2:28 pm
by pondering
By the way, the excel2wiki JavaScript greatly simplifies getting tabular text into wiki format.

Re: Tables feature

Posted: Wed Mar 14, 2018 2:52 pm
by FiveK
pondering wrote:
Wed Mar 14, 2018 2:28 pm
By the way, the excel2wiki JavaScript greatly simplifies getting tabular text into wiki format.
Is that this: excel2wiki | Excel xls to wiki copy and paste converter for Wikipedia and Mediawiki?

Re: Tables feature

Posted: Wed Mar 14, 2018 3:59 pm
by LadyGeek
Thanks! We were using an alternative site (a mirror of excel2wiki.net) because the original converter was no longer supported.

I didn't know the tool has been resurrected. The wiki has been updated: Help:Table - Bogleheads (Create tables from a spreadsheet)

Source: Wikimedia Toolforge, which has an extensive list of tools.

Re: Tables feature

Posted: Wed Mar 14, 2018 5:02 pm
by pondering
You can find the code for this page here:

https://github.com/sdouglas/excel2wiki

in case you don't want to transmit your data to the internet.

You do need to be running a php web server.

I use the bitnami mediawiki stack for this on my work laptop and desktop at home.

Re: Tables feature

Posted: Wed Mar 14, 2018 5:23 pm
by telemark
Peculiar_Investor wrote:
Wed Mar 14, 2018 2:00 pm
Even the use of simple BBCodes can cause problems with a post, particularly when the user has to manually enter them. There are almost daily examples of members using the [quote] BBCode without properly closing it with [/quote].

Tables are far more complex and I would expect users would often want to cut-and-paste table data from other sources.

Using another part of the Bogleheads website as an example, as a wiki editor, I can say that creating/editing/updating table is one of the more challenging parts of editing an article. It is somewhat time consuming to ensure a wiki table is properly displayed, it takes editing then previewing, then sometimes making a correction, repeat, then Submit.

I agree it could be useful to improve the layout of some posts. But with apologies to all those who like the forum software to support a tables feature, be careful what you wish for.

Footnote to the reader. I changed the Options of this post and checked Disable BBCode so the [quote] [/quote] codes are displayed.
Some versions of markdown support tables, with a format that looks like this

Code: Select all

Date | 1 mo | 3 mo | 6 mo | 1 yr | 2 yr | 3 yr | 5 yr | 7 yr | 10 yr | 20 yr | 30 yr
---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ----- | ----- | -----
03/01/18 | 1.50 | 1.63 | 1.85 | 2.05 | 2.22 | 2.36 | 2.58 | 2.74 | 2.81 | 2.97 | 3.09
I would prefer that to messing around with [tr] [td] [th] tags. As long as we're wishing, that is :)

Re: Tables feature

Posted: Wed Mar 14, 2018 5:34 pm
by Peculiar_Investor
telemark wrote:
Wed Mar 14, 2018 5:23 pm
Peculiar_Investor wrote:
Wed Mar 14, 2018 2:00 pm
Even the use of simple BBCodes can cause problems with a post ...
... As long as we're wishing, that is :)
Your post quoted mine. Compare it with what I posted and see the problems? I rest my case.

Re: Tables feature

Posted: Wed Mar 14, 2018 5:35 pm
by telemark
Peculiar_Investor wrote:
Wed Mar 14, 2018 5:34 pm
telemark wrote:
Wed Mar 14, 2018 5:23 pm
Peculiar_Investor wrote:
Wed Mar 14, 2018 2:00 pm
Even the use of simple BBCodes can cause problems with a post ...
... As long as we're wishing, that is :)
Your post quoted mine. Compare it with what I posted and see the problems? I rest my case.
Fixed now :D

Re: Tables feature

Posted: Wed Mar 14, 2018 5:42 pm
by FiveK
Peculiar_Investor wrote:
Wed Mar 14, 2018 5:34 pm
Your post quoted mine. Compare it with what I posted and see the problems? I rest my case.
Ok, you got me. I see no differences at all between the original text in
viewtopic.php?p=3829405#p3829405
vs. the quoted text in
viewtopic.php?p=3829768#p3829768.

What did I miss?

Re: Tables feature

Posted: Wed Mar 14, 2018 5:47 pm
by telemark
FiveK wrote:
Wed Mar 14, 2018 5:42 pm
Peculiar_Investor wrote:
Wed Mar 14, 2018 5:34 pm
Your post quoted mine. Compare it with what I posted and see the problems? I rest my case.
Ok, you got me. I see no differences at all between the original text in
viewtopic.php?p=3829405#p3829405
vs. the quoted text in
viewtopic.php?p=3829768#p3829768.

What did I miss?
You missed the brief period when the [quote] and [/quote] tags were messed up, in exactly the manner described, until I went back and edited my post.