More BBCode tags?

Feb 1, 2022 3:57 pm
Just open for discussion really.

Tag description
[pre]...[/pre] Like the code tag but with monospaced font
[class="h1 centred anrion"]Hello[/class] Trying to lose the CSS hack (or at least make it less freighting). We could define an extensible set of "classes" that can be applied to text. Thinks like float-right, bordered, the font names, stuff like that...
[roll="Roll for damage"]10d6[/roll] A DM can give a roll string in a post - clicking it adds it as a roll for the player.
[swroll="PPPRRF"]Use the force[/swroll] (I don't know the dice names). But for star wars dice strings anyway


Unfortunately, the markitup menu is a little full now so I'm not sure where we'd put things on the menu.
Quote
Feb 1, 2022 4:05 pm
Quote:
[pre]...[/pre]
If we divide code tags into one for just showcasing code and one for having it monospaced and whatever else vague needs, could we include in the former the functionality of including the code in a line of non-code text? Because that's something I'd like to see.
Quote:
[class="h1 centred anrion"]Hello[/class]
I'm not quite sure I understand this one. Would that be pre-written code bits made up of combining existing tags (that you maybe enable in game details) so you don't have to type out the full thing every time you need for example a floating spoiler tag?
Quote:
[roll="Roll for damage"]10d6[/roll]
This seems like a feature that sounds nice but has very limited usefulness. I wouldn't be opposed to it at all but I don't think it would see much use.

Could that theoretically be combined with character sheet integration, so if I type [roll="Stealth"]Stealth[/roll] or whatever the correct formatting would be, it would search the respective user's character sheet for a "Stealth" tag inside a roll table and roll that?

Actually, I just realized that gets further complicated if a user has more than one character sheet... Might not be that easy
Quote
Feb 1, 2022 4:19 pm
bowlofspinach says:
Quote:
[pre]...[/pre]
If we divide code tags into one for just showcasing code and one for having it monospaced and whatever else vague needs, could we include in the former the functionality of including the code in a line of non-code text? Because that's something I'd like to see.
I'm not sure I understand. If you're asking whether pre would escape in the same way as code, then yes - I think it must (basically it'd be code but with styling).
bowlofspinach says:
Quote:
[class="h1 centred anrion"]Hello[/class]
I'm not quite sure I understand this one. Would that be pre-written code bits made up of combining existing tags (that you maybe enable in game details) so you don't have to type out the full thing every time you need for example a floating spoiler tag?
Intersting idea. I was just going to ask people to define a bunch of useful class shorthand and hard-code them.
bowlofspinach says:
Quote:
[roll="Roll for damage"]10d6[/roll]
This seems like a feature that sounds nice but has very limited usefulness. I wouldn't be opposed to it at all but I don't think it would see much use.

Could that theoretically be combined with character sheet integration, so if I type [roll="Stealth"]Stealth[/roll] or whatever the correct formatting would be, it would search the respective user's character sheet for a "Stealth" tag inside a roll table and roll that?

Actually, I just realized that gets further complicated if a user has more than one character sheet... Might not be that easy
Yeah. Honestly? I'm not sure how useful it would be either.
Quote
Feb 1, 2022 4:44 pm
Quote:
bowlofspinach says:
Quote:
[pre]...[/pre]
If we divide code tags into one for just showcasing code and one for having it monospaced and whatever else vague needs, could we include in the former the functionality of including the code in a line of non-code text? Because that's something I'd like to see.
I'm not sure I understand. If you're asking whether pre would escape in the same way as code, then yes - I think it must (basically it'd be code but with styling).
Basically, now if I write:
https://i.imgur.com/hoaOeZO.png
it displays as:
Quote:
To bold something, just add
[b][/b]
around the text
rather than as:
Quote:
To bold something, just add [b][/b] around the text
(Although I did just spontaneously, in trying to show what I mean, come up with a workaround, so it might not be super necessary...)
Quote
Feb 1, 2022 4:50 pm
bowlofspinach says:


Basically, now if I write:
https://i.imgur.com/hoaOeZO.png
it displays as:
Quote:
To bold something, just add
[b][/b]
around the text
rather than as:
Quote:
To bold something, just add [b][/b] around the text
(Although I did just spontaneously, in trying to show what I mean, come up with a workaround, so it might not be super necessary...)
Oh, I see. Ugh. This is a mess. I don't want to break anything on the million posts already on the site, y'know?

What about:
Tag What it does
code Whatever it does now.
bbcode Escapes the code, but stays inline
pre monospaced, no line wrapping - like the browser wants to https://i.imgur.com/3ACwAnk.png
Quote
Feb 1, 2022 5:54 pm
If we don't surround the HTML 'code' tags in 'pre' tags (as we currently do) they will display inline.
Quote
Feb 1, 2022 5:59 pm
The preview strips angle brackets but the real display does not?

Currently [ code]something with tags[/code] becomes:
<pre>
<code>something with tags</code>
</pre>

If we changed that to <code>something</code> it would display inline. But, of course, would not format as code visibly, aside from the brackets.
Last edited February 1, 2022 6:19 pm
Quote
Feb 1, 2022 6:19 pm
There is also a <samp> HTML tag for samples (also inline), which might be better than a new [ bbcode] tag, which appears to imply a limit to its use.
Quote
Feb 1, 2022 6:58 pm
vagueGM says:
The preview strips angle brackets but the real display does not?

Currently [ code]something with tags[/code] becomes:
<pre>
<code>something with tags</code>
</pre>

If we changed that to <code>something</code> it would display inline. But, of course, would not format as code visibly, aside from the brackets.
Jeez, I already take enough flak from the disgruntled . I ain't lighting a targeting flare by changing the code tag.

If the existing code tag functionality changes and it breaks people's character sheets or posts, it won't be your house the mob storms with torches and pitchforks. It'll be me they yell at.

The question is whether other tags are wanted, and what they should do. Are you suggesting that the bbcode tag be called samp? It seems like we'd be trying to teach users html.
Quote
Feb 2, 2022 4:29 am
The bbcode [ code] tag can keep doing what it does. I was just saying there are ways to get the inline effect that has been asked for.

Most users don't care what HTML the bbcode tags produce. But, when they emulate HTML behaviour (on an HTML platform) there is less surprise.

You could simply have the [ code] bbcode tag become <pre> in HTML which should do what it does now (the nested <code> tag probably does nothing, but some 'weird-browser' testing would be in order if we change it), but there is no need to change it, a little mess in the HTML is immaterial.

Adding a way to add a un-reset <pre> or <code> tag would be good. And adding a way to get inline <code> or <samp> tags would be very nice. Again, the users don't care what the HTML is, so we can generate any HTML tags from the bbcode. I was just pointing out there is a HTML for doing what we are looking for.

The flip-side of 'teaching users HTML' is that any who know HTML might have an easier (or less surprising) time when things adhere to the standards.

I still worry that new people coming to it will expect [ code] to do what you are describing [ pre] doing, but that ship seems to have sailed. Having [ pre] is better than not.
Quote
Feb 3, 2022 8:23 am
While we are looking at adding tags, can we revisit the issue of lists? They are not that hard.

They are pretty much straight tag translations:

bbcode becomes HTML
[list] <ul>
[*]list item 1 <li>list item 1</li>
[*]list item 2 <li>list item 1</li>
[/list] </ul>


bbcode becomes HTML
[list=1] <ol>
[*]list item 1 <li>list item 1</li>
[*]list item 2 <li>list item 2</li>
[/list] </ol>

It would be nice, and not much more complicated to allow nested lists:

bbcode becomes HTML
[list] <ul>
[*]list item 1 <li>list item 1</li>
[*]list item 2 <li>list item 2</li>
[list] <li><ul>
[*]sub item 2.1 <li>sub item 2.1</li>
[*]sub item 2.2 <li>sub item 2.2</li>
[/list] </ul></li>
[/list] </ul>


Nesting rules for numbered (ordered) list are the same.
If we are willing, it should not be much extra work to extend this to support more complex numbered lists:

bbcode becomes HTML
[list=3] <ol start="3">
[*]list item <li>list item</li>
[*]list item <li>list item</li>
[/list] </ol>


The start attribute tells HTML lists which number to start at. In this case the items would be 3 and 4.
<ol> also take a type attribute to say if it uses numbers, letters, or roman numerals. type="1" is the default, but can also be a,A,i,I for lowercase letters and numerals.
Quote
Feb 3, 2022 8:25 am
Also, the preview of the renders the HTML angel brackets within tables.
This might be an injection vector if someone can get people to preview dodgy stuff.
Quote
Feb 3, 2022 8:39 am
Quote:
[list]
[*]list item 1
[*]list item 2
[list]
[*]sub item 2.1
[*]sub item 2.2
[/list]
[/list]
Would this work? With any other tag on the site, you can't nest them like that because the first [/list] would just close the whole thing, wouldn't it? The tags would probably have to be different, right?
Quote
Feb 3, 2022 8:44 am
bowlofspinach says:

Would this work? With any other tag on the site, you can't nest them like that because the first [/list] would just close the whole thing, wouldn't it? The tags would probably have to be different, right?
It is 'legal' bbcode. But might need the parser to be taught that fact.
Quote
Jul 1, 2022 7:37 pm
bowlofspinach says:


Would this work? With any other tag on the site, you can't nest them like that because the first [/list] would just close the whole thing, wouldn't it? The tags would probably have to be different, right?
f tags support nesting. I plan to make future tags support nesting (where appropriate).
Quote
Jul 1, 2022 7:45 pm
Sorry (not sorry) for the necro! I'm new to the platform and writing a bunch of wiki posts full of bulleted lists. Would love a simple way of creating unordered indented lists, even just single layer with no nesting. Numbered lists would also be cool, too, but not as important for me personally.

You do not have permission to post in this thread.