Page 1 of 1

How to Post Bridge Hands

Posted: 06 Apr 2020, 07:36
by rod
When you compose or edit a posting here you'll see some buttons above the data entry area. Two of these are "block" and "hand". Clicking either of these generates a snippet of text (called "bbcode") with the cursor positioned in the middle of it where you can enter some data. It works just as well to type or paste in the bbcode instead of using the buttons.

For the "hand" bbcode you type in the cards for spades, hearts, diamonds and clubs, with commas between the suits; for example "J10987,KQ432,--,AQ8". So the snippet becomes:

Code: Select all

[hand]J10987,KQ432,--,AQ8[/hand]
When your post is previewed or submitted you'll see the resulting hand like this:

♠ J10987
KQ432
--
♣ AQ8

The "block" bbcode is useful for putting things side-by-side when each of those things has multiple lines in it. For example you can click the "block" button and enter a few lines of text, and then position the cursor after the ending "]" and click "block" again and enter some more lines of text, like this:

Code: Select all

[block]Mary had
a little
lamb.[/block][block]Its fleece
was white
as snow.[/block]
The result of that will be:

Mary had
a little
lamb.
Its fleece
was white
as snow.


More interesting though is that you can put hands inside of blocks. Here's an example where you are showing two hands with a bidding sequence:

Code: Select all

[block][hand]J10987,KQ432,--,AQ8[/hand]

1S
3D
6S
[/block][block][hand]KQ52,A9,5432,K65[/hand]

2NT
3H
Pass
[/block]
Giving:

♠ J10987
KQ432
--
♣ AQ8

1S
3D
6S
♠ KQ52
A9
5432
♣ K65

2NT
3H
Pass


Finally, an example of using blocks (some of them empty) and hands to show a full deal:

Code: Select all

[block][/block][block][hand]A6,J108,AKQJ,J1097[/hand][/block]
[block][hand]J10987,KQ432,--,AQ8[/hand][/block][block][/block][block][hand]KQ52,A9,5432,K65[/hand][/block]
[block][/block][block][hand]43,765,109876,432[/hand][/block]
♠ A6
J108
AKQJ
♣ J1097

♠ J10987
KQ432
--
♣ AQ8
♠ KQ52
A9
5432
♣ K65

♠ 43
765
109876
♣ 432

Text for Suit Symbols

Posted: 27 Apr 2020, 10:21
by rod
By the way if all you want is a suit symbol (as in "West led the K against 4♠"), you can copy-and-paste from one of these lines.

Code: Select all

♠
[color=red]♥[/color]
[color=red]♦[/color]
♣

New! Handviewer Support

Posted: 04 Jul 2024, 17:31
by rod
I have added a "hview" button to the post editor, as another way of showing hands, deals, bidding and card play. BBO and the Bridge Winners site also use this. For details mouse over the button when creating or editing your post. Documentation of the parameters can be found here:

https://www.bridgebase.com/tools/hvdoc.html

See this to easily generate the parameter string for a deal:

http://bridge-hand-player.appspot.com/

When you have finished creating the deal with this tool, choose to generate "Bridge Winners Embed Code". Then you can copy and paste just the string of parameters that describes the deal; that would be the text inside the curly braces excluding the word "handviewer".

So for example if the Bridge Winners embed code is "{handviewer s=sakqhakqdakqcakqj&w=s432h432d432c5432&d=w&a=3hpp}" then the text for your posting here is "[hview=262,262]s=sakqhakqdakqcakqj&w=s432h432d432c5432&d=w&a=3hpp[/hview]". The result of that is: