1
Jack404
Looking for a function... Any help?
  • 2004/4/8 20:39

  • Jack404

  • Just popping in

  • Posts: 56

  • Since: 2003/5/16


For a Report Post button that I'm working on for my site, I need a function that finds the uid numbers for the webmasters of the site. Is there a function already built into the XOOPS Core or in newBB (this function will only be needed in the newBB module) that would allow me to do this?

I've tried looking in some pages in the coor and newBB, but I haven't found anything yet. Thanks in advance for your help!

2
JackJ
Re: Looking for a function... Any help?
  • 2004/4/8 21:03

  • JackJ

  • Community Support Member

  • Posts: 747

  • Since: 2003/8/31


Hello Jack, you have an excellent knickname

Do you mean the XOOPS uid (user id), or the user ip number?


3
Jack404
Re: Looking for a function... Any help?
  • 2004/4/8 21:17

  • Jack404

  • Just popping in

  • Posts: 56

  • Since: 2003/5/16


Thanks Jack, you too =)

I'm looking for the user id, the number that is used on userinfo.php?uid=1 or something like that.

4
Mithrandir
Re: Looking for a function... Any help?

The "Site Info" block will display the webmasters of the site in a block - which you can set visible in forum module only.

Otherwise, try something like this:
$membership_handler =& xoops_gethandler('membership');
$members_of_webmasters_group =& $membership_handler->getObjects(new Criteria('groupid'XOOPS_GROUP_ADMIN));
foreach (
$members_of_webmasters_group as $linkid => $thismember) {
    
$webmasters[] = $thismember->getVar('uid');
}

Hereafter, you'll have an array with the uids of the webmasters.

5
Jack404
Re: Looking for a function... Any help?
  • 2004/4/8 21:48

  • Jack404

  • Just popping in

  • Posts: 56

  • Since: 2003/5/16


Ahh perfect! I needed an array of webmaster uids =)

Ideally, upon clicking the report post button, the PM Handler will send a message to each webmaster of the site with information about the reported post and the person who reported it. This is exactly what I needed, thanks!

6
Jack404
Re: Looking for a function... Any help?
  • 2004/4/8 21:58

  • Jack404

  • Just popping in

  • Posts: 56

  • Since: 2003/5/16


Bah... as soon as I stick that in, the script hates me :(

Warningxoops_gethandler(i:ffxi/kernel/membership.php): failed to open streamNo such file or directory in i:ffxiincludefunctions.php on line 505 

Fatal error
xoops_gethandler(): Failed opening required 'i:ffxi/kernel/membership.php' (include_path='.;c:php4pear'in i:ffxiincludefunctions.php on line 505


could the handler be 'member' and not 'membership' ?


EDIT: Changing the handler to 'member' seemed to clear up those, but now this is popping up:

Fatal errorCall to undefined function: getobjects() in i:ffxireport.php on line 35


Any help?

7
Jack404
Re: Looking for a function... Any help?
  • 2004/4/8 22:43

  • Jack404

  • Just popping in

  • Posts: 56

  • Since: 2003/5/16


Aha! Turns out there was a function...

$member_handler =& xoops_gethandler('member');
$webmasters $member_handler->getUsersByGroup(XOOPS_GROUP_ADMIN);


That returend an array in $webmasters of the uids!

Thanks for the help :)

Login

Who's Online

169 user(s) are online (104 user(s) are browsing Support Forums)


Members: 0


Guests: 169


more...

Donat-O-Meter

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

Latest GitHub Commits