Quote:
Originally Posted by louis_chypher
look in yourforum/includes/class_bbcode.php around line 126 and around line 141 for information on how those two bbcode tags work.
|
OK... Looks like were onto similar things...
A call to that function (vB_BBCodeParser) already exists.... Is it maybe simply not calling it correctly for the post's text to deal with QUOTE and CODE tags?
Can you see it being used to process the text into "post"?
Code:
function output_News($a = 5,$f = ""){
global $db, $Data, $vbulletin;
// Define amount to show
$Amount = ($a)? intval($a) : 5;
// Define Forum To Pull From
$Forum = ($f)? intval($f): '';
if(!$Forum){
RunError("No specified forum to pull news from.");
}
// Load Template
$Template = LoadTemplate("news.html");
// Collect Data
$NewestNews = $db->query("
select t.*,p.pagetext
from ".TABLE_PREFIX."thread t
left join ".TABLE_PREFIX."post p on(p.postid=t.firstpostid)
where t.forumid = $Forum
order by dateline desc
limit 0,$Amount");
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
while($News = $db->fetch_array($NewestNews)){
$neils_date = date( "l j", $News['dateline']) . "-" . substr(date( "F", $News['dateline']),0,3) . "-" . date( "Y", $News['dateline']);
$Data .= ParseTemplate($Template,
array(
'threadid' => $News['threadid'],
'threadname' => $News['title'],
'postuserid' => $News['postuserid'],
'postusername' => $News['postusername'],
'post' => $bbcode_parser->parse(unhtmlspecialchars($News['pagetext']), $f),
'comments' => vb_number_format($News['replycount']),
'postdate' => $neils_date,
)
);
}
I believe $f (second parameter) being used in the call is the forum number? That's a bit odd isn't it?
Also in other examples I've seen do_parse is referenced, not "parse"?
Note: Other tags are being converted (eg: IMG and URL)