Scheduled Maintenance: 10-11-2025 Electricity company maintenance between 09:00 and 15:00.

3.2.x 3.2.x SnippetsRead members pm's

Snippets
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

Topic Author
martin
Admin
Admin
Status: Offline
User theme: Dark
Posts: 5106
Joined: Apr 6th, '14, 14:12
    Windows 10 Chrome

Read members pm's

Post by martin »

Updated to work on phpbb 3.2 rc versions

Some ppl do not agree with this sort of code so i recommend you use this on your localhost for testing only
320.png
Open /language/en/common.php
Find This may be a partial find and not the whole line

Code: Select all

'READ_PROFILE'            => 'Profile',
Add after Add these lines on a new blank line after the preceding line(s) to find

Code: Select all

'READ_PM'                   => 'Read this pm',
Open styles/prosilver/template/Navbar_header.html

Code: Select all

<!-- IF S_USERNAME eq "YOUR_USER_NAME_HERE" -->
<li data-last-responsive="true">
				<a href="./view.php" title="pm" role="menuitem">
					<i class="icon fa fa-eye" aria-hidden="true"></i><span>pm</span>
				</a>
			</li>
			<!-- ENDIF -->


YOU MUST have the user id of 2 if not you can change it in the view.php also the path if needed here ./view.php


The code in the files above is set for user id so only the board owner user id 2 can access the data if you want to allow all founders access then find and change this in the view.php
Find This may be a partial find and not the whole line

Code: Select all

If ($user->data[’user_id’] != ’2’) {
Replace with Replace the preceding lines with the following

Code: Select all

If ($user->data[’user_type’] != USER_FOUNDER) {
You do not have the required permissions to view the files attached to this post! Maybe your post count is too low.
Image

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

lopoto
Users
Users
Status: Offline
User theme: Dark
Posts: 73
Joined: Dec 28th, '14, 00:59
    Windows 10 Firefox

Re: Read members pm's

Post by lopoto »

You are not authorized to access this area. :eyes2:

and working before on 3.1.10 :eusa_dance:

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

Topic Author
martin
Admin
Admin
Status: Offline
User theme: Dark
Posts: 5106
Joined: Apr 6th, '14, 14:12
    Windows 10 Chrome

Re: Read members pm's

Post by martin »

Now 3.2 is released out of rc version i have updated this so it is now fully working on 3.2 with better styling.
1.png
2.png
I will update the first post very soon.
You do not have the required permissions to view the files attached to this post! Maybe your post count is too low.

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

Topic Author
martin
Admin
Admin
Status: Offline
User theme: Dark
Posts: 5106
Joined: Apr 6th, '14, 14:12
    Windows 10 Chrome

Re: Read members pm's

Post by martin »

This is now in ext form and will be released soon.

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

dmzx
Founder
Founder
Status: Offline
User theme: Dark
Posts: 6469
Joined: Jan 13th, '14, 20:45
    Windows 10 Chrome

Re: Read members pm's

Post by dmzx »

martin wrote: Jan 19th, '17, 22:03 This is now in ext form and will be released soon.
See Read Members PM 3.2.x

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

bcurran3
Users
Users
Status: Offline
User theme: Dark
Posts: 48
Joined: Sep 13th, '15, 02:52
    Windows 10 Chrome

Re: Read members pm's

Post by bcurran3 »

Great work as always. Love it.

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

miri4ever
Users
Users
Status: Offline
User theme: Dark
Posts: 71
Joined: Jan 22nd, '17, 14:39
    Windows 10 Opera

Re: Read members pm's

Post by miri4ever »

I don't like the link inside the forum header. Too many things getting there. I think inside the personal dropdown menu where the profile is shown or and module inside ACP for getting access. Ins't this much better ?

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

Topic Author
martin
Admin
Admin
Status: Offline
User theme: Dark
Posts: 5106
Joined: Apr 6th, '14, 14:12
    Windows 10 Chrome

Re: Read members pm's

Post by martin »

No

Some users have a lot in the navbar some have nothing so who do you please ?

I have a lot so quick linked the lot.
1.png
You do not have the required permissions to view the files attached to this post! Maybe your post count is too low.

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

iorG19
Translators
Translators
Status: Offline
User theme: Dark
Posts: 60
Joined: Dec 10th, '14, 20:50
    Windows 10 Chrome

Re: Read members pm's

Post by iorG19 »

martin wrote: Jan 23rd, '17, 17:24 No

Some users have a lot in the navbar some have nothing so who do you please ?

I have a lot so quick linked the lot.
1.png
is this legal ? :oops: :lol: :lol:
Image Some [romanian] and [spanish] translations of extensions.

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

Topic Author
martin
Admin
Admin
Status: Offline
User theme: Dark
Posts: 5106
Joined: Apr 6th, '14, 14:12
    Windows 10 Chrome

Re: Read members pm's

Post by martin »

Yes why would it not be ?

As Founder you have access to every pm even with out a ext :rolling: there stored in the database ready to be seen.

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

iorG19
Translators
Translators
Status: Offline
User theme: Dark
Posts: 60
Joined: Dec 10th, '14, 20:50
    Windows 10 Chrome

Re: Read members pm's

Post by iorG19 »

martin wrote: Jan 23rd, '17, 17:29 Yes why would it not be ?

As Founder you have access to every pm even with out a ext :rolling: there stored in the database ready to be seen.
so if i open a pm here and i organize with dmzx to violate you; you will see the pm ???

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

Topic Author
martin
Admin
Admin
Status: Offline
User theme: Dark
Posts: 5106
Joined: Apr 6th, '14, 14:12
    Windows 10 Chrome

Re: Read members pm's

Post by martin »

No the only person who has access to read the pm's is the board creator and no one else.

Edit i did not check out the link yes the board owner is the only person who can read a pm but as i said you dont need a ext to do this any way the ext just makes it a little better to read.

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

iorG19
Translators
Translators
Status: Offline
User theme: Dark
Posts: 60
Joined: Dec 10th, '14, 20:50
    Windows 10 Chrome

Re: Read members pm's

Post by iorG19 »

martin wrote: Jan 23rd, '17, 17:45 ...
yes the board owner is the only person who can read a pm but as i said you dont need a ext to do this any way the ext just makes it a little better to read.
Yes i understand, i was joking :) I was saying violate you with dmzx , to waiting an aswer about that; :lol: ...

In xenforo there's a similar addon who makes that; also are other who can login with a another username. Same as phpBB

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

Topic Author
martin
Admin
Admin
Status: Offline
User theme: Dark
Posts: 5106
Joined: Apr 6th, '14, 14:12
    Windows 10 Chrome

Re: Read members pm's

Post by martin »

Dude free to violate me any time there is no rules on mine it's a rule free site :rolling:

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/src/Template.php on line 359: Array to string conversion
Array

iorG19
Translators
Translators
Status: Offline
User theme: Dark
Posts: 60
Joined: Dec 10th, '14, 20:50
    Windows 10 Chrome

Re: Read members pm's

Post by iorG19 »

Cheers to that! :buigen: :rolling: