Warning: The author of this contribution does not provide support for it anymore.

NV newspage

Not Report Founder/Admin or self in News or posts. HERE - NV newspage

Not Report Founder/Admin or self in News or posts. HERE

by PiperB » Thu Aug 17, 2017 7:14 pm

_______________

In my opinion users should never be able to report the founder of a board and they should not be able to click report on their own posts, So if you want to stop them from doing so, and remove the ability to report the founder altogether from not just the news but the posts over the entire board, then follow my edits.

Note: If you want to stop users from reporting self and admin from both the news page and also the entire forums, then you do both edits, but if you only want one or the other, then just do one of the one you want to make the change in. I'm putting both here for best measure.

For just stopping users from reporting in the news page. This is the edit.

Open: root/newspage.php
Note: The number "2" in the following edit represents the user id of the founder admin on most boards, but if your's is different or you would like to change it to someone else's user id then change it to the user id of the person you want users to not have the ability to report.
Find:

Code: Select all

		'U_REPORT'				=> ($auth->acl_get('f_report', $forum_id)) ? append_sid("{$phpbb_root_path}report.$phpEx", 'f=' . $forum_id . '&p=' . $row['post_id']) : '',
Replace with:

Code: Select all

		'U_REPORT'				=> ($auth->acl_get('f_report', $forum_id) && $poster_id != $user->data['user_id'] && $poster != ANONYMOUS && $poster_id != 2) ? append_sid("{$phpbb_root_path}report.$phpEx", 'f=' . $forum_id . '&p=' . $row['post_id']) : '',
Save the file.

If you want to stop them from being able to report the posts of the founders when viewing topics on the board, news forum and all forums, proceed.

Open: root/viewtopic.php

Find:

Code: Select all

		'U_REPORT'			=> ($auth->acl_get('f_report', $forum_id)) ? append_sid("{$phpbb_root_path}report.$phpEx", 'f=' . $forum_id . '&p=' . $row['post_id']) : '',
Replace with:

Code: Select all

		'U_REPORT'         => ($auth->acl_get('f_report', $forum_id) && $row['user_type'] == 0 && $poster_id != $user->data['user_id'] && $poster_id != ANONYMOUS) ? append_sid("{$phpbb_root_path}report.$phpEx", 'f=' . $forum_id . '&p=' . $row['post_id']) : '',
Save the file.

Done! Cheers ;)

---------------------------------------------------------------------------------------------------------------------------------------------------
Disclaimer: I decided to share my edits, fixes, addons, companion mods, e.t.c. for "wiki" type purposes and for those out there like me who are on older versions of phpbb3 still. Also for those who still have or wanted this mod to have a new feature or a fix this is for you! :)

<!-- IF U_LOVE_NOTEPAD++ -->
[td class=statement]I Notepad++ ![/td]
<!-- ENDNEVER --> <!-- tee hee --> :P
Whoa ooo whoa ooo whoa I'm a Lady!
User avatar
PiperB
Registered User
Posts: 173
Joined: Mon Nov 07, 2016 6:54 pm
Contact: