Loading...

Top
PFQ Banner

This is PokéFarm Q, a free online Pokémon collectables game.

Already a user? New to PFQ?

Comment tags for bbcode

Forum Index > Core > Suggestions > Completed >

Verdanturf's AvatarVerdanturf
Verdanturf's Avatar
Most coding languages let you block out a section of code with comment tags so that it is not implemented but remains in your written code. In html the comment tags are <!-- and --> bbcode allows you to write text that will not be displayed between an end-line left bracket and the next right bracket, but there doesn't seem to be any sort of comment tag that allows you to write code that will not be read. For example, [accordion] [a-section=Section 1] This is the first section. [/a-section][ ][a-section=Section 2] This is the second section. [/a-section][ ][a-section=Section 3] This is the third section. [/a-section] [/accordion] Normally dispalys like this:

Section 1

This is the first section.

Section 2

This is the second section.

Section 3

This is the third section.
If bbcode had a comment tag, let's say [* and /*], it would allow you to write that code this way: [accordion] [a-section=Section 1] This is the first section. [/a-section] [a-section=Section 3] This is the third section. [/a-section] [/accordion] And have it display like this:

Section 1

This is the first section.

Section 3

This is the third section.
Which would allow you to hide code you're not currently needing to display, but that you want to keep for whatever reason. This would be helpful for organizing more complicated sections of code. Say you have a trade shop with lots of bbcode and you want to temporarily close a section of it but reopen it later. This would let you block out that code without deleting it or having to remove it and save it somewhere else.
My avatar is my edit of official art from Pokémon X and Y.
Like the [nobbcode][/nobbcode] tags that already do exactly what you describe?
0 points Mouse's Midnight Market! S/A/M sales, boxboxes, gem swaps, summon sales & more Avatar art by me
Corviknight's AvatarCorviknight
Corviknight's Avatar
No, Mouse, the difference is that any BBCode in between those tags would be hidden. [nobbcode] still shows text.
official project sekai art; icon is official TCG art
he/him + 22 + cst

QUOTE originally posted by Gladion

No, Mouse, the difference is that any BBCode in between those tags would be hidden. [nobbcode] still shows text.
Can't you combine the nobbcode tags with the [] brackets that hide normal text? I've never tried it but I always thought you could
Verdanturf's AvatarVerdanturf
Verdanturf's Avatar

QUOTE originally posted by Mouse 13

QUOTE originally posted by Gladion

No, Mouse, the difference is that any BBCode in between those tags would be hidden. [nobbcode] still shows text.
Can't you combine the nobbcode tags with the [] brackets that hide normal text? I've never tried it but I always thought you could
No, because as soon as you use a right bracket ] after using an end-line left bracket [, everything following that will be read as code. So if you use an end-line left brack [ and then use nobbcode, the nobbcode tag will be ignored and the right bracket ] at the end of the nobbcode tag will cause everything followed to be read as code. If you switch the order and use the nobbcode tag and then an end-line left bracket [, then the bracket will not be read as code and will not prevent the subsequent text from being displayed.
That's rather odd, I wonder if that's how it was intended to work, or an overlooked mistake/bug?
Niet [Adam]'s AvatarNiet [Adam]
Niet [Adam]'s Avatar
Actually the nobbcode "tag" works separately, as an initial pass before any actual BBCode is processed. And all it does is replace all [ with &#91; - an escape code for the same symbol. And since ] isn't [ it is unaffected by nobbcode. Anyway. Great idea, can't believe we didn't have this already. Done.
Clip from Pokémon anime, re-lined by me
-- OMNOMNOM!
Featured story: Injustice Feedback welcome!

Cannot post: Please log in to post

© PokéFarm 2009-2024 (Full details)Contact | Rules | Privacy | Reviews 4.6★Get shortlink for this page