Mark.B
09-06-2006, 05:36 PM
I have a plugin set up to read shouts from an external shoutbox (MkPortal as it happens).
$getthreads = $vbulletin->db->query_read("
SELECT mkp_urlobox.*,mkp_urlobox.id AS id, mkp_urlobox.idaut AS idaut, mkp_urlobox.message AS message, user.username AS username
FROM ".TABLE_PREFIX."mkp_urlobox AS mkp_urlobox
LEFT JOIN " . TABLE_PREFIX . "user AS user ON(mkp_urlobox.idaut = user.userid)
ORDER BY id
DESC LIMIT 15
");
require_once(DIR . '/includes/class_bbcode.php');
$parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
while($shout = $db->fetch_array($getthreads)) {
$userid = $shout['idaut'];
$name = $shout['username'];
$message = $parser->do_parse($shout['message'], false, true, true, true, true, false);
eval('$shoutbox .= "' . fetch_template('shoutbox_bit') . '";');
}
This works HERE (www.bowlandcentral.com/forum), however it is not parsing any BBCode used in the shouts.
I thought I had included the relevant functions in the code, but obviously not.
I am almost there, can someone nudge me in the right direction? (I have spent most of the day on this so far!)
$getthreads = $vbulletin->db->query_read("
SELECT mkp_urlobox.*,mkp_urlobox.id AS id, mkp_urlobox.idaut AS idaut, mkp_urlobox.message AS message, user.username AS username
FROM ".TABLE_PREFIX."mkp_urlobox AS mkp_urlobox
LEFT JOIN " . TABLE_PREFIX . "user AS user ON(mkp_urlobox.idaut = user.userid)
ORDER BY id
DESC LIMIT 15
");
require_once(DIR . '/includes/class_bbcode.php');
$parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
while($shout = $db->fetch_array($getthreads)) {
$userid = $shout['idaut'];
$name = $shout['username'];
$message = $parser->do_parse($shout['message'], false, true, true, true, true, false);
eval('$shoutbox .= "' . fetch_template('shoutbox_bit') . '";');
}
This works HERE (www.bowlandcentral.com/forum), however it is not parsing any BBCode used in the shouts.
I thought I had included the relevant functions in the code, but obviously not.
I am almost there, can someone nudge me in the right direction? (I have spent most of the day on this so far!)