Latest Register Log In

+ Advanced Search

Limiting Moderator Actions

Limiting Moderator Actions
By
07/10/12 (Edited 03/11/14)

Suppose you have one area of your site with laxer moderation rules than the rest. Your want your moderators to be able to remove spam from that section, or do limited other things, but don't want them to do their usual level of modification. You can modify this hack to accomplish that.

Copy and paste the following code into a moderationcontrols.php file, and upload it to your /plugins/ subdirectory:
<?php
function beforemoderation($modaction, $modreason = '', $object = false)
{
if (is_object($object))
{
if ($object->objecttype == 'link' || $object-objecttype == 'post')
{
if ($object->catid && $object->catid == 9)
{
if ($modaction != 'movethread' && $modreason != 'double post' && $modreason != 'spam' && $modreason != 'using forum to post advertising messages') refuseselection("Only spam and double posts should be moderated in the feedback forum.");
}
}
}
return true;
}
?>


Make sure not to leave any spaces at the beginning or end.

The above code prevents moderators from taking any action in forum/forum #9 (in this case a Feedback forum) other than thread moves, double post deletions and spam deletions. Modify the above code to fit your exact needs by changing 9 to the appropriate forum number and the action and reason tests to the ones you need.




Description Using the beforemoderation function to stop moderators from doing certain things in certain places.
Rating
Views 215 views. Averaging 0 views per day.