1
Lance_
Theme and PM related error
  • 2004/8/13 18:43

  • Lance_

  • Home away from home

  • Posts: 983

  • Since: 2004/1/12


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.

Login

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Aug 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!