UPDATE: If you are using PHP 5.4, and get an error installing the pear bbcode module, try installing “bbcode-1.0.3b1” rather than “bbcode”. See this thread for more information:
If you have a site that allows users to create their own content, you’re going to need bbcodes(aka “Bulletin Board Codes”) to make your and their life easier.
bbcodes, or html shortcuts, are the tags people use in their content, instead of standard HTML tags, that are used to markup some text, such as bolding a paragraph, creating a link, etc. Everybody’s seen them, [u] for underlining, [b] for bold, etc.
I created a rudimentary bbcode system for my projects, but it didn’t handle nested bbcodes very well, and due to my lack of regular expression expertise, the function was quite a hog on processing large amounts of content.
Continue reading “Using the PECL bbcode extension”