PDA

View Full Version : Few lines of code regarding moderators...


TheFlib
08-02-2001, 08:05 PM
What function would I use (or how would I define
one) where I could pass it a forum ID and it would return true if the logged in user is a moderator and false if he isn't?

Also, can someone tell me how the getforumid function works? Does it only work if you put a threadid in, or can it get a forum id from a forum name? Thanks.

Wayne Luke
08-02-2001, 08:21 PM
To check and see if someone is a moderator call the function ismoderator().

example:

if (ismoderator()) {
echo ("Woohoo, you da man");
}


To find out more about this function and the getforumid function you can review the code in admin/functions.php

TheFlib
08-03-2001, 02:27 AM
But can I say
ismoderator($forumid=1) so that I can let him
edit specifics to his forum?

JamesUS
08-03-2001, 06:30 AM
I think you just use ismoderator(1) for forumid 1, so ismoderator($forumid). Not 100% sure though