Solved: 7 Years, 9 Months, 2 Weeks ago [How To?] Stop Others Viewing Reputation Comments
#1
Solved: 7 Years, 9 Months, 2 Weeks ago
I don't mind people viewing how many reputation points another member has, but I was wondering if there was a way to stop people viewing other members reputation comments. I'd like it so only administrators or super moderators could view reputation comments aswell as the member who received the reputation and comment. If I use the below code, will this work in 1.8:

Open reputation.php:

Below
    // If we don't have any reputations display a nice message.
    if(!$reputation_votes)
    {
        eval("\$reputation_votes = \"".$templates->get("reputation_no_votes")."\";");
    } 

Add
if($mybb->usergroup['cancp'] != "yes" && $mybb->user['uid'] != $mybb->input['uid'])
{
    $reputation_votes = '<tr>
    <td class="trow1" style="text-align: center;">You are not allowed to view comments.</td>
</tr>';
    $multipage = '';
} 

This code worked in 1.6, but I was wondering if it's OK to use in 1.8. If I use this code, would this allow only administrators, super moderators and the member themselves view reputation comments?
Reply


Messages In This Thread
Stop Others Viewing Reputation Comments - by Glandus - 2014-09-05, 08:59 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)