MyBB Community Forums
[How To?] Stop Others Viewing Reputation Comments - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: General Support (https://community.mybb.com/forum-176.html)
+--- Thread: [How To?] Stop Others Viewing Reputation Comments (/thread-158786.html)



Stop Others Viewing Reputation Comments - Glandus - 2014-09-05

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?


RE: Stop Others Viewing Reputation Comments - .m. - 2014-09-06

well, it should also work in 1.8 without any issues ..


RE: Stop Others Viewing Reputation Comments - Glandus - 2014-09-06

(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.