3.1.x SnippetsRead your members pm's

Snippets
User avatar

Anuj Dhawan
Users
Users
Status: Offline
User theme: Dark
Posts: 109
Joined: Aug 31st, '15, 08:32
    Android Chrome

Re: Read your members pm's

Post by Anuj Dhawan »

cherry wrote: Aug 25th, '16, 13:42 a really nice snippet. :wave:
Can you maybe one option offer to delete individual PM's?
If times wirklch what mistrusted is in content.

LG cherry
Why in the heaven you would want to delete someone else's private chat!? I wonder!

[ Post made via Android ] Image
User avatar

cherry
Users
Users
Status: Offline
User theme: Dark
Posts: 3
Joined: Jan 14th, '16, 15:08
    Windows 7 Firefox

Re: Read your members pm's

Post by cherry »

Anuj Dhawan wrote: Aug 25th, '16, 14:03
cherry wrote: Aug 25th, '16, 13:42 a really nice snippet. :wave:
Can you maybe one option offer to delete individual PM's?
If times wirklch what mistrusted is in content.

LG cherry
Why in the heaven you would want to delete someone else's private chat!? I wonder!

[ Post made via Android ] Image
It was just a question regarding the option Yes or No ; )
User avatar

davidmccl2
Users
Users
Status: Offline
User theme: Dark
Posts: 40
Joined: Feb 21st, '16, 01:00
    Android Chrome

Re: Read your members pm's

Post by davidmccl2 »

Cool
Image
User avatar

narvaduen
Users
Users
Status: Offline
User theme: Dark
Posts: 3
Joined: Nov 17th, '16, 11:23
    Windows 10 Firefox

Re: Read your members pm's

Post by narvaduen »

Just thought I'd report that this works flawlessly on a 3.1.8 board I run. (And I even changed the user ID to my own ID.)

Great coding. :)
User avatar

martin
Admin
Admin
Status: Offline
User theme: Dark
Posts: 5060
Joined: Apr 6th, '14, 14:12
    Ubuntu Chrome

Re: Read your members pm's

Post by martin »

:tumbsyes: i have it working on 3.2 also now.
User avatar

narvaduen
Users
Users
Status: Offline
User theme: Dark
Posts: 3
Joined: Nov 17th, '16, 11:23
    Windows 10 Firefox

Re: Read your members pm's

Post by narvaduen »

I can get this working for me, going by my user_id number on the forum.

But I'd like to create a "Supers" group, and have everyone in that group (hidden group) be able to see the PMs.

So far I've had no luck, but I might be using the wrong variable.

Should it be a group_name or group_id? I'm at a loss. I don't want to get into the whole Founder group stuff, I want a totally new group, just don't know how to declare it in the view.php, any help?
User avatar

martin
Admin
Admin
Status: Offline
User theme: Dark
Posts: 5060
Joined: Apr 6th, '14, 14:12
    Ubuntu Chrome

Re: Read your members pm's

Post by martin »

Did you try replacing

Code: Select all

If ($user->data[’user_id’] != ’2’) {
with

Code: Select all

If ($user->data[’group_id’] != ’52’) {
52 is an exaple.
User avatar

narvaduen
Users
Users
Status: Offline
User theme: Dark
Posts: 3
Joined: Nov 17th, '16, 11:23
    Windows 10 Firefox

Re: Read your members pm's

Post by narvaduen »

Sure did, Martin...And I tried again just now using EXACTLY your syntax...I got the group_id from the link displayed when you hover over the groups "settings" link in the acp on the "Manage Groups" page.

(In this case, it was 64.)

Making this change to group id immediately gives me the Unauthorized, IP has been logged error message. This immediately goes away as soon as I change it back to my specific user_id. I'm on 3.1.8, if that makes any difference at all. And this group 64 is a group I created and made myself leader of, it is not a default group.

There is only myself and one other in the new group. (I even purge the cache, just to be safe.)
User avatar

JohnnyBigspuds
Users
Users
Status: Offline
User theme: Dark
Posts: 1
Joined: Nov 28th, '17, 23:29
    Windows 7 Chrome

Re: Read your members pm's

Post by JohnnyBigspuds »

I have installed this and am testing it on prosilver and its working

the view.php file is in the root where the config.php is.

i have made the edits and am running on 3.1.11

Is it possible to use this with my forumbook template based on prosilver?
as it doesnt show on my forumbook template which is what i use all the time

Thanks guys