You'll want to have the following included in your page...
PHP Code:
// Include vBulletin Addons
chdir("/path/to/forums/forums"); // <-- Change This
include("./global.php");
require_once('./includes/class_bbcode.php');
If you need to switch back to the CWD before the CHDIR, simply set a variable to getcwd() and then after you have included both files chdir() to that var.
To parse the post, the following code will be needed...
PHP Code:
$parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
$parser->do_parse($var, 0, 1, 1, 1, 1, 0);
$var contains the content you want to parse. The set of numbers after $var are flags for the following...
PHP Code:
do_parse (string $text, [bool $do_html = false], [bool $do_smilies = true], [bool $do_bbcode = true], [bool $do_imgcode = true], [bool $do_nl2br = true], [bool $cachable = false])