Solved: 7 Years, 4 Months, 1 Week ago [How To?] Stop Others Viewing Reputation Comments
#1
Solved: 7 Years, 4 Months, 1 Week 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
#2
Solved: 7 Years, 4 Months, 1 Week ago
well, it should also work in 1.8 without any issues ..
Reply
#3
Solved: 7 Years, 4 Months, 1 Week ago
(2014-09-06, 04:27 AM).m. Wrote: well, it should also work in 1.8 without any issues ..

I shall give it a try and let you know here if I have any issues.

Regards.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)