Simple BBCode syntax highlighting

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The current feature release of phpBB 3 is 3.3/Proteus.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.3.x. If you need support for phpBB 3.3.x please visit the 3.3.x Support Forum on phpbb.com.

If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
Post Reply
Profo
Registered User
Posts: 10
Joined: Fri Jul 18, 2014 6:15 am

Simple BBCode syntax highlighting

Post by Profo »

I think it could be interesting to extend the code tag to highlight BBCodes, like it currently does with PHP by default.
Or maybe create a new tag for BBCodes.

It's only a visual/cosmetic improvement and I'm not sure if it would be worth the time, that's why I didn't open any phpBB Idea or RFC. I hope this is the right place to suggest it.

Please note that this is not a request for a full highlighting solution like Geshi (that has already been discussed before). For specific languages like C++ or Java we already have a few 3.0.x mods and an 3.1.x extension under development (Codebox Plus).

BBCode highlighting could be as simple as [ code = bbcode ]Your BBCode here[ / code ](without spaces).
Or maybe [bbcode]Your BBCode here[/bbcode] (as a new tag).
This would output a code box with colored text, similar to this draft:

[TAG=ATTRIBUTE]VALUE[/TAG]

The reason to suggest this to be included in phpBB core and not as an extension is that BBCodes are used on every single forum as a way to post HTML. It's the "board's primary language", not something exclusive for technical or support forums like syntax highlighting for other programming languages.
Besides, it can be applied to many different use cases such as help tips (how to post...), post templates, posting rules, built-in BBCode help, etc.

Post Reply