| FINALLY !!! |
| by TerryBogard on 2004/3/20 21:19:51 Thanks so much Dave !!! This finally works great ! I´ve made a hack from this and goin to upload it right away! Thanx again for your help ! Here are the Files with instructions ! |
| Re: Calling external PHP to return vars - NOT in a block |
| by Dave_L on 2004/3/20 15:47:10 Do you mean $block.new_messages in modules/system/templates/blocks/system_block_user.html? That's calculated in function b_system_user_show() in modules/system/blocks/system_blocks.php. Try this: le="color: #000000"><?php error_reporting(E_ALL); #*#DEBUG# global $xoopsUser; if (is_object($xoopsUser)) { $pm_handler =& xoops_gethandler('privmessage'); $criteria = new CriteriaCompo(new Criteria('read_msg', 0)); $criteria->add(new Criteria('to_userid', $xoopsUser->getVar('uid'))); $new_messages = $pm_handler->getCount($criteria); echo "You have $new_messages new message(s).<br />n"; } Since you're already checking $xoopsUser in the code you posted above, you really only need the body of the "if". |
| Re: Calling external PHP to return vars - NOT in a block |
| by TerryBogard on 2004/3/20 14:56:58 It´s the variable which shows how many unread messages are in someone´s inbox - it´s used in system_block_user.html and displays the number after 'inbox' and highlights the button if > 0. |
| Re: Calling external PHP to return vars - NOT in a block |
| by Dave_L on 2004/3/20 12:56:25 What is $msgcount? |
| Re: Calling external PHP to return vars - NOT in a block |
| by TerryBogard on 2004/3/20 12:38:16 still lookin for help... |