6
Well, I'm out of ideas
Maybe someone will jump here to help ...
Here is what I have in my theme:
<!--
<{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);
<{/php}>
-->
Just an idea - can you use smary plugin to do the job, like the MySQL query/time load info hack?