jase
 admin, 2144 posts
 Cogito, ergo procuro.
 Carpe stultus!
Thu 2 Apr 2009
at 17:37
Easy Tables and Grids.
How would people like...
    [smarttable]
    +---------------------------------+
    { Heading }{ heading2 }{ heading3 }
    [         ][          ][ boo      ]
    [ apple   ][ banana   ][ carrot   ]
    +---------------------------------+
    [/smarttable]


And even more simply (but ugly);
    [smarttable]
    +-+
    {Heading}{heading2}{heading3}
    [][][boo]
    [apple][banana][carrot]
    +-+
    [/smarttable]


To turn out looking like this?
    Headingheading2heading3
    boo
    applebananacarrot


You wouldn't be able to get all the left/right alignment that the full blown table stuff can do, but it might be of help to people who want a nice HTML table but don't know all the commands, and find it looking rather messy.


Next, grids.

After sleep, and probably some real work.

This message was last edited by the user at 16:10, Mon 15 Apr 2013.

spoonk
 member, 68 posts
 Don't Feed the Trolls
Thu 2 Apr 2009
at 17:51
Re: Easy Tables and Grids.
I could see my self using the top one more often as I might want to make one table field longer then the next.  IF it would be possible that is.

Your Example
[smarttable]
+---------------------------------+
{ Heading }{ heading2 }{ heading3 }
[         ][          ][ boo      ]
[ apple   ][ banana   ][ carrot   ]
+---------------------------------+
[/smarttable]



Mine
[smarttable]
+---------------------------------+
{ Heading }{ heading2 }{ heading3 }
[                     ][ boo      ]
[ apple   ][ banana   ][ carrot   ]
+---------------------------------+
[/smarttable]

The grids it self sounds great, if you are talking like a Map Grid or something like that.  Great for sowing your players what the battle field looks like for better strategic maneuvers and or even use of spells.  Would be so much better then the text based grids you see some GM's use.  Plus would be so much faster then making one from scratch.  Like this example I have from on of the games I am in.  Would be nice if you would just click a place on the grid and it adds a solid block.  Then add a character representation some how.  Okay this is now getting complicated but the idea is still sound I think.


::::::::::::::::::::::::********************************
::::::::::::::::::::::::**ta.......a........../-----\.**
::::::::::::::::::::::::**.s..................|bbbbb|.**
::::::::::::::::::::::::**....................|bbbbb|.**
::::::::::::::::::::::::**....................|bbG..|.**
::::::::::::::::::::::::**....................|bb...|.**
::::::::::::::::::::::::**..............N.....|bb.../.**
::::::::::::::::::::::::**................hJ..\____/..**
::::::::::::::::::::::::**.................h..........**
::::::::::::::::::::::::**............................**
::::::::::::::::::::::::**............................**
::::::::::::::::::::::::**..........................a.**
**************************.......***********************
**************************.......*******
**************************.......*******
**************************.......*******
**************************.......*******
**************************.......*******
**************************.......*******

This message was last edited by the user at 18:02, Thu 02 Apr 2009.

nauthiz
 member, 73 posts
Thu 2 Apr 2009
at 17:55
Re: Easy Tables and Grids.
As an additional way of doing tables, I would't mind it.

Though for those of us who can fumble around with the current code just well enough, it seems like it might be a bit of a different take which would lead to more work if it was a One or the Other sort of choice.
Utsukushi
 member, 630 posts
 I should really stay out
 of this, I know...but...
Thu 2 Apr 2009
at 17:55
Re: Easy Tables and Grids.
The easier tables would be pretty helpful, I think.  I'm assuming that, as with a lot of the other things you've talked about implementing, it would be an addition, and not a replacement, to being able to do them the harder-but-more-customizable way?
bigbadron
 moderator, 10195 posts
 He's big, he's bad,
 but mostly he's Ron.
Thu 2 Apr 2009
at 17:57
Re: Easy Tables and Grids.
Those tables look considerably easier to work with than all that <tr><td>...</td><td>...</td></tr> stuff.

The first example, in particular, shows you exactly how it will all be laid out, so you can instantly see if something isn't quite right.

I think it would certainly make tables in character sheets, for example, more practical.
jase
 admin, 2145 posts
 Cogito, ergo procuro.
 Carpe stultus!
Thu 2 Apr 2009
at 18:30
Re: Easy Tables and Grids.
My two examples used the word "AND".  Both would do the exact same thing, my test code already converts both (and anything inbetween) into the final result.

It's not mystically matching up ]'s (etc) within the table with ones above and below it, it's just turning ] into </td> etc etc (which is why the amount of spacing does not matter, ergo why both examples return the same output).

Not sure about getting it to span two cells like in your example, spoonk.  I'd probably have to use something like [2 to span 2 cells.  I was actually going to allow people to use the character immediately after the cell opening to specify the horizontal alignment, but if cell spanning is more popular then I could do that instead.

(Alignment would have been done via the > < and ^ symbols, i.e. [>right] [<not right] [^centre/center/middle].)


For grids... I'm not sure how to get the user to draw them yet (ideas welcome), but it'd turn out something like;
AAABACADAEAFAGAHAIAJAKALAMAN
1~~~~~~~~~~~~~~
2~
3~
4~~
5~~
6~
7~
8~
9~~
10~~
11~~
12~~
13~~
14~~
15~~zF

... They're all not exactly square because this is a rough example.


Hmm, I was doing that bed thing.  2:30am, oops.
spoonk
 member, 69 posts
 Don't Feed the Trolls
Thu 2 Apr 2009
at 18:52
Re: Easy Tables and Grids.
Hahaha, I know how that goes Jase.  I wasn't looking for a response so soon because you did say you were going to bed.  I took and as meaning two different system so that was my bad.

The idea behind the adjustable width of cells is so that a more uniform and or logical lay outs for creating Character Sheets.  I am not a fan of text based character sheets and use third party character sheet websites.  As I prefer to see a character sheet I my self end up making two character sheets.  One for the GM on how he prefers the text based system and my more traditional Table Top edition.  I'm sure some one right now could even make such a code but with the level of the complexity it is now to create one the non coders wouldn't even want to touch it with a 50 foot pole.  I don't even know the system but if I had the time and motivation I could learn the system.  At the moment I lack both and feel that your first example would be best to visually see what fields need to be changed and where.  Perhaps even adding the code to the heaven section as a uniform for the RPOL community.

As this is a different discussion from the Character sheet with Forms link to a message in this forum discussion, I am keeping the issues separate.  Even with out the form ability, being able to visually see what a table should look like will perhaps make them more acceptible for potentil players of using the system.
Yoss
 member, 926 posts
 A Serious Waste of Time
 The largest game on RPOL
Thu 2 Apr 2009
at 20:22
Re: Easy Tables and Grids.
Cool idea jase.  Question though, why do you need the "+-----+" section?  From what I can tell you're just creating a lookup table to convert brackets to html tags something like what I've listed below.  I can't figure out what the plus-minus-plus would convert to in the html.


HTML           SmartTable
<table><tr>    [smarttable]
</tr></table>  [/smarttable]
</tr><tr>      \n (newline character)
<th>           {
</th>          }
<td>           [
</td>          ]


Did I guess right?  As a suggestion, you might consider shortening "smarttable" to something like "st" or "stable" or "txtable" in order to save typing.
Whimper3
 member, 16 posts
Thu 2 Apr 2009
at 22:18
Re: Easy Tables and Grids.
Wow, I love it.  I use plain ascii tables and grids all the time because it's easier to see what I'm going to get.  With SmartTables like the one in your example, I'd know right away what my table would look like.
ashlayne
 member, 1392 posts
 Go ahead. Feel superior.
 Makes my life easier.
Thu 2 Apr 2009
at 22:57
Re: Easy Tables and Grids.
I fully agree that that would be an excellent, and widely used, tool. I did a game a while back that I would've loved that for... the <td><tr><etc> tags just messed with my mind when creating, so I wound up making tables in OOo Writer, then c&Ping section by section while adding the code. But yeah, that's a really awesome idea.

I agree with the shortening of the tag code, though. (1) It gives it more of a "coding" feel ^_^ and (2) it helps those of us who fly through the keyboard normally. Only a few keystrokes to stop and think about as opposed to several. Tags should be user-friendly, though, so if <smarttable> is more "common sense" than <st> or the like, then that would be better. OTOH, most of us in Community Chat use random, nonexistent tags for the Vent and Antivent threads, so I guess length isn't really a concern. ^_^;
Alhaja
 member, 216 posts
Thu 2 Apr 2009
at 23:41
Re: Easy Tables and Grids.
That's very clever and easier to read than all the html code for a table.

Spanning several cells would be nice -- can we even do that with html at the moment? I think I'd prefer alignment, though, if I had to pick between the two.
katisara
 member, 3924 posts
 All is hardcore
 when made with love
Fri 3 Apr 2009
at 13:08
Re: Easy Tables and Grids.
Yes, easy grids would be very nice.
jase
 admin, 2160 posts
 Cogito, ergo procuro.
 Carpe stultus!
Fri 3 Apr 2009
at 17:13
Re: Easy Tables and Grids.
In reply to Yoss (msg #8):

The +---+ makes it look better when laying it out.  It also lets you have more than two tables in one section (and even other stuff inbetween) as it's them that trigger <table> and </table>.

What other portions trigger what is subject to change at this stage, but no, a new line wasn't automatically a new table row.


Still not sure on the grid design, needs to look square'ish when composing.

[A][B][C]
[1][2][3]
[A][B][C]
... possibly looks best, though it's pretty cramped.

[ A ][ B ][ C ]

[ 1 ][ 2 ][ 3 ]

[AAA][BBB][CCC]

Might also work, I can allow both by ignoring blank lines and white space after [ and also before ].



HTML can span cells, vertically and horizontally even.  It looks like people would prefer left/right/centre alignment.
Yoss
 member, 933 posts
 A Serious Waste of Time
 The largest game on RPOL
Fri 3 Apr 2009
at 18:10
Re: Easy Tables and Grids.
jase:
The +---+ makes it look better when laying it out.  It also lets you have more than two tables in one section (and even other stuff inbetween) as it's them that trigger <table> and </table>.

It seems a bit odd to me to have to type the <st> and </st> tags and then +-+ at the top and bottom.  Why not just have <st> start the < table > tag?

quote:
a new line wasn't automatically a new table row.

Out of curiosity, how are you triggering the < tr > tag then?  Without the newline character, wouldn't everything be on the same row?

quote:
Still not sure on the grid design, needs to look square'ish when composing.

[A][B][C]
[1][2][3]
[A][B][C]
... possibly looks best, though it's pretty cramped.

[ A ][ B ][ C ]

[ 1 ][ 2 ][ 3 ]

[AAA][BBB][CCC]

Might also work, I can allow both by ignoring blank lines and white space after [ and also before ].

Ignoring the white space seems prudent in order to get the input to look like the output.  When you have variable length input strings, it will start to not line up if you don't allow white space.

Option A
[A][Bbbbbbbbbbbbb][C]
[111][2][333]
[A][B][Ccc]


Option B
[A  ][Bbbbbbbbbbbbb][C  ]
[111][2            ][333]
[A  ][B            ][Ccc]


I'm guessing Option B would "b" more popular.

quote:
HTML can span cells, vertically and horizontally even.

RPOL does not currently support "colspan" and "rowspan" as tag modifiers though, last I checked.

quote:
It looks like people would prefer left/right/centre alignment.

Defaulting to centered for the smart tables seems like it would save trouble.  If you allow tag modifiers, the smart table format will not look quite so smart any more.  I'd say keep the st simple (maybe call it "simpletable" instead?) and save the tag modifiers for the actual html version.
Rhuie
 member, 133 posts
Fri 3 Apr 2009
at 18:56
Re: Easy Tables and Grids.
I would love to use those grids, especially for tactics-heavy games like D&D 4E. Much appreciated!
jase
 admin, 2164 posts
 Cogito, ergo procuro.
 Carpe stultus!
Sat 4 Apr 2009
at 02:20
Re: Easy Tables and Grids.
In reply to Yoss (msg #14):

(Start of line) + any number of spaces + { = <tr><th>
} + any number of spaces + (end of line) = </th></tr>
(Start of a line) + any number of spaces + [ = <tr><td>
] + any number of spaces + (end of line) = </td></tr>


Option B on its own is not an option.  By allowing any number of spaces and new lines it allows for (as I said) both.


Alhaja asked "can we even do that with html at the moment", I thought she was referring to actual html.


And read my proposed method for alignment please (msg #6).  1 character, I'm sure it won't break the bank.
megadeus
 member, 1149 posts
 'Twas brillig and the
 slithy toves...
Sat 4 Apr 2009
at 22:22
Re: Easy Tables and Grids.
What about using something like PHP Markdown Extra's simple tables. They're really easy to use and the code is already written under an open-source license (BSD-style).

Basically, one types something like the following:

First Header  | Second Header
------------- | -------------
Content Cell  | Content Cell
Content Cell  | Content Cell

and it gets rendered like this:

First HeaderSecond Header
Content CellContent Cell
Content CellContent Cell


I think this makes sense because it's easy to remember how to do (just use dashes and pipes) and the author can easily visualize what the table will look like when rendered.

Side note: the more I read about Markdown, the more I want to implement it in every web project I touch. (I may start another thread espousing the benefits of Markdown and make a case for Markdown-style formatting on RPoL)
jase
 admin, 2169 posts
 Cogito, ergo procuro.
 Carpe stultus!
Sun 5 Apr 2009
at 00:55
Re: Easy Tables and Grids.
That's certainly a possibility, a few notes regarding it;
  • You have to have the table header.
  • You cannot use table headers anywhere else.
  • It allows alignment based on a whole column.


It certainly seems a nicer way to do it than mine, but not quite as flexible.

My suggestion can do:

{ Header 1 }[ Data 1.1 ][ Data 1.2 ]
{ Header 2 }[ Data 2.2 ][ Data 2.2 ]

... So we're probably talking about flexibility vs ease of use here, I'll you guys sort out which you'd rather.  (c;
Utsukushi
 member, 636 posts
 I should really stay out
 of this, I know...but...
Sun 5 Apr 2009
at 01:21
Re: Easy Tables and Grids.
It seems like you already have flexibility in using the standard codes...so if you're implementing easy tables and grids, whatever makes them easier is probably the way to go.

Once we have people hooked on building tables, then they can go into the FAQs and learn how to make them do tricks...
megadeus
 member, 1150 posts
 'Twas brillig and the
 slithy toves...
Sun 5 Apr 2009
at 05:05
Re: Easy Tables and Grids.
In reply to jase (msg #18):

Understood. I'm not sure how much tinkering you would like to do in terms of reverse-engineering the Markdown code (which is also available in Perl, I've just remembered), but it might or might not be possible to change the way the hyphens and pipes are parsed into html table elements.

Example:

------------------------
Data 1 | data 2 | data 2
------------------------
content| text   | stuff
------------------------

The first line of hyphens indicates the start of a table, the pipes indicate separate fields, the line of hypens between table cells indicates a new table row, and the final line of hyphens indicates the end of the table.

This gets around the question of requiring the table header be the first row.

If you wanted table headers elsewhere (e.g. the leftmost column),  you could use something like Markdown's "emphasis" or "bold" syntax: surround the desired field's text with asterisks or underscores.

---------------------------
*Header1* | data 2 | data 2
---------------------------
*Header2* | text   | stuff
---------------------------




Also, I think  I'm with Utsukushi on this one: if we want an easy way for non-expert users to make tables, the limitations you mentioned in msg#18 are reasonable concessions in the name of ease of use. Complex tables can be created by hand or using one of a number of online table-writing tools.
jase
 admin, 2170 posts
 Cogito, ergo procuro.
 Carpe stultus!
Sun 5 Apr 2009
at 05:35
Re: Easy Tables and Grids.
I'm happy to implement our own rendition of what the majority wants.  Few points though;

With your modifications they're starting to look pretty similar, just different text triggers.

While I'm happy (eager, even) to come up with easy, clean and nifty ways to design tables, grids etc etc, unless some kind of code becomes the defact web-standard I'll be pretty adverse to implementing it on RPoL.  Otherwise next thing we'll be supporting UBBC, Markdown, Wiki... the list goes on.  And they'll clash plus bog down the system.
Digital Mastermind
 member, 325 posts
 7 years of Rpol,, where
 has the time gone?
Sun 5 Apr 2009
at 08:27
Re: Easy Tables and Grids.
Not the easiest thread to follow/catch up on but I can assure you that many would appreciate easier access/usage of tables.
Yoss
 member, 936 posts
 A Serious Waste of Time
 The largest game on RPOL
Mon 6 Apr 2009
at 17:47
Re: Easy Tables and Grids.
Humm, I didn't know you could detect "start of line" and "end of line" without looking for the newline character.  But since you can, I agree that's best.  So we get the following conversions.


HTML             SmartTable
<table>          [st]
</table>         [/st]
<tr>             "start of line"
</tr>            "end of line"
<th>             {
</th>            }
<td>             [
</td>            ]
align="center"   ^ placed just after the [ or {
align="left"     < placed just after the [ or {
align="right"    > placed just after the [ or {

Plus, these would all ignore white space so that users can enter the data evenly spaced (Option B in my last post) or clumped up (Option A) and it gives the same result.



I really like this implementation, jase.  Well done!  (It's better than the Markdown option, for the reasons you listed in msg 18.)

The conversions to html will be done on the fly, right?  Meaning, the simple text entry is what's stored in the database, so that when you go back to edit you don't have to suddenly deal with the html.