Tables

Do you have troubles using the forums? Do you know what could be improved? Just create a topic in this forum.

Tables

Unread postby NewLine » Sun Sep 14, 2014 11:58 am

Tables can be very useful for posting recipes. Does this bb support them?
NewLine
 
Posts: 19
Joined: Thu Aug 14, 2014 7:12 pm
Model: 20 litres

Re: Tables

Unread postby niels » Mon Sep 15, 2014 10:11 am

NewLine wrote:Tables can be very useful for posting recipes. Does this bb support them?

It doesn't look like it is supported by default, but I'll probably be able to add it using some add-on.

Any examples of forums that support it? And how the tables are created/added to the post?

- Niels
User avatar
niels
Site Admin
 
Posts: 1058
Joined: Mon Dec 02, 2013 8:08 pm
Location: Belgium
Model: 50 litres

Re: Tables

Unread postby NewLine » Mon Sep 15, 2014 5:31 pm

I don't care much about the syntax, but e.g. you can have a look at:

http://www.vlaamshobbybrouwforum.be/forum/viewtopic.php?f=86&t=2979#p57283

It would be nice if the output of my brew software could also output tables for this forum.

For now the stuff below just renders as plain ASCII, but on the above bb renders a table:





Gegevenwaarde
Maischwater [l]23
Spoelwater [l]5
Verdamping koken [l/hr]1.8
Eindvolume in ketel [l]20
NewLine
 
Posts: 19
Joined: Thu Aug 14, 2014 7:12 pm
Model: 20 litres

Re: Tables

Unread postby rocketman » Mon Sep 15, 2014 7:15 pm

I have written a small webapp where you can upload a recipe in beerxml (export from beersmith) and then generate bbcode, html, markdown and pdf if anyone would be interested I could put up a public test instance...
User avatar
rocketman
 
Posts: 125
Joined: Sun Apr 27, 2014 8:18 pm
Location: Sweden
Model: 20 litres

Re: Tables

Unread postby niels » Mon Sep 22, 2014 1:41 pm

rocketman wrote:I have written a small webapp where you can upload a recipe in beerxml (export from beersmith) and then generate bbcode, html, markdown and pdf if anyone would be interested I could put up a public test instance...

Feel free to share it! Maybe we can integrate it in the forum...

- Niels
User avatar
niels
Site Admin
 
Posts: 1058
Joined: Mon Dec 02, 2013 8:08 pm
Location: Belgium
Model: 50 litres

Re: Tables

Unread postby rocketman » Mon Sep 22, 2014 1:47 pm

niels wrote:
rocketman wrote:I have written a small webapp where you can upload a recipe in beerxml (export from beersmith) and then generate bbcode, html, markdown and pdf if anyone would be interested I could put up a public test instance...

Feel free to share it! Maybe we can integrate it in the forum...

- Niels


I'll clean it up and post for you guys to test..
User avatar
rocketman
 
Posts: 125
Joined: Sun Apr 27, 2014 8:18 pm
Location: Sweden
Model: 20 litres

Re: Tables

Unread postby niels » Mon Sep 22, 2014 6:18 pm

Ok, I added custom BBCodes which add table support. The syntax is very basic:

Code: Select all
Required basic elements:
[table][/table] or [table={STYLE}][/table] => Adds a table element with optional style attribute
[tr][/tr] or [tr={STYLE}][/tr] => Adds a row element with optional style attribute
[td][/td] or [td={STYLE}][/td] => Adds a cell element with optional style attribute

Optional elements:
[th][/th] or [th={STYLE}][/th] => Adds a header cell element with optional style attribute
[thead][/thead] or [thead={STYLE}][/thead] => Adds a table head element with optional style attribute
[tfoot][/tfoot] or [tfoot={STYLE}][/tfoot] => Adds a table head element with optional style attribute


There is one pitfall: All carriage returns after a BBCode are translated in a line break by the editor. I'm still figuring out how to fix this. To avoid this, post the code without carriage returns between BBCodes.

The example of NewLine without the carriage returns:
Gegevenwaarde
Maischwater [l]23
Spoelwater [l]5
Verdamping koken [l/hr]1.8
Eindvolume in ketel [l]20


NOTE: I didn't test it thoroughly, so expect some hiccups... Let me know and I'll fix them. Also: additional syntax can be added on request.

Enjoy! :beer:
- Niels
User avatar
niels
Site Admin
 
Posts: 1058
Joined: Mon Dec 02, 2013 8:08 pm
Location: Belgium
Model: 50 litres

Re: Tables

Unread postby BrauTim » Mon Sep 22, 2014 7:48 pm

Looking good, thanks for the work Neils & Rocketman 8)
To brew or not to brew, that would be a stupid question !
User avatar
BrauTim
 
Posts: 595
Joined: Sun Feb 02, 2014 1:03 pm
Location: England
Model: 50 litres

Re: Tables

Unread postby niels » Mon Sep 22, 2014 8:03 pm

And I posted a first recipe using the syntax: viewtopic.php?f=9&t=513

Conclusion: 1/ I need a tool to generate the BBCode. 2/ I need to add support for colspan/rowspan!

But now I want to enjoy a Rochefort 8, so I have some yeasties for Sunday ;)

- Niels
User avatar
niels
Site Admin
 
Posts: 1058
Joined: Mon Dec 02, 2013 8:08 pm
Location: Belgium
Model: 50 litres

Re: Tables

Unread postby NewLine » Tue Sep 23, 2014 7:39 am

Great work! I will try (tonight or so), if I can make a "braumeisters.net" output format for my Brew software.
Maybe I can also share the software on this forum if anyone would be interested.
NewLine
 
Posts: 19
Joined: Thu Aug 14, 2014 7:12 pm
Model: 20 litres

Re: Tables

Unread postby niels » Tue Sep 23, 2014 4:30 pm

NewLine wrote:Great work! I will try (tonight or so), if I can make a "braumeisters.net" output format for my Brew software.
Maybe I can also share the software on this forum if anyone would be interested.

I will try to fix the carriage returns problem on the server. This way you don't need to alter your software.

Feel free to create a YABS topic and I'll make a sticky of it.

- Niels
User avatar
niels
Site Admin
 
Posts: 1058
Joined: Mon Dec 02, 2013 8:08 pm
Location: Belgium
Model: 50 litres

Re: Tables

Unread postby NewLine » Sat Sep 27, 2014 8:48 am

I just made some simple changes to remove the CRs, got it working now :cheers: (still need to remove some dutch before publishing)

Yet another Yabs based recipe
(www.homebrew.be/Yabs)


Algemeen:
Gegevenwaarde
ReceptnaamHopkind
Gewenst begin SG / Pt1.053 / 13.1
Gewenste bitterheid [IBU]19
Berekende kleur [EBC]17
Maisch efficiency78
Kooktijd75


Volumes:
Gegevenwaarde
Maischwater [l]23.8
Spoelwater [l]4
Verdamping koken [l/hr]2
Eindvolume in ketel [l]20


Mouten en suikers:
Naamgram% stortEBC
Pilsmout 3335670.63
Tarwemout licht 3105122.13
Cara-Munich3477.3120


Hop:
Naamgram% stort% alphakooktijd [min]Type
Tettnanger (A)54.63.9FWHbellen
Hallertau Hersbrücker (A)65.63.4FWHbellen
Tettnanger (A)14143.930bellen
Hallertau Hersbrücker (A)1615.93.430bellen
Tettnanger (A)29283.95bellen
Hallertau Hersbrücker (A)3231.93.45bellen


Maisch schema:
RusttijdTempBeschrijving
055Inmaisch Temperatuur
4563step1
2072step2


Gist:
Gistnaam : 1388 Belgian Strong Ale
Gisteigenschappen : Fruitig aroma en palet droog zurige afdronk / Duvel.


Andere toevoegingen:
Koriander 4g, toeveogen op 70min koken
NewLine
 
Posts: 19
Joined: Thu Aug 14, 2014 7:12 pm
Model: 20 litres

Re: Tables

Unread postby niels » Sat Sep 27, 2014 12:14 pm

Awesome! I've spend some time figuring out how to remove the line breaks before parsing the BBCodes, but somehow the regular expression doesn't work as soon as I integrate it with the phpBB code :(

I hope to get this working, though... It increases the readability in the editor when there are line breaks in the table code.

- Niels
User avatar
niels
Site Admin
 
Posts: 1058
Joined: Mon Dec 02, 2013 8:08 pm
Location: Belgium
Model: 50 litres


Return to Suggestions and Support

Who is online

Users browsing this forum: No registered users and 1 guest