The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
IF user can moderate here
I know that I can use can_moderate() to find out if a user can moderate at all but how I can I check if they can moderate in forum x?
Would be great if there is something like: PHP Code:
Sorry for the bump but I really need this for an awesome mod |
#2
|
|||
|
|||
Bump?
|
#3
|
|||
|
|||
can_moderate($forumid = 0, $do = '', $userid = -1, $usergroupids = '');
Code:
$forumid int Specific forum to check. If not set, will check whether the user is a moderator of any forum at all. $do string Specific mod action to check. If not set, will check whether the user is a moderator of the forum specified in $forumid. $userid int User ID to check. If not set, will use $vbulletin->userinfo. $usergroupids string List of group IDs, separate by commas, to which the user belongs. Should be generally left blank. |
#4
|
|||
|
|||
It has overloads right? So this will work?
PHP Code:
|
#5
|
|||
|
|||
Overloads? No.
If you want to check more then 1 forum you'll have to repeat the function call for each one. |
#6
|
|||
|
|||
Okay thanks just one more thing.
What can I put in $do? Is there a list of things you can provide? e.g. how would I check if the user can open threads? |
#7
|
|||
|
|||
Quote:
You can read up on them here: https://vborg.vbsupport.ru/showthread.php?t=166940 |
#8
|
|||
|
|||
Thanks, I've checked that out.
|
#9
|
|||
|
|||
Theres a "list" so to speak in '/includes/xml/bitfields_vbulletin.xml'
They'll be listed under "ugp" > "forumpermissions" and "misc" > "moderatorpermissions". You'll be interested in the name attribute. |
#10
|
|||
|
|||
Thanks very much!
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|