Hi,
I would like
to run this plugin
PHP Code:
$this->registry->db->query_read_slave(("SET CHARACTER SET utf8");
$stream = $this->registry->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 = " . $this->registry->userinfo['userid'] . "
ORDER BY stream.dateline DESC
");
$streamHTML = "";
while($item = $this->registry->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));
in this template ad_global_below_navbar
using this
PHP Code:
<ul id="webticker">
{vb:raw streamHTML}
</ul>
and in this template lywomen_allstatuses which contains the bits
PHP Code:
<li><span class="usersign"><a href="member.php?u={vb:raw streaminfo.userid}">{vb:raw streaminfo.username}</a></span> {vb:raw stream.status}</li>
I'm having a problem with the plugin as internal error for whole website once I make it activated I tried to hook the plugin in parse_templates as well as process_templates_complete also loads of hooks but non of them works
some hook places such as procces_templates_complete it does get rid of internal error yet is not doing what it suppose such as displaying data out in ad_global_below_navbar template
any suggestions as I'm makin connection to the database retrieve elements contained within a table then construct out in template
I will be more than happy if I can see any help or hint at least
Many thanks in advance