View Single Post
Old 03-04-2008, 06:19 PM   #2 (permalink)
Alan @ CIT
Member of the Month
The Frequenter
Member of the Month Top Contributor 
 
Alan @ CIT's Avatar
 
Join Date: Apr 2005
Location: South UK
Posts: 483
Thanks: 51
Alan @ CIT is on a distinguished road
Default

The basic process is fairly straightforward - your script just searches for the BBCode tag and replaces it with the HTML equivelent.

For example, for bold it would search for [b] and replace it with <strong>.

It can get complex when you start dealing with complex BBCode (for example, Invision Board's BBCode parser comes in at just under 4,000 lines of code) but don't worry about that for now

Also, there is a BBCode extension which may help - PHP: BBCode - Manual

Alan
Send a message via MSN to Alan @ CIT
Alan @ CIT is offline  
Reply With Quote