1
Hello,
I am getting an error when accessing the IBP module.
I know the error stems from the PM code on my Theme(Montisarts 3 new themes) versus the changed code by the IPB files in the PM section.
The code in question is:
<?php
GLOBAL $xoopsUser;
$pm_handler =& xoops_gethandler('privmessage');
$uid = $xoopsUser->getVar('uid');
$criteria = new CriteriaCompo(new Criteria('read_msg', 0));
$criteria->add(new Criteria('to_userid', $uid));
$msgcount = $pm_handler->getCount($criteria);
$GLOBALS['xoopsTpl']->assign('msgcount', $msgcount); <----this being line 69?>
<?php if ($this->_tpl_vars['msgcount'] > 0): ?>
<a class="highlight" href="<?php echo $this->_tpl_vars['xoops_url']; ?>
/viewpmsg.php">Inbox (<span style="color:#ff0000; font-weight: bold;"><?php echo $this->_tpl_vars['msgcount']; ?>
</span>)</a>
<?php else: ?>
<a href="<?php echo $this->_tpl_vars['xoops_url']; ?>
/viewpmsg.php">Inbox</a>
<?php endif; ?>
Giving an error:
Fatal error: Call to a member function on a non-object in theme.html on line 69
Can anyoneshed some light on the incorrect variables or code?
Thanks.