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



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
4 + 6 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
   

Re: Need help with a code
by deka87 on 2010/4/28 7:09:44

le="color: #000000"><?php global $xoopsDB;


you made my day, zyspec! notifications on my website now respect user groups thanks!
Re: Need help with a code
by zyspec on 2010/4/27 20:41:35

There's a couple of possibilities depending on where this code is being placed...

1) near the top of the file add the following line:
le="color: #000000"><?php global $xoopsDB;


OR

2) everywhere you see
le="color: #000000"><?php $xoopsDB
replace it with
le="color: #000000"><?php $GLOBALS['xoopsDB']


If neither of these work, like if you're trying this in a custom page, etc. then it could be a little more involved... but I'd try one of the above methods first.
Need help with a code
by deka87 on 2010/4/27 19:06:43

hi guys,

i've got a notifications hack which doesn't work giving a blank page. here is the part of it:

le="color: #000000"><?php //notifications hack ... $uids = array(); $sql = "SELECT DISTINCT uid FROM ".$xoopsDB->prefix("groups_users_link")." WHERE groupid = 6"; $result = $xoopsDB->query($sql); while($row = $xoopsDB->fetchArray($result)) { $uids[] = $row['uid']; } ...


the debug says

le="color: #000000"><?php Notice: Undefined variable: xoopsDB in file /modules/catads/admin/adsmod.php line 159


the 159 line is

le="color: #000000"><?php $sql = "SELECT DISTINCT uid FROM ".$xoopsDB->prefix("groups_users_link")." WHERE groupid = 6"; $result = $xoopsDB->query($sql);


any idea how to fix this?

thanks in advance!

Who's Online

191 user(s) are online (146 user(s) are browsing Support Forums)


Members: 0


Guests: 191


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