[RFC|Merged] notification box

These requests for comments/change have lead to an implemented feature that has been successfully merged into the 3.1/Ascraeus branch. Everything listed in this forum will be available in phpBB 3.1.
Post Reply
User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: [RFC] notification box

Post by EXreaction »

Corrected them all in the UCP, they cannot see them anymore if they are disabled or do not have permission.
User avatar
oddfish
Registered User
Posts: 110
Joined: Tue Mar 27, 2007 5:53 am
Location: on my way home
Contact:

Re: [RFC] notification box

Post by oddfish »

Much betterer.

If you do not mark Someone sends you a private message, you are not advised of (x new message/s).
When there are no notifications, pagination shows in Manage notifications.
Is there a way to clear notifications from Manage notifications as Admin? A quick test shows Global Moderator notifications clear automatically (i.e. when approving topic/posts) but Admin regardless of who approves retain all notification approvals required (unread) and pm's. Will revisit this when I have more time.
User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: [RFC] notification box

Post by EXreaction »

Yes, you are not notified of new private messages if you don't select the notify option.

I don't think it's too important that pagination shows without any notifications, it doesn't look much better if it is not showing.

The notifications should be deleted for all users, if you can give me instructions on how to reproduce a situation where the approve/report notifications are not being removed after it is handled, please let me know so I can try to figure it out.
User avatar
oddfish
Registered User
Posts: 110
Joined: Tue Mar 27, 2007 5:53 am
Location: on my way home
Contact:

Re: [RFC] notification box

Post by oddfish »

With pm notification not enabled by default, how do users know they have new pm's and with <!-- IF not S_NOTIFICATIONS_DISPLAY and S_DISPLAY_PM --> (<a href="{U_PRIVATEMSGS}">{PRIVATE_MESSAGE_INFO}<!-- IF PRIVATE_MESSAGE_INFO_UNREAD -->, {PRIVATE_MESSAGE_INFO_UNREAD}<!-- ENDIF --></a>)<!-- ENDIF --> still there, would you expect something to work?

EDIT: It takes setting ACP -> General > Server Configuration > General options .. Display Notifications to NO to see this: (0 new messages, 1 unread message). I need to see this without changing an ACP setting when notification of pm's is not set in the UCP.

No other UCP template I'm aware of shows pagination with nothing to show (although I see one in the MCP).

Reproducing this situation is probably best done from a test setup. I'll send you the files.
User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: [RFC] notification box

Post by EXreaction »

Things have been pretty busy again lately so I'm not sure when I'll have a chance to work on this again.

I'm not sure what you're trying to ask about PMs. Do you want that messages section shown in the header always?
User avatar
oddfish
Registered User
Posts: 110
Joined: Tue Mar 27, 2007 5:53 am
Location: on my way home
Contact:

Re: [RFC] notification box

Post by oddfish »

EXreaction wrote:Do you want that messages section shown in the header always?
Why do that? Correcting what you have will suffice.
oddfish wrote:With pm notification not enabled by default, how do users know they have new pm's ...
It takes setting ACP -> General > Server Configuration > General options .. Display Notifications to NO to see this: (0 new messages, 1 unread message). I need to see this without changing an ACP setting when notification of pm's is not set in the UCP.
User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: [RFC] notification box

Post by EXreaction »

I'm not sure what you want me to correct then?
User avatar
oddfish
Registered User
Posts: 110
Joined: Tue Mar 27, 2007 5:53 am
Location: on my way home
Contact:

Re: [RFC] notification box

Post by oddfish »

No message header displayed when new pm or unread after a fresh install.
User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: [RFC] notification box

Post by EXreaction »

Do you mean because of the default settings? I am changing it now to default to give notifications.

On that issue of changing it to default to give notifications, I'm having an issue with an SQL join I cannot figure out if anyone would like to help.

Code: Select all

phpbb_users
user_id
1
2
3

phpbb_user_notifications
user_id		type		method			notify
1			1			''				1
1			1			'email'			1
2			1			''				0
3			7			''				1
3			7			'email'			1

Current query:
SELECT u.user_id, un.type un.method
	FROM phpbb_users u 
	LEFT JOIN phpbb_user_notifications un ON un.user_id = u.user_id
	WHERE (un.item_type = 1 OR un.item_type IS NULL)
		AND (un.notify = 1 OR un.notify IS NULL)

desired results (notify <> 0)
user_id		type		method
1			1			''
1			1			'email'
3			NULL		NULL
With the above, I do not get the third user (it trips up because of type 7 rows in the phpbb_user_notifications table, if those do not exist it seems to work fine)
Oleg
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am
Contact:

Re: [RFC] notification box

Post by Oleg »

You need to add where conditions to the join.

What happens is the join is done first. With the query as written you get rows with type=7 joined onto users. Because rows in notifications matched you don't get a row in the "combined intermediate temporary table" for user id of 1 with null entries in the notification columns.

Then where conditions are applied and type=7 rows are removed.

To fix, you need to make sure that undesired rows are not joined in the first place.
Post Reply