Create a very basic user loader class to handle querying/storing
user data in a centralized location.
Use DIC collection service for notification types/methods.
Cleanup unused dependencies.
Fix some other issues.
PHPBB3-11103
disable_notifications
This should be called when an extension which has notification types
is disabled so that all those notifications are hidden and do not
cause errors
enable_notifications
This should be called when an extension which has notification types
that was disabled is re-enabled so that all those notifications that
were hidden are shown again
PHPBB3-11103
Now, if there is no row for the user in the user_notifications table,
the user will receive basic notifications. If the user wishes to not
receive notifications, a row must be added with notify = 0.
For other methods besides the basic (e.g. email, jabber) a row must
still be added with notify = 1 for them to receive notifications
PHPBB3-11103
If you're following along and would like to update your DB, you can run
the following queries to do so:
ALTER TABLE phpbb_notifications CHANGE `is_disabled` `is_enabled`
TINYINT( 1 ) NOT NULL DEFAULT '1';
UPDATE `phpbb_notifications` SET is_enabled = 1;
PHPBB3-11103
How do we do this? If an item is unread, the URL to view that item will
be the URL to mark it as read (index.php?mark_notification=$id). When the
URL is visited it marks the item as read and redirects them to the correct
URL for the item.
If the item is read, the URL is directly to the item.
Prettify the html output
PHPBB-11103
EXTENSION AUTHORS TAKE NOTE! This is to prevent errors with notifications
from extensions!
Set is_disabled to 1 for all your notifications when your extension is
disabled so they are ignored and do not cause errors.
When your extension is enabled again, set is_disabled to 0 and your
notifications will be working again.
PHPBB3-11103
From a recent change, when your posts/topics are approved, they will be
marked read automatically because you've read the topic/post already.
To change that I've forced the notification to be marked unread and
attempted to reset the read status on the post/topic to be unread before
the post that was approved.
This does not seem to work so well and I don't know of any way this can
really be properly fixed, so the code I was working on I've commented out.
For now, users will just need to manually mark these types of notifications
as read. I cannot think of a way for this to be fixed without running
two additional queries on every viewtopic.
PHPBB3-11103
Mark post/topic in queue notifications read when visiting mcp
Change post/topic in queue notification url to use MCP.
Fix the bug:
Approving a topic marks the topic as read, but before the notification
is created for the user approving the topic (if they would get a
notification that the topic has been made). This causes it to be
stuck "unread".
PHPBB3-11103