WSN
Username: Password:
Register / Forgot Password
Details Print Rate Report E-Mail
Limiting Moderator Actions
Limiting Moderator Actions
By
07/10/12

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 == 'comment')
{
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 category/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.


0/5 based on 0 votes. The median rating is 0.

Views: 45 views. Averaging 0 views per day.

Previous Article | Next Article

Features Showcase Purchase Services Resources Support