Lachlan Blog 2005 October

BBcode

October 08, 2005

I personally like BBcode, and think it isn't used enough. Recently I wrote a really nice c# class which parses BBcode. BBcode allows you to give users styling choices without risking layout to your site, security, or other mal behaviours being introduced.

A number of sites could be cleaned up by replacing it's HTML inputs with BBcode including any popular teen portals such as mySpace. BBcode can be tricky to implement so alot of these sites just don't bother. So to put the myth that it's better to just allow HTML than to implement to rest I wrote a class which does it in my sparetime during the week. It was not only wasn't difficult to implement, it's much more extendable than other engines such as the one in phpBB2.0, is fast, and secure.

To encourage people to use BBcode in their commercial applications and see it take off, I am rewriting my BBcode documents from 2002 and making them alot more formal. You can see a draft of these documents on my website under BBcode. I will warn you that they are currently draft and incomplete. When they are complete I will 301 redirect from the old documents to the new ones.

I am also looking for recommendations for a suitable open-source or creative-commons license that would allow commercial applications to deploy my BBcode class in their product or website without having to relicense their codebase. It must be a license and not Public Domain. You can see a live demo of my BBcode class here, sorry if it's unresponsive, it's on free hosting, it should still be fast. If you get start to get errors just restart your browser.

Expect to seem more from me on BBcode in the comming months. BBcode still has a bright outlook being the primary user input styling language of popular internet forums including phpBB, vBulletin, Invision Power Board, Simple Machines Forum, UBB, YABB, and many more.

If you use an application that doesn't support BBcode, bug the developers to implement it, it's well worth it ;) For php applications, the BBcode component in phpBB2.0 is licensed under the GPL and is an excellent implementation that is easy to extend.

There is also support beyond web applications with a BBcode extension for the Mozilla Firefox Internet Browser which allows you to format text in a text area with BBcode via the right click context menu.

No Comments

 « Previous Entries