Log in

View Full Version : Is there (a easy way) to use the bbcode parser?


Sunnz
06-12-2007, 04:29 PM
Basically I like to build this portal outside of the vbulletin's directory base on the posts in the vb database.

Currently I just have a sql statement that grabs the pagetext in the post table that I wanted... but the bbcode are not parsed. Is there a (easy) way to parse this bbcode?

Thanks.

Let me just answer my own question lol:

I simply put my script script.php inside the vbulletin folder.

And I had this on the top:
require_once('global.php');
require_once('includes/functions_bigthree.php');
require_once('includes/class_postbit.php');
$par=&new vB_BbcodeParser($vbulletin,fetch_tag_list());

Then whenever I had something that I need to parse, say the string $post, I simply do:
echo $par->do_parse($post);