PDA

View Full Version : Disable infraction link for moderators not assigned


James Birkett
07-07-2010, 02:29 PM
I want to disable the infraction link for moderators who aren't assigned to the specific section.

The plugin I'm trying to use on the postbit_display_complete hook:


if(!can_moderate($this->forum['forumid'], '', $userid)){
$show['infractionlink'] = false;
}

But this removes the infraction link even if they can moderate that specific section.

Also tried:
if(!can_moderate($this->thread['forumid'])){
$show['infractionlink'] = false;
}

TAIFUN_T
07-26-2011, 10:21 PM
https://vborg.vbsupport.ru/showthread.php?t=124125

You should add:
infraction_verify_permissions
if (!can_moderate($threadinfo['forumid']))
{
print_no_permission();