View private shouts in MyShoutbox
#1
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.
-Paul H.

Cogisne lingua latina?
Reply
#2
Thanks
www.vubscs.com ( A new way of Mybb)
Reply
#3
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?
Reply
#4
This allows administrators to view all user's private shouts. Normally admins cannot view other user's private shouts.
-Paul H.

Cogisne lingua latina?
Reply
#5
Oh, okay, thanks!
Reply
#6
This user has been denied support. This user has been denied support.
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}')
Reply
#7
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.
Reply
#8
This user has been denied support. This user has been denied support.
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 ?
Reply
#9
All of them.
-Paul H.

Cogisne lingua latina?
Reply
#10
This user has been denied support. This user has been denied support.
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')
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)