Bitcoin Forum

Other => Meta => Topic started by: jackg on January 17, 2020, 10:13:04 PM



Title: Are table borders a thing and if not can they be?
Post by: jackg on January 17, 2020, 10:13:04 PM
I'm looking at my lightning thread's tables and it looks like it'll be hard to work out the transaction definitions for the most recent one, is there a way borders can be implemented or are they already implementd and just not on the top display?

Just maybe as
Code:
[border_table] or [table][border][tr]...


Title: Re: Are table borders a thing and if not can they be?
Post by: suchmoon on January 17, 2020, 10:15:38 PM
The short answer is no. If you want a long answer - do you have an example of what you want to display?

Edit - assuming it's this post: https://bitcointalk.org/index.php?topic=5217699.msg53633870#msg53633870

You could just put the stuff into a spreadsheet (Excel, Google Sheets, whatever), format it how you want it, take a screenshot, and post it as an image.

There are some things you can do in bbcode with background colors and fixed-width fonts but it's a bit of a pain to maintain:

   Alice’s input 1 btc in       →     Alice’s output 1BTC back to her address      
   Bob’s input 0.75 btc in       →     Bob’s output 0.75BTC sent back to his address


Title: Re: Are table borders a thing and if not can they be?
Post by: UserU on January 18, 2020, 01:27:00 AM
I reckon this is a site-wide implementation and the forum code hasn't been updated yet to accomodate it.


Title: Re: Are table borders a thing and if not can they be?
Post by: jackg on January 18, 2020, 02:04:05 AM
~

Thanks, I've never come across pre (https://www.w3schools.com/tags/tag_pre.asp) before...

This really feels like something taht could be implemented much more easily, I don't like using photos either as if people like using zoom, a larger font size or reading mode (or if they're using a CLI browser) then the image would be unviewable and may get in the way.

and yeah @User, bbcode is meant to be a bit like html the way that assembly language is to machine code/binary so it would be easy to add - i guess it just hasn't been put in the translator yet either by theymos or smf.


Title: Re: Are table borders a thing and if not can they be?
Post by: tranthidung on January 18, 2020, 03:16:21 AM
Could you take a look at it and help me, if you have time, please.
I got trouble with the table format, width and tried to apply what you did with pre-block but it seems my table is badly formated.
https://bitcointalk.org/index.php?topic=5207066.msg53634910#msg53634910


Title: Re: Are table borders a thing and if not can they be?
Post by: jackg on January 18, 2020, 04:36:36 AM
I made everything glow, such is the wizzard though:
(this deosn't work it might help though if anyone wants to make it work)


AuthorsLinkDescriptionsANN threadsStatus

Vod and BPIP teamLink (https://bpip.org/)BPIP (the first site provides forum data)initial one (https://bitcointalk.org/index.php?topic=4746201.0); current one (https://bitcointalk.org/index.php?topic=5213618.0)Upgrading
ForumLink (https://bitcointalk.org/index.php?action=stats)Statistics centern/aPartially disabled


https://www.w3schools.com/tags/tag_pre.asp


Title: Re: Are table borders a thing and if not can they be?
Post by: Jawhead999 on January 18, 2020, 07:10:36 AM
@tranthidung
Does its look better? I create it by myself and using the pre tag. So, its look a bit smaller than the basic font.
But for mix the glow and table its bit hard, i tried many time but it still didn't work. Its only work glowing for font only, not fit the table
Example :

 | Authors |    
 | Vod and BPIP team  |   

Edit :
I think to make glow tag to fit the fixed width is should not using table, and have a lot of time to fixing manually by typing space button
  | Authors            |   
  | Vod and BPIP team  |  

 | Authors
 | Link
 | Descriptions
 | ANN threads
 | Status
 | 
 | --------------------- 
 | -------- 
 | ------------------------------------------------ 
 | ------------------------------ 
 | ------------------------
 | 
 | Vod and BPIP team 
 | Link (https://bpip.org/) 
 | BPIP (the first site provides forum data) 
 | initial one (https://bitcointalk.org/index.php?topic=4746201.0); current one (https://bitcointalk.org/index.php?topic=5213618.0)
 | Upgrading
 | 
 | Forum
 | Link (https://bitcointalk.org/index.php?action=stats)
 | Statistics center
 | n/a
 | Partially disabled
 | 

Code:
[center][table]

[tr]
[td] [pre] | [b]Authors[/b][/td]
[td] [pre] | [b]Link[/b][/td]
[td] [pre] | [b]Descriptions[/b][/td]
[td] [pre] | [b]ANN threads[/b][/td]
[td] [pre] | [b]Status[/b][/td]
[td] [pre] | [/td]
[/tr]

[tr]
[td][pre] | --------------------- [/td]
[td][pre] | -------- [/td]
[td][pre] | ------------------------------------------------ [/td]
[td][pre] | ------------------------------ [/td]
[td][pre] | ------------------------[/td]
[td][pre] | [/td]
[/tr]

[tr]
[td][pre] | Vod and BPIP team [/td]
[td][pre] | [url=https://bpip.org/]Link[/url] [/td]
[td][pre] | BPIP (the first site provides forum data) [/td]
[td][pre] | [url=https://bitcointalk.org/index.php?topic=4746201.0]initial one[/url]; [url=https://bitcointalk.org/index.php?topic=5213618.0]current one[/url][/td]
[td][pre] | Upgrading[/td]
[td][pre] | [/td]
[/tr]

[tr]
[td][pre] | Forum[/td]
[td][pre] | [url=https://bitcointalk.org/index.php?action=stats]Link[/url][/td]
[td][pre] | Statistics center[/td]
[td][pre] | n/a[/td]
[td][pre] | Partially disabled[/td]
[td][pre] | [/td]
[/tr]

[/table]
[/center]



Title: Re: Are table borders a thing and if not can they be?
Post by: tranthidung on January 18, 2020, 10:27:04 AM
   | Authors
   | Link
   | Descriptions
   | ANN threads
   | Status
   | 
   | Forum
   | Link (https://bitcointalk.org/index.php?action=stats)
   | Statistics center
   | n/a
   | Partially disabled
   | 
   | Vod and BPIP team 
   | Link (https://bpip.org/) 
   | BPIP (the first site provides forum data) 
   | initial one (https://bitcointalk.org/index.php?topic=4746201.0); current one (https://bitcointalk.org/index.php?topic=5213618.0)
   | Upgrading
   | 

This part is unnecessary, but I don't know why there are significant space between two lines.

At least, the format does not cause the problem here: https://bitcointalk.org/index.php?topic=5207066.msg53511397#msg53511397
Nevertheless, the bbcode above still need to be adjusted.


Title: Re: Are table borders a thing and if not can they be?
Post by: LoyceV on January 18, 2020, 10:51:14 AM
I use a combination of horizontal lines ([ hr]) and vertical lines (|). The latter must fill each cell in an entire column:
Sun May 12 12:00:02 UTC 2019 (forum time)

|Altcoin|Price|Value|
|0.98450454 GBYTE (https://coinmarketcap.com/currencies/byteball/)|0.00706236 BTC|0.00695292 BTC|
|58.50783037 PIVX (https://coinmarketcap.com/currencies/pivx/)|0.00008319 BTC|0.00486726 BTC|
|11465.51724138 SC (https://coinmarketcap.com/currencies/siacoin/)|0.00000040 BTC|0.00458620 BTC|
|212.23404255 XRP (https://coinmarketcap.com/currencies/ripple/)|0.00004366 BTC|0.00926613 BTC|
|56.46348000 NANO (https://coinmarketcap.com/currencies/nano/)|0.00022480 BTC|0.01269299 BTC|
|3.63636000 NEO (https://coinmarketcap.com/currencies/neo/)|0.00131000 BTC|0.00476363 BTC|
|79.73019000 WAN (https://coinmarketcap.com/currencies/wanchain/)|0.00004730 BTC|0.00377123 BTC|
|83.63362106 NMC (https://coinmarketcap.com/currencies/namecoin/)|0.00006534 BTC|0.00546462 BTC|
|2446.07843137 DGB (https://coinmarketcap.com/currencies/digibyte/)|0.00000152 BTC|0.00371803 BTC|
|0.67222271 XMR (https://coinmarketcap.com/currencies/monero/)|0.01062001 BTC|0.00713901 BTC|
|Total||0.06322202 BTC|

But it's not very user friendly to edit. I got the idea from Overview of Bitcointalk Signature-Ad Campaigns (https://bitcointalk.org/index.php?topic=615953.msg6815569#msg6815569).

I have a bigger example (https://bitcointalk.org/index.php?topic=1995297.msg20472027#msg20472027) too, but I used a script to create that one.


Title: Re: Are table borders a thing and if not can they be?
Post by: tranthidung on January 18, 2020, 10:57:03 AM
Thanks Loyce.

The format here (https://bitcointalk.org/index.php?topic=5207066.msg53272671#msg53272671) (suggested by SFR10) looks more user-friendly, but it has only one problems with the width of first column (https://bitcointalk.org/index.php?topic=5207066.msg53511397#msg53511397). SFR10 did not know why, because for the second column, it does not show that issue.

His solution:
Found a quick solution [for now]:
  • Use the following code in-between [instead of using spaces] each word...
Code:
[color=transparent].[/color]
The format of suchmoon is too complicated to edit, as he emphasized, I am not going to that one. For your format, if I can not find solution for SFR10's format, I am going to use yours.  :D


Title: Re: Are table borders a thing and if not can they be?
Post by: LoyceV on January 18, 2020, 11:01:10 AM
but it has only one problems with the width of first column (https://bitcointalk.org/index.php?topic=5207066.msg53511397#msg53511397).
It looks like a bug in SMF: it works fine if you preview the post, but gets messed up when you actually post it. I've noticed it before, and it's annoying to deal with.


Title: Re: Are table borders a thing and if not can they be?
Post by: hosseinimr93 on January 18, 2020, 11:31:04 AM
The format here (https://bitcointalk.org/index.php?topic=5207066.msg53272671#msg53272671) (suggested by SFR10) looks more user-friendly, but it has only one problems with the width of first column (https://bitcointalk.org/index.php?topic=5207066.msg53511397#msg53511397). SFR10 did not know why, because for the second column, it does not show that issue.

I use underline (___) instead of [ hr].

For example that code should be like this

Code:
[tr]
[td]__________________[/td]
[td]_____[/td]
[td]_________________________________[/td]
[td]______________________[/td]
[td]______________[/td]
[/tr]

The result will be as follows

AuthorsLinkDescriptionsANN threadsStatus
____________________________________________________________________________________________
Vod and BPIP teamLink (https://bpip.org/)BPIP (the first site provides forum data)initial one (https://bitcointalk.org/index.php?topic=4746201.0); current one (https://bitcointalk.org/index.php?topic=5213618.0)Upgrading
ForumLink (https://bitcointalk.org/index.php?action=stats)Statistics centern/aPartially disabled



Title: Re: Are table borders a thing and if not can they be?
Post by: suchmoon on January 18, 2020, 11:44:04 AM
but it has only one problems with the width of first column (https://bitcointalk.org/index.php?topic=5207066.msg53511397#msg53511397).
It looks like a bug in SMF: it works fine if you preview the post, but gets messed up when you actually post it. I've noticed it before, and it's annoying to deal with.

It's a bug in CSS (SMF or forum's customization, not sure):

https://bitcointalk.org/Themes/custom1/style.css

Code:
/* prevent gap between post icon and subject */
div#bodyarea table.bordercolor td td td.td_headerandpost td:first-child
{
width: 26px;
}

If the intent was as stated in the comment then the icon cell should have been given a CSS class instead of using a complicated and obviously broken selector.


Title: Re: Are table borders a thing and if not can they be?
Post by: tranthidung on January 18, 2020, 11:45:00 AM
I use underline (___) instead of [ hr]
I often use the underline too but the problem is with SMF-bug and the format given by SFR10 (he said we don't have to manually adjust width of column by typing ____. Anyway, thank you.


Title: Re: Are table borders a thing and if not can they be?
Post by: TryNinja on January 18, 2020, 11:50:14 AM
Would people be interested in an online tool that makes tables (for BitcoinTalk) in a visual and more user-friendly way?


Title: Re: Are table borders a thing and if not can they be?
Post by: TheBeardedBaby on January 18, 2020, 03:32:23 PM
Would people be interested in an online tool that makes tables (for BitcoinTalk) in a visual and more user-friendly way?

There was something similar before - WYSIWYG BBcode editor, which i used a lot but the project was discontinued. Anything that will make my life easier is welcome :)


Title: Re: Are table borders a thing and if not can they be?
Post by: TryNinja on January 18, 2020, 03:54:04 PM
There was something similar before - WYSIWYG BBcode editor, which i used a lot but the project was discontinued. Anything that will make my life easier is welcome :)
I remember this, but they weren’t specially focused on Bitcointalk. I can try doing something when I come back from travel in ~2 weeks.


Title: Re: Are table borders a thing and if not can they be?
Post by: pugman on January 18, 2020, 09:20:25 PM
Would people be interested in an online tool that makes tables (for BitcoinTalk) in a visual and more user-friendly way?
Like a table generator, say something like this: https://www.teamopolis.com/tools/bbcode-table-generator.aspx? Or the design aspect of how the table looks like, aesthetically,using some sort of a script perhaps?


Title: Re: Are table borders a thing and if not can they be?
Post by: Mitchell on January 18, 2020, 09:47:20 PM
But it's not very user friendly to edit. I got the idea from Overview of Bitcointalk Signature-Ad Campaigns (https://bitcointalk.org/index.php?topic=615953.msg6815569#msg6815569).
I've used it in my group buys as well and it does become a hassle to deal with if the table gets too big. :P


Title: Re: Are table borders a thing and if not can they be?
Post by: Timelord2067 on January 19, 2020, 12:10:26 AM
You could create a three by three table and the outside cells are black with a full stop and the center cell holds the data.




.ABCDEFGHIJKLMNOPQRSTUVWXYZ.
.
Your data goes here
.
.ABCDEFGHIJKLMNOPQRSTUVWXYZ.





Code:
[table][tr][td][glow=black,1].[/glow][/td][td][glow=black,1]ABCDEFGHIJKLMNOPQRSTUVWXYZ[/glow][/td][td][glow=black,1].[/glow][/td][/tr]

[tr][td][glow=black,1].[/glow][/td][td][center]Your data goes here[/center][/td][td][glow=black,1].[/glow][/td][/tr]

[tr][td][glow=black,1].[/glow][/td][td][glow=black,1]ABCDEFGHIJKLMNOPQRSTUVWXYZ[/glow][/td][td][glow=black,1].[/glow][/td][/tr]

[/table]


Regards,

*edit* Not sure why the left column has gone haywire...


Title: Re: Are table borders a thing and if not can they be?
Post by: hosseinimr93 on January 19, 2020, 12:54:02 AM
*edit* Not sure why the left column has gone haywire...
It seems to be a bug. For testing that, I quoted your post. Everything is fine in preview page. But when you post it, it's not like what was shown in the preview page.
There are some bugs in creating tables that were mentioned above by LoyceV and tranthidung.


Title: Re: Are table borders a thing and if not can they be?
Post by: TryNinja on January 19, 2020, 10:22:16 AM
Like a table generator, say something like this: https://www.teamopolis.com/tools/bbcode-table-generator.aspx? Or the design aspect of how the table looks like, aesthetically,using some sort of a script perhaps?
I was thinking about something like this website. You make/edit the table as you see it and the page gives you the BBcode to make it work on BitcoinTalk.


Title: Re: Are table borders a thing and if not can they be?
Post by: theymos on January 19, 2020, 07:24:34 PM
It wouldn't be that difficult to add to the bbcode parser, but it might be a good opportunity to also fix the first-column bug. Maybe:
 - A border attribute would be added to the [table] tag. If you have it set, even to 0, then the first-column bug is fixed for your table (by adding/removing a CSS class)
 - Existing tables without a border specified would function exactly the same as now, for backwards-compatibility.

I'll do it if someone comes up with the ideal HTML+CSS which the table tag should produce, for all three cases: [table], [table border=0], and [table border=1]. You can't remove that problematic CSS rule without addressing the fact that it's actually supposed to do something (not sure off-hand what...), and that the behavior of old [table] tags need to remain identical for backward-compatibility. So you should either work around that CSS rule or figure out exactly what it's supposed to do and fix it to be more selective while also maintaining the old behavior on old [table]s.


Title: Re: Are table borders a thing and if not can they be?
Post by: suchmoon on January 19, 2020, 09:32:02 PM
It wouldn't be that difficult to add to the bbcode parser, but it might be a good opportunity to also fix the first-column bug. Maybe:
 - A border attribute would be added to the [table] tag. If you have it set, even to 0, then the first-column bug is fixed for your table (by adding/removing a CSS class)
 - Existing tables without a border specified would function exactly the same as now, for backwards-compatibility.

I'll do it if someone comes up with the ideal HTML+CSS which the table tag should produce, for all three cases: [table], [table border=0], and [table border=1]. You can't remove that problematic CSS rule without addressing the fact that it's actually supposed to do something (not sure off-hand what...), and that the behavior of old [table] tags need to remain identical for backward-compatibility. So you should either work around that CSS rule or figure out exactly what it's supposed to do and fix it to be more selective while also maintaining the old behavior on old [table]s.

The buggy rule appears to be targeting this:

https://meem.link/i/a/q4ZkaJ.jpg
Edited 2020-11-30 to fix a broken image

But someone forgot the "cascading" part of "CSS" and it now applies to post content as well.

For your suggested fix to work you would need:

  • No CSS class on the tables without the border attribute - the old rule would still apply then.
  • "table-new-style" class on tables with border attribute (any value), and the following CSS:
    • div#bodyarea div.post table.table-new-style > tbody > tr > td:first-child { width: auto; }
  • Additional "table-with-border" class on tables with border=1, and the following CSS:
    • div#bodyarea div.post table.table-with-border { border-spacing: 0px; border-collapse: collapse; }
    • div#bodyarea div.post table.table-with-border > tbody > tr > td { padding: 2px; border: 1px #555 solid; /* or whatever border spec you want to apply */ }

I would prefer an option to specify custom border colors but that gets a bit more complicated.

Here is an example of the suggested CSS on jackg's post: https://bitcointalk.org/index.php?topic=5217699.msg53633870#msg53633870

https://meem.link/i/a/KlPsVR.jpg
Edited 2020-11-30 to fix a broken image


Title: Re: Are table borders a thing and if not can they be?
Post by: Timelord2o67 on January 20, 2020, 12:07:31 AM
If @theymos is still reading this thread can he also consider adding the bbcode for countdowns which I mentioned in the bbcode thread   Instructions on how to use BBCode (https://bitcointalk.org/index.php?topic=4738016.msg52581428#msg52581428) started by xtraelv please?