Recommend
122 
 Thumb up
 Hide
25 Posts

BoardGameGeek» Forums » BoardGameGeek Related » BGG Help and How-To

Subject: How to make Tables rss

Your Tags: Add tags
Popular Tags: formatting [+] BGG:Forums [+] [View All]
Walt
United States
Orange County
California
flag msg tools
Before terraforming Mars, Surviving Mars is required: Paradox Interactive; Steam.
badge
Please contact me about board gaming in Orange County.
Avatar
mbmbmbmbmb
BGG Top Five Games


mb

mb

mb


mb


mb
Rating

8.200

8.185

8.182


8.169


8.061

Making tables has long been a problem on BGG. However, while the floatleft and floatright tags are usually used used to float pictures, they can float text, too. Probably, you want to QuickQuote this message to follow along. I have floatright'd the entire table on the right to get the header (bold) to center over the entire table. You want to float the columns on the left unless you want to put them into the code right to left. The first column is centered; the second isn't.

Numbers
1
2
3
4
5
Letters
A
B
C
D
E
Directions
North
South
East
West
Up
Amounts
$1
$20
$300
$4,000
$50,000
Notice that I had to manually break up Through the Ages: A Story of Civilization to keep it from making the table extremely wide, and put in blank rows in the other columns to keep everything aligned. Different vertical spacing is a problem, as things are not automatically put in rows. I may be fooling myself, but I think an explicit text size of 10 aligns the microbadges better. Possibly fixed font sizes could be found for the smaller picture sizes, but font size is limited to 24. Since each column is floated and stacked independently, you have to manually work out row alignment. In some cases, it may make sense to flip rows and columns.

As you can see, text will flow around multiple tables. The overarching floatleft on the left table is to keep it together when the browser is narrow. (Try adjusting the width of your browser window to see how the message re-flows--this is always a good idea with floats, as they can get very ugly if you change the window size.)

If I had wanted to align numbers of different lengths, I would have used the C code tags in the column, as in the Amounts column table to the left, When I need to get past the tables and get back to full width I use the clear tag.

So now all the floats are turned off, and I can start a new series of floats. (You'll only be able to see this if you go to full width on an 1920 wide monitor, or play around with cutting some of my text above, and previewing the result.)
  • [+] Dice rolls
Jim Cote
United States
Maine
flag msg tools
badge
Avatar
mbmbmbmbmb
This is awesome, but obviously way too much work for an average post by an average user. BGG should have some kind of table tag with attributes that creates the internal structure.
19 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Walt
United States
Orange County
California
flag msg tools
Before terraforming Mars, Surviving Mars is required: Paradox Interactive; Steam.
badge
Please contact me about board gaming in Orange County.
Avatar
mbmbmbmbmb
I don't disagree with the idea of a table tag, but I was intentionally pushing as hard as I had time for on the top table, to try to answer as many potential questions as possible. The bottom table is quite simple, and even simpler if you clear instead of surrounding it with floats so it can wrap. Even with that, the process is pretty simple.
Start Table
Next Column
End Table
[floatleft][floatleft]
[/floatleft][floatleft]
[/floatleft][/floatleft]
If you don't want wrap, [clear] at the bottom. Then take out line breaks except inside columns, like separating "Start Table" from "Next Column". Admittedly, this table looks very arcane because I'm putting escaped tags in it.
5 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Jim Cote
United States
Maine
flag msg tools
badge
Avatar
mbmbmbmbmb
How do you control vertical position?

S
ometimes books have a large first letter for chapters. This is a test block to show that feature. But I think the large letter is being vertically centered, rather than flush with the top of the following text. Can this be done? There are also hard-coded margins/padding for floating elements. Can this be controlled using parameters in the float tags? Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.
4 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Walt
United States
Orange County
California
flag msg tools
Before terraforming Mars, Surviving Mars is required: Paradox Interactive; Steam.
badge
Please contact me about board gaming in Orange County.
Avatar
mbmbmbmbmb
ekted wrote:
How do you control vertical position?

S
ometimes books have a large first letter for chapters. This is a test block to show that feature. But I think the large letter is being vertically centered, rather than flush with the top of the following text. Can this be done? There are also hard-coded margins/padding for floating elements. Can this be controlled using parameters in the float tags?
Not as far as I know. A picture might work better. Hm:
S

ometimes books have a large first letter for chapters. This is a test block to show that feature. But I think the large letter is being vertically centered, rather than flush with the top of the following text. Can this be done? There are also hard-coded margins/padding for floating elements. Can this be controlled using parameters in the float tags?" As you can see, I got the top of the text down, just by putting a return after the closing float. The space at the bottom is more difficult: even though it's a capital S, as text, it's set in space adequate for the descenders on letters like gjpq.

ut, a picture works a little better. This isn't really what floats are designed to do, and we're fortunate they can do a reasonable job on tables. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
7 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Steven Dennis
United States
Covington
Louisiana
flag msg tools
badge
Avatar
mbmbmbmbmb
Are these advanced, hidden tags documented anywhere? This is the first I've heard of the float tags being supported on BGG. Now I'm wondering what other tags may be hiding away that I might not know about.
4 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Walt
United States
Orange County
California
flag msg tools
Before terraforming Mars, Surviving Mars is required: Paradox Interactive; Steam.
badge
Please contact me about board gaming in Orange County.
Avatar
mbmbmbmbmb
Check other pinned topics in How To BGG. Or, if you want to do something specific, ask. Also, quote Grognads' posts, and if you see anything you don't understand, quote it to see the code. (Not always possible, I know!)
5 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Clay Blankenship
United States
Owens Cross Roads
AL
flag msg tools
designer
badge
That's a moray!
Avatar
mbmbmbmbmb
Man, I thought this was going to be a carpentry guide.
60 
 Thumb up
0.02
 tip
 Hide
  • [+] Dice rolls
Darrin Williams
United States
Allen
Texas
flag msg tools
I have overtext. Yes I do.
badge
I have overtext. How 'bout you !
Avatar
mbmbmbmbmb
DrChek wrote:
Are these advanced, hidden tags documented anywhere? This is the first I've heard of the float tags being supported on BGG. Now I'm wondering what other tags may be hiding away that I might not know about.

Blott usually keeps his lists updated with all the latest formatting tricks.

Tricks of the Geek
More Tricks of the Geek

The Floatleft and Floatright tags are only recently supported on BGG.

9 
 Thumb up
0.25
 tip
 Hide
  • [+] Dice rolls
Robert Wesley
Nepal
Aberdeen
Washington
flag msg tools
designer
badge
Avatar
mb
Let 'moi' KNOW when you wished to 'learn' how to 'make' 'dinette set' within this? robot
10 
 Thumb up
1.00
 tip
 Hide
  • [+] Dice rolls
Walt
United States
Orange County
California
flag msg tools
Before terraforming Mars, Surviving Mars is required: Paradox Interactive; Steam.
badge
Please contact me about board gaming in Orange County.
Avatar
mbmbmbmbmb
GROGnads wrote:
Let 'moi' KNOW when you wished to 'learn' how to 'make' 'dinette set' within this? robot
You know, Grogs, I don't think I've thanked you enough for all you've taught me about the hidden formatting codes on BGG. In addition to those immediately apparent, YELLOW and SMALL occur to moi. I can't imagine how much more you've got up your...um...tail? Tentacle? First word? Sounds like?
9 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Robert Wesley
Nepal
Aberdeen
Washington
flag msg tools
designer
badge
Avatar
mb
That 'posterior prehensile appendage' were an [AH]-logo bemedaled 'swatter' for 'bugs' or folks that's "acts'n some" for "it"! whistle
6 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Craig Somerton
Australia
North Ryde - Sydney
NSW
flag msg tools
designer
badge
I don't play to win - I play for enjoyment and social interaction.
Avatar
mbmbmbmbmb
ekted wrote:
This is awesome, but obviously way too much work for an average post by an average user. BGG should have some kind of table tag with attributes that creates the internal structure.

I have always been surprised that this site doesn't include some functions available in many "wiki" style scripts to produce tables using the '|' {pipe} symbol.

e.g.

|North West|North|North East|
|West|Here|East|
|South West|South|South East|

Becomes...

13 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Steven Dennis
United States
Covington
Louisiana
flag msg tools
badge
Avatar
mbmbmbmbmb
There is a whole table formatting standard that works on the BGG wiki pages already in place, see Wiki Formatting which should be implemented in the forum posts as well.

I brought up this issue four years ago.
6 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Walt
United States
Orange County
California
flag msg tools
Before terraforming Mars, Surviving Mars is required: Paradox Interactive; Steam.
badge
Please contact me about board gaming in Orange County.
Avatar
mbmbmbmbmb
Implementation of new stuff has to consider how it can break existing messages, unless someone wants to write the program to convert something like seven million posts. I personally find Wiki format codes crazy; I can never remember how many zillion apostrophes you need for bold and italic or how you drop or add just one or the other. What would really be nice is one standard WYSIWYG editor across the web--and a billion dollars, while I'm asking for the impossible.
11 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Lee Frank
United States
Bloomfield
New York
flag msg tools
Avatar
mbmbmbmbmb
Thanks for posting this!

L
2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Interests > Animals > Birds > National > Canada >
Sweden
flag msg tools
Help, I'm being held prisoner in an overtext typing facility! I don't have much time, they could find out at any m
badge
I'm that weirdo whose number of badges sold prior to yesterday Bail Organa is keeping track of
Avatar
mbmbmbmbmb
The BGG top 5 is all wrong!!
2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Herb
United States
Georgia
flag msg tools
mbmbmbmbmb
Table separates.
Here the table separates if you make the window narrow. Guess how you can prevent this?
Spoiler (click to reveal)
Use code tags to force a line length. See:Forum Formatting Example - The "Property" Tag Set

What
BGG Category
BGG Mechanic
RPG Category
VGG Genre
VGG Hardware Category
VGG Mode
VGG Rating
VGG Theme
Named tag set
boardgamecategory
boardgamemechanic
rpgcategory
videogamegenre
videogamehardwarecategory
videogamemode
videogamerating
videogametheme
Property markup
[property=1089][/property]
[property=2072][/property]
[property=2107][/property]
[property=2295][/property]
[property=2150][/property]
[property=2422][/property]
[property=2393][/property]
[property=2331][/property]
Result
Animals
Dice Rolling
Campaign Setting (game world)
Flight Simulator
Console
Local Multiplayer
SEGA: 18+
Space
4 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Walt
United States
Orange County
California
flag msg tools
Before terraforming Mars, Surviving Mars is required: Paradox Interactive; Steam.
badge
Please contact me about board gaming in Orange County.
Avatar
mbmbmbmbmb
Important safety tip!
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
rekinom
United States
New York
flag msg tools
Avatar
mbmbmbmbmb
If anyone uses PHP, here is some code that will turn Excel/CSV files into the BGG formatted tables described above. (With gratuitous concatenation so the code can be pasted here without rendering the bgg code.)

You have to paste from the view source to keep the linefeeds, or put the whole thing in an HTML textarea. Also, missing the obvious start and end php blocks that BGG keeps trying to strip out.


$csvfile = 'bgg_table.csv';
$fh = fopen($csvfile, 'r');
$column = fgetcsv($fh,1000);
while ( $thisline = fgetcsv($fh,1000) )
{
foreach($column as $key => $col)
{
$thisdata[strtolower($col)] = $thisline[$key];
}
if ($thisline[0]) $data[] = $thisdata;
}
fclose($fh);
echo "[" . "floatleft" . "]";
foreach ($column as $colkey => $colname)
{
echo "["."floatleft"."]["."center"."]["."u"."]$colname"
. "["."/u"."]["."/center"."]\n";
foreach ($data as $qcolumn => $qvalue)
echo $qvalue[strtolower($colname)] . "\n";
echo "["."/floatleft"."]";
}
echo "["."/floatleft"."]";
6 
 Thumb up
1.25
 tip
 Hide
  • [+] Dice rolls
Ira Fay
United States
New Haven
CT
flag msg tools
designer
:-)
badge
Fay Games logo
Avatar
mbmbmbmbmb
Does anyone here have advise on how to make this work:

https://boardgamegeek.com/geeklist/187319/analog-game-design...

The line wraps do strange things when the window resizes, and I'm not sure what's up.

the code is this, all on one line...
(floatleft)(user=cancer313)(/user)(geekurl=/thread/browse/boardgame/0?username=cancer313&forumname=sessions)(c) (/c)Sessions(/geekurl)(/floatleft)(floatleft)(user=Durkmenistan)(/user)(geekurl=/thread/browse/boardgame/0?username=Durkmenistan&forumname=sessions)(c) (/c)Sessions(/geekurl)(/floatleft)
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
rekinom
United States
New York
flag msg tools
Avatar
mbmbmbmbmb
ira212 wrote:
The line wraps do strange things when the window resizes, and I'm not sure what's up.
The problem is that not everything is the same height due to the newuser badges, so they start staggering. You could wait until the new user badges go away or try inserting this immediately after and within each (floatleft):
(floatright)(ImageID=1732649 small)(/floatright)

It's a transparent GIF that should make each floatleft the same height.

If you have someone who adds an avatar, uberbadge, designer badge, etc. to their account, this "small" image will no longer be big enough, but you could always download the original image, cut it to a better size, and reupload it.

2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Ira Fay
United States
New Haven
CT
flag msg tools
designer
:-)
badge
Fay Games logo
Avatar
mbmbmbmbmb
Awesome. Thank you!

Do you know when the New User badges go away? It's always nice when problems fix themselves...
2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
rekinom
United States
New York
flag msg tools
Avatar
mbmbmbmbmb
30 days from account creation, I believe.
3 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Ira Fay
United States
New Haven
CT
flag msg tools
designer
:-)
badge
Fay Games logo
Avatar
mbmbmbmbmb
Thank you!
2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls