Tables, HTML and posting

11 posts / 0 new
Last post
Anarch's picture
Offline
Namer
Joined: 2004-05-19
Tables, HTML and posting

The interaction of HTML tables and the Javascript appears to be broken. Here's the stat block for a PrC I'm typing up:

LevelBABFort RefWillSpecial
1 +0+2+0+2
2 +0+3+0+3
3 +1+3+1+3
4 +1+4+1+4
5 +2+4+1+4
6 +2+5+2+5
7 +3+5+2+5
8 +4+6+2+6
9 +4+6+3+6
10 +5+7+3+7

The problem is that the Javascript compiler (? not sure what to call it, really) is inserting a between each line of the table, which then dumps above the table proper.

Anarch's picture
Offline
Namer
Joined: 2004-05-19
Tables, HTML and posting

Another (much lesser) problem: the Javascript code is converting < to < and > to > in the text of the post upon preview. This means that if you preview again, a <br> converts to a and then to a

which isn't so good.

Worse, this happens regardless of whether HTML has been allowed in the post -- and worse still, that latter bit isn't stable (i.e. if you preview something with HTML disallowed, it will become allowed again).

In a similar vein, "[code]" doesn't trump , which it probably should.

Anarch's picture
Offline
Namer
Joined: 2004-05-19
Tables, HTML and posting

Also, table width appears to be broken.

[Sorry for the multiple posts, but the code in the previous two isn't stable (see the whole "<" and ">" thing above). I'll just edit/append to this one from now on.]

ETA: I've managed to get table-esqueness to work by divving and pre-ing (or, rather, by stealing and gutting the code from Jaerom Darkwind's Paladin thread on the WOTC boards). If that's the way we should be doing it in future, I'd suggest an update, with examples, to the FAQ.

Clueless's picture
Offline
Webmonkey
Joined: 2008-06-30
Tables, HTML and posting

Did this work in the PHPBB based board we had before??

Were you able to have BBCode and HTML in the same posts before?

BTW: I've installed phpbb code on another system I have access to and i'm rapidly coming to the conclusion that *full* html support - such as that called for with tables - was probably never a part of the previous set of forums we had. The html support that the previous forums had would have supporting markup for things such as: < b> or < li> tags.

Table width fixed. I originally had the CSS for the forum setitng all tables to 100% and then changing anything smaller to smaller. That's been corrected to the other way around.

Allowing HTML (and other such things) should be more stable now in the system. Won't change between editting the post.

Still not entirely sure how to handle BBCode vs/ HTML when it comes to line breaks. Webpages (which this forum is really) don't show line breaks unless they're in < br > form.

Testing a few things:

BOLD
SSS
under
sad pre

  • 1
  • 2
  • 3
  1. 1
  2. 2
  3. 3
  • 1
  • 2
Ok. Corrections as follows: Allowed HTML tags - b, i, s, u, pre, li, ol, ul, hr, div, font Not allowed HTML tags - table, tr, td

This replicates pretty much the behavior of PHPBB the previous forum software that we were using.

If you could write up something regarding the div and pre method of setting up tables that would be appreciated. Writing the parser for the tables is something a little above what I'm able to do right now - and I'm thinking it may *very* risky if someone screws it up.

Still working on the conversion of < > in text display. Technically the parser shouldn't touch that stuff at all.

Clueless's picture
Offline
Webmonkey
Joined: 2008-06-30
Tables, HTML and posting

'Clueless' wrote:
Did this work in the PHPBB based board we had before?? Were you able to have BBCode and HTML in the same posts before?

Dunno; I never used HTML before since I was never interested in making tables, only lists. And I hate those damn angle-brackets. The shift key is too much work. Eye-wink

Quote:
BTW: I've installed phpbb code on another system I have access to and i'm rapidly coming to the conclusion that *full* html support - such as that called for with tables - was probably never a part of the previous set of forums we had. The html support that the previous forums had would have supporting markup for things such as: < b> or < li> tags.

Yeah, those work fine when mixed with BBCode tags.

Quote:
Table width fixed. I originally had the CSS for the forum setitng all tables to 100% and then changing anything smaller to smaller. That's been corrected to the other way around.

Ginchy!

Quote:
Still not entirely sure how to handle BBCode vs/ HTML when it comes to line breaks. Webpages (which this forum is really) don't show line breaks unless they're in < br > form.

My guess is that you'd have to alter the parser to detect when you're inside an environment like < table > and strip out the < br >'s... but even then, I'm suddenly not sure how you could hope to distinguish between the inadvertently-added and the deliberate tags. Ouch.

Quote:
Allowed HTML tags - b, i, s, u, pre, li, ol, ul, hr, div, font Not allowed HTML tags - table, tr, td

Sweet!

Quote:
If you could write up something regarding the div and pre method of setting up tables that would be appreciated.

I'll, uh, have to figure out how it works first :help!!:

Clueless's picture
Offline
Webmonkey
Joined: 2008-06-30
Tables, HTML and posting

How it works:

div - actually this isn't Needed. Div's are simply a way of making a piece of information stand out, and to apply something like a css style to the contents.

pre - this is the real trick to it. pre tags tell the browser NOT to condense all that white space into a single white space. If you've ever played with html you know what I mean. An example follows:

without pre tags:
lets show what happens to white space

with pre tags:
lets show what happens to white space

Nemui's picture
Offline
factotums
Joined: 2004-08-30
Tables, HTML and posting

While you're on the subject, could you tell me why the (monster) submission form inserts a on top of every field? I try to format entries before I post (since I *still* can't paste in the non-html window using Mozilla), and I keep forgetting about those increased blanks, which kinda pisses me off... (yeah, I'm nitpicky like that).

Clueless's picture
Offline
Webmonkey
Joined: 2008-06-30
Tables, HTML and posting

Probably something to do with the oddity of the JS used to produce a RTF interface.

Why is it you still haven't gotten cut and paste to work? The directions are there - you just need to replace where it gave the example site (mozilla.org) wiht (planewalker.com) right?

And is it just the monster ones that do that?

Nemui's picture
Offline
factotums
Joined: 2004-08-30
Tables, HTML and posting

Quote:
And is it just the monster ones that do that?

Throw in line breaks? No, I don't think it's just the monsters.

'Clueless' wrote:
Why is it you still haven't gotten cut and paste to work? The directions are there - you just need to replace where it gave the example site (mozilla.org) wiht (planewalker.com) right?

Yeah, I edited the config file and put in planewalker as the non-restricted site, but nothing changed. However, when I do paste directly, using another browser, font sizes get screwed up randomly as often as not, so I think I'll stick with writing submissions in a html editor and pasting them into the html window, skipping rtf. Writing tables is a bitch, though...

Clueless's picture
Offline
Webmonkey
Joined: 2008-06-30
Tables, HTML and posting

You aren't using word or office as your text editor before you copy and paste are you? MS products are the only ones I know that do the font thing - because they include formating tags when you copy and paste.

Anarch's picture
Offline
Namer
Joined: 2004-05-19
Tables, HTML and posting

On a somewhat related note, < ol > seems to be broken; and intriguingly, both random < li > and [ * ] tags produce the bullet of the unordered list, irrespective of surrounding tags.

Also, smileys are broken in preview Eye-wink

Planescape, Dungeons & Dragons, their logos, Wizards of the Coast, and the Wizards of the Coast logo are ©2008, Wizards of the Coast, a subsidiary of Hasbro Inc. and used with permission.