Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
8 - 3 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
     
[/code] then it works okay, but how can I return $msgcount ??? Please Note: I really need this to work from a single php-file (http://myXoopsUrl/test.php), neither in a block nor elsewhere inside xoops. It that possible ?[/quote]" />

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...

Who's Online

371 user(s) are online (279 user(s) are browsing Support Forums)


Members: 0


Guests: 371


more...

Donat-O-Meter

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

Latest GitHub Commits