MyBB Community Forums

Full Version: How do I make this?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How do I make that my global mods or any other custom usergroups can remove any reputation along the forum?


Thanks.
Global Mods already have this power.
Just give your custom usergroups the Can Delete Any Reputation or similar power.
Just give them powers to delete reputations by editing their group settings in ACP then edit the following;

If you want to allow selective groups to "delete" other's reputations, Open ./reputations.php and find;
		// Does the current user have permission to delete this reputation? Show delete link
		if($mybb->usergroup['cancp'] == 1 || $mybb->usergroup['issupermod'] == 1 || ($mybb->usergroup['cangivereputations'] == 1 && $reputation_vote['adduid'] == $mybb->user['uid'] && $mybb->user['uid'] != 0))
		{
			$delete_link = "[<a href=\"reputation.php?action=delete&amp;uid={$reputation_vote['rated_uid']}&amp;rid={$reputation_vote['rid']}\" onclick=\"MyBB.deleteReputation({$reputation_vote['rated_uid']}, {$reputation_vote['rid']}); return false;\">{$lang->delete_vote}</a>]";
		}

and replace it with the following;
		if(in_array($mybb->user['usergroup'],array(1,2,3)) || $mybb->usergroup['cancp'] == 1 || $mybb->usergroup['issupermod'] == 1 || ($mybb->usergroup['cangivereputations'] == 1 && $reputation_vote['adduid'] == $mybb->user['uid'] && $mybb->user['uid'] != 0))
		{
			$delete_link = "[<a href=\"reputation.php?action=delete&amp;uid={$reputation_vote['rated_uid']}&amp;rid={$reputation_vote['rid']}\" onclick=\"MyBB.deleteReputation({$reputation_vote['rated_uid']}, {$reputation_vote['rid']}); return false;\">{$lang->delete_vote}</a>]";
		}

Now edit 1,2,3, with the desired groups you want them to give permissions in order to delete other's reputations. Wink
Thanks.