NeilFawcett
07-22-2006, 06:17 AM
I've got some coding that when it tries converting the BBCodes it does most of them, but QUOTE and CODE ones are not. Infact even the text in them disappears.
Looking around it seems these two in particular use templates. It hits me that maybe my code is calling the BBCode stuff, but it can't find the template(s) hence the stuff is not being converted (& disappears).
Any idea if/what should be set up to point to the templates?
Here's some of my code (again it converts most BBCode, except QUOTE and CODE completely disappears):-
$NewsTemplate = LoadTemplate("news.html");
// Collect Data
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
while($News = $db->fetch_array($NewestNews)){
$neils_text = $bbcode_parser->do_parse($News['pagetext'], false, true, true);
$Data .= ParseTemplate($NewsTemplate,
array(
'threadid' => $News['threadid'],
'threadname' => $News['title'],
'postuserid' => $News['postuserid'],
'postusername' => $News['postusername'],
'post' => $neils_text,
'comments' => vb_number_format($News['replycount']),
)
);
}
Looking at the actual code for do_parse QUOTE and CODE use fetch_template, most of the others are hard coded conversions. Surely this must be pointing to my problem?
Looking around it seems these two in particular use templates. It hits me that maybe my code is calling the BBCode stuff, but it can't find the template(s) hence the stuff is not being converted (& disappears).
Any idea if/what should be set up to point to the templates?
Here's some of my code (again it converts most BBCode, except QUOTE and CODE completely disappears):-
$NewsTemplate = LoadTemplate("news.html");
// Collect Data
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
while($News = $db->fetch_array($NewestNews)){
$neils_text = $bbcode_parser->do_parse($News['pagetext'], false, true, true);
$Data .= ParseTemplate($NewsTemplate,
array(
'threadid' => $News['threadid'],
'threadname' => $News['title'],
'postuserid' => $News['postuserid'],
'postusername' => $News['postusername'],
'post' => $neils_text,
'comments' => vb_number_format($News['replycount']),
)
);
}
Looking at the actual code for do_parse QUOTE and CODE use fetch_template, most of the others are hard coded conversions. Surely this must be pointing to my problem?