PDA

View Full Version : Parse BBCode - Vb 3.5.3


pyro.699
03-04-2006, 08:40 PM
Im trying to parse BBCode...

Well, this is what I have so far.

require_once(DIR . './includes/class_bbcode.php');
$parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());


Then, somewhere in towards the botom of my script, i have this


$pagetext = $parser->do_parse($db->fetch_array($text), $do_html, $do_smilies, $do_bbcode, $do_imgcode, $do_nl2br, $cachable);


I have the $db code working! i know for a fact that it works!

Now according to kerby's faq, for 3.5.0 Beta1 this is accurate, but im getting this error...

Warning: stripos() expects parameter 1 to be string, array given in \includes\class_bbcode.php on line 523


Thankyou verry much
-Cody Woolaver

Stangsta
03-04-2006, 08:41 PM
What area/page are you trying to Parse it for?

pyro.699
03-04-2006, 08:47 PM
umm, to put it really simply, im making a portal

this is $text

$text = $db->query_read("SELECT pagetext FROM " . TABLE_PREFIX . "post WHERE postid = '$postid' LIMIT 4");

Adrian Schneider
03-04-2006, 09:29 PM
Im trying to parse BBCode...

Well, this is what I have so far.

require_once(DIR . './includes/class_bbcode.php');
$parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());


Then, somewhere in towards the botom of my script, i have this


$pagetext = $parser->do_parse($db->fetch_array($text), $do_html, $do_smilies, $do_bbcode, $do_imgcode, $do_nl2br, $cachable);


I have the $db code working! i know for a fact that it works!

Now according to kerby's faq, for 3.5.0 Beta1 this is accurate, but im getting this error...


Thankyou verry much
-Cody Woolaver

$db->fetch_array() returns an array, not a string... you want to parse one of the elements in that array, not the array itself. :)