MyBB Community Forums
View private shouts in MyShoutbox - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Resources (https://community.mybb.com/forum-8.html)
+--- Forum: Tutorials (https://community.mybb.com/forum-38.html)
+--- Thread: View private shouts in MyShoutbox (/thread-97788.html)

Pages: 1 2


View private shouts in MyShoutbox - Paul H. - 2011-07-01

Tutorial by: PJGIH/Darth Stabro
http://wb-dev.net

Open inc/plugins/myshoutbox.php


Search for
if ($mybb->user['uid'] == intval($userID) || $mybb->user['uid'] == $row['uid'])

It should be around line 815.

If you want ONLY YOU to see the private shouts, replace the above line with this

if ($mybb->user['uid'] == intval($userID) || $mybb->user['uid'] == $row['uid'] || $mybb->user['uid'] == '{your UID}')

Replace {your UID} your UID, obviously.

If you want all administrators to see private shouts, replace it with this:

if ($mybb->user['uid'] == intval($userID) || $mybb->user['uid'] == $row['uid'] || $mybb->usergroup['cancp'] == 1)

If you want all super moderators to see private shouts, replace it with this:

if ($mybb->user['uid'] == intval($userID) || $mybb->user['uid'] == $row['uid'] || $mybb->usergroup['issupermod'])


To view private shouts, click "View Full Shout Box".


Tada!


Note: Be sure to let your users know you can do this, or they may complain about privacy issues.



RE: View private shouts in MyShoutbox - sunjava1 - 2011-07-02

Thanks


RE: View private shouts in MyShoutbox - mbw227 - 2011-07-05

Wait, I'm a bit confused as to what it does. Can you insert images showing how it's different from the current Private Shouts system?


RE: View private shouts in MyShoutbox - Paul H. - 2011-07-05

This allows administrators to view all user's private shouts. Normally admins cannot view other user's private shouts.


RE: View private shouts in MyShoutbox - mbw227 - 2011-07-06

Oh, okay, thanks!


RE: View private shouts in MyShoutbox - Marks-Mans - 2012-08-18

sorry i want to ask a simple question what do u mean with {your UID}

You Mean To Put My Username Or My Id for example 1

for example if my id was

example.com/user-1.html

So I Put 1 ?

So it will be

if ($mybb->user['uid'] == intval($userID) || $mybb->user['uid'] == $row['uid'] || $mybb->user['uid'] == '{1}')



RE: View private shouts in MyShoutbox - faviouz - 2012-08-18

UID, yes. But it will end up being:

if ($mybb->user['uid'] == intval($userID) || $mybb->user['uid'] == $row['uid'] || $mybb->user['uid'] == '1')

No curly braces.


RE: View private shouts in MyShoutbox - Marks-Mans - 2012-08-18

i am searching for

if ($mybb->user['uid'] == intval($userID) || $mybb->user['uid'] == $row['uid'])

but i found 3 can u tell me which line exactly

one on line 835
and second on line 700
and third on line 993

which one should i replace ?


RE: View private shouts in MyShoutbox - Paul H. - 2012-08-18

All of them.


RE: View private shouts in MyShoutbox - Marks-Mans - 2012-08-18

So I Should Change all of
if ($mybb->user['uid'] == intval($userID) || $mybb->user['uid'] == $row['uid'])

to

if ($mybb->user['uid'] == intval($userID) || $mybb->user['uid'] == $row['uid'] || $mybb->user['uid'] == '1')