MyBB Community Forums

Full Version: View private shouts in MyShoutbox
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
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.
Thanks
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?
This allows administrators to view all user's private shouts. Normally admins cannot view other user's private shouts.
Oh, okay, thanks!
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}')
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.
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 ?
All of them.
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')
Pages: 1 2