PDA


View Full Version : Parse BB Code in a module


goblues
12-03-2005, 10:21 AM
I am trying to figure out how to parse the bold ([b]) bb code in a PHP based module which is being pulled directly from the database. Or strip the bb code. Either way I would be happy with. Any tutorials?

Brian
12-03-2005, 04:21 PM
$yourvar = $bbcode_parser->do_parse($yourvar, {HTML}, {smilies}, {vBcode}, {vBimage code});

Replace the items in brackets there with either a 1 or a 0, depending on whether you want to enable those things.

goblues
12-04-2005, 07:52 PM
Thanks Brian. Any files required such as global.php?

Brian
12-05-2005, 02:00 AM
If I'm thinking correctly it shouldn't be necessary since global.php is already required in the CMPS.

goblues
12-06-2005, 12:25 AM
Worked Great. Thanks Brain!!