Try this:
PHP Code:
$vbulletin->db->query_read_slave("SET CHARACTER SET utf8");
$stream = $vbulletin->db->query_read_slave("
SELECT stream.*, users.* FROM " . TABLE_PREFIX . "dmods_stream AS stream
INNER JOIN " . TABLE_PREFIX . "user AS users USING (userid)
WHERE stream.touserid = 0 || stream.touserid = " . $vbulletin->userinfo['userid'] . "
ORDER BY stream.dateline DESC
");
$streamHTML = "";
while($item = $vbulletin->db->fetch_array($stream)) {
if ($item['type'] == 'status') {
// Unserialize params
$streamdata = unserialize($item['parameters']);
$templater = vB_Template::create('lywomen_allstatuses');
$templater->register('stream', $streamdata);
$templater->register('streaminfo', $item);
$streamHTML .= $templater->render();
}
}
vB_Template::preRegister('ad_global_below_navbar', array('streamHTML' => $streamHTML));