Page 1 of 3

Questions re "HOW TO ADD TABLES"

Posted: December 5th, 2016, 8:57 am
by Gengulphus
The instructions in this announcement (http://www.lemonfool.co.uk/viewtopic.php?f=21&t=1262) say "But simply, add new rows with L= and new columns by using a & between values". Does the word "simply" imply that there are in fact more options?

In particular:

* Is there any way to tell it that a column is to be centred, right-aligned or decimal-point-aligned? Right-aligned or decimal-point-aligned are really wanted for financial tables such as portfolio listings...

* Is there any way to tell it to make a column narrower - e.g. only as wide as is needed for the widest item in it plus a small margin on either side? The combination of too-wide columns, centred row 1 headings and left-aligned row 2+ items that you get by default is particularly nasty - headings can end up a long way to the right of the columns they're supposed to be heading...

* Is there any way to alter the background colours or the fault text colours used in the table? Experiment shows that the 'Font colour' tags can be applied to individual items in the table, but not to entire rows or the entire table (so one could change the text colour of every item, but it would be exceptionally tedious), but I've not yet found a way to change the very ugly (IMHO!) orange background used for the heading row. I'm not too keen on the white-on-darkish-grey style used for the main table either...

I've had a look around the phpBB site for any documentation about the tabela tags to try to answer these questions myself, but failed to find it if it is present... Feel free to answer with a link to such documentation if this is quicker/easier than typing in answers to the above questions.

Gengulphus

Re:How to add tables

Posted: December 5th, 2016, 9:18 am
by Fatrav
?????
Could we have that in English please for the less computer savvy amongst us?

Ta

Fat(sorry for being stupid)Rav

Re: Re:How to add tables

Posted: December 5th, 2016, 10:11 am
by Gengulphus
Fatrav wrote:Could we have that in English please for the less computer savvy amongst us?


I'm groping in the dark a bit about what your problem is - i.e. it would help people answer your question if you identified the bits you don't understand rather than just producing a generalised complaint that it's not English... Anyway, to try to give you some sort of answer, look at the example stooz gave:

Code: Select all

[table]
L=STATISTIC&VALUE&STATISTIC&VALUE
L=Number of posts:&11473&Posts per day:&373.79
L=Number of topics:&1163&Topics per day:&37.89
L=Number of users:&1810&Users per day:&58.97
[/table]


It starts and ends with "table" and "/table" in square brackets - these are the table'tags' that tell the software you're entering a table between them. You don't need to remember them - if you look just above a message input box, you'll see a row of buttons, the rightmost of which is currently "table". Click on that, and you'll get a matched pair of the tags inserted into your message where you're currently inputting stuff, with the cursor positioned so that any further text you type goes between them.

Looking at the text between them, each line starts with "L=", and the separate items on each line are separated by "&". Those basically tell the software "start a new table row here" and "move on to the next item on the same row here", and the software removes them and instead does what they tell it to. You do need to remember them to use the facility effectively.

If it's still unclear, compare stooz's example above with what it actually produces and hopefully it will become clearer:

[table]L=STATISTIC&VALUE&STATISTIC&VALUE
L=Number of posts:&11473&Posts per day:&373.79
L=Number of topics:&1163&Topics per day:&37.89
L=Number of users:&1810&Users per day:&58.97[/table]

The one other point I would add is that if you use this facility, always click on "Preview" and check you've got what you want before submitting the post - it's the sort of thing that is easy to get wrong! And it's not the only such thing: another example is if you're replying to one part of a long post and use the " button at its top right to quote it in your reply, but edit that quote down to the part you're replying to, always use "Preview": delete one character too many and you can thoroughly mess up the quoting!

Hope this helps.

Gengulphus

Re: Re:How to add tables

Posted: December 5th, 2016, 10:15 am
by Meatyfool
It would be useful if someone could knock up a macro to generate this format in Excel.

Can the delimiter in a CSV be altered in Excel (ie replace , with &. A macro could be written to embed an "L=" to the beginning of the line.

Meatyfool..

Re: Re:How to add tables

Posted: December 5th, 2016, 10:29 am
by kiloran
Meatyfool wrote:It would be useful if someone could knock up a macro to generate this format in Excel.

Can the delimiter in a CSV be altered in Excel (ie replace , with &. A macro could be written to embed an "L=" to the beginning of the line.

Meatyfool..

OK, I can take a hint ;)

--kiloran

Re: Questions re "HOW TO ADD TABLES"

Posted: December 5th, 2016, 10:40 am
by paulnumbers
Sorry I can't answer your question directly. Just checking, have you considered uploading a picture of your table to http://imgur.com/ and pasting that in? Perhaps that is not "fit for purpose" for you, but thought I'd offer it up as a suggestion.

Image

Re: Questions re "HOW TO ADD TABLES"

Posted: December 5th, 2016, 11:09 am
by Gengulphus
paulnumbers wrote:Sorry I can't answer your question directly. Just checking, have you considered uploading a picture of your table to http://imgur.com/ and pasting that in? Perhaps that is not "fit for purpose" for you, but thought I'd offer it up as a suggestion.


Good point, and no, I'd failed to consider that option - my thought processes haven't moved on properly from TMF's 'only a link to an image can be posted, not the image itself' set-up... It's not an ideal solution, as one cannot e.g. cut-and-paste figures from the table efficiently, but it might be the best available. Thanks for pointing it out!

Or alternatively, tabela might have the facilities available that would make it a better solution - so I'm still after answers to my questions! And I'll add one more: can one 'escape' ampersands into table items in some way? It's convenient to use them in company names, especially when they appear in lists - e.g. "Aviva, Legal & General and Standard Life" looks better and is more readable than "Aviva, Legal and General and Standard Life". That reason probably doesn't come up much in tables, but it's helpful to be able to be consistent between tables and non-table parts of a post, and in addition being as narrow as possible is sometimes at a premium in a table.

Gengulphus

Re: Questions re "HOW TO ADD TABLES"

Posted: December 5th, 2016, 11:39 am
by uspaul666
Just FYI. Looks like tabela is a customisation for this site. The only table facilities are "L=" and "&" and alignment cannot be adjusted but that may come I guess. For this site, it might make more sense for columns to line up on the right by default. Alternatively, looks like the code could detect column values with only 0-9,.-£$ in them and make just those right-aligned...hint.hint.

Re: Re:How to add tables

Posted: December 5th, 2016, 12:03 pm
by mc2fool
kiloran wrote:OK, I can take a hint ;)

Personally I don't think you should bother 'cos, as G has pointed out, the tabela mechanism seems to have a lot of shortcomings, and they can be overcome by simply using the existing table-to-TMF mechanism with [Code] tags. So, if you're going to do anything I'd suggest just modifying that to change "pre" to "code" :)

Re: Questions re "HOW TO ADD TABLES"

Posted: December 5th, 2016, 2:01 pm
by Gengulphus
uspaul666 wrote:Just FYI. Looks like tabela is a customisation for this site. The only table facilities are "L=" and "&" and alignment cannot be adjusted but that may come I guess. For this site, it might make more sense for columns to line up on the right by default. Alternatively, looks like the code could detect column values with only 0-9,.-£$ in them and make just those right-aligned...hint.hint.


Could I ask how you've worked out that it's a customisation and that those are the only facilities in it? I wouldn't be averse to putting in a bit of thought about how the facility could be improved and maybe make some suggestions, but I need to understand where it needs to slot into the software...

Gengulphus

Re: Re:How to add tables

Posted: December 5th, 2016, 3:22 pm
by kiloran
mc2fool wrote:
kiloran wrote:OK, I can take a hint ;)

Personally I don't think you should bother 'cos, as G has pointed out, the tabela mechanism seems to have a lot of shortcomings, and they can be overcome by simply using the existing table-to-TMF mechanism with [Code] tags. So, if you're going to do anything I'd suggest just modifying that to change "pre" to "code" :)

It's not really a great deal of bother since I already have the core structure in place at: http://lemonfoolfinancialsoftware.weebl ... ormat.html
This has already been modified to have the code tags (instead of the <pre> tags used by TMF)

I'll add a tool for tabela then the user has the choice, and if tabela is improved in future, then so much the better

--kiloran

Re: Re:How to add tables

Posted: December 5th, 2016, 6:09 pm
by mc2fool
kiloran wrote:It's not really a great deal of bother since I already have the core structure in place at: http://lemonfoolfinancialsoftware.weebl ... ormat.html
This has already been modified to have the code tags (instead of the <pre> tags used by TMF)

I might have guessed and should have looked first! 8-) I see your Excel tool has been Lemonised (?!) too, which reminds me to put it on my todo list to do mine as well (I took yours yonks ago, modified it to skip hidden cells, and sunk it into my spreadsheets....)

Re: Re:How to add tables

Posted: December 5th, 2016, 7:58 pm
by kiloran
Meatyfool wrote:It would be useful if someone could knock up a macro to generate this format in Excel.
Meatyfool..

Try this for size: viewtopic.php?f=27&t=1318

--kiloran

Re: Questions re "HOW TO ADD TABLES"

Posted: December 5th, 2016, 8:26 pm
by uspaul666
I was able to determine, to some extent, how the table thing worked, by selecting "view source" in the browser when on the preview post page.

Re: Re:How to add tables

Posted: December 5th, 2016, 8:48 pm
by stooz
For reference, I have renamed the bb code as TABLE not tabela. Apologies. I thought it would clash with an internal word for table, but it doesn't

Re: Re:How to add tables

Posted: December 5th, 2016, 8:51 pm
by stooz
kiloran wrote:It's not really a great deal of bother since I already have the core structure in place at: http://lemonfoolfinancialsoftware.weebl ... ormat.html
--kiloran


That's a great site Kiloran, I didn't know that existed. I will add it as a link from here if that's ok with you.

Re: Re:How to add tables

Posted: December 5th, 2016, 8:56 pm
by kiloran
stooz wrote:
kiloran wrote:It's not really a great deal of bother since I already have the core structure in place at: http://lemonfoolfinancialsoftware.weebl ... ormat.html
--kiloran

That's a great site Kiloran, I didn't know that existed. I will add it as a link from here if that's ok with you.

No problem Stooz, I'm sure Itsallaguess won't object.... it's a joint venture

Hmmm..... tabela becomes table..... guess I need to edit the code.
--kiloran

Re: Re:How to add tables

Posted: December 5th, 2016, 9:26 pm
by stooz
Sorry ! :D

Re: Re:How to add tables

Posted: December 5th, 2016, 10:34 pm
by Instep
stooz wrote:For reference, I have renamed the bb code as TABLE not tabela. Apologies. I thought it would clash with an internal word for table, but it doesn't

Hi stooz.
You seem to have broken all the demonstration tabelas including your report http://www.lemonfool.co.uk/viewtopic.php?f=21&t=1261 for the first month. Is it possible to leave tabela as an alias for table, without showing it on the editing menu?

Instep

Re: Re:How to add tables

Posted: December 5th, 2016, 10:53 pm
by stooz
I don't mind editing posts if you want to PM me any particular ones.