Repository navigation
Conversation
…_vars Add an event to messenger_base::notify_using_messenger(), fired for each queued notification just before its template variables are assigned to the email. A listener can add or change template_vars, for example to show extra data in its own copy of a core notification email template (see core.messenger_template_paths, PHPBB-17722 and PHPBB-17750). The dispatcher is read from the global $phpbb_dispatcher, so the constructors of the email and jabber notification methods stay the same. PHPBB-17751
4 tasks done
|
The attempt to merge branch
A separate PR will be needed to merge |
bonelifer
added a commit
to phpbbmodders/ban-hammer
that referenced
this pull request
Oct 20, 2026
The request text for core.notification_method_messenger_modify_template_vars, filed as PHPBB-17751 with core PRs phpbb/phpbb#7099 (3.3.x) and #7100 (master). It pairs with the email template override request already in docs/events/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist:
Tracker ticket:
https://tracker.phpbb.com/browse/PHPBB-17751
Adds
core.notification_method_messenger_modify_template_varstomessenger_base::notify_using_messenger(). It fires for each queued notification just before the template variables are assigned to the email, withnotificationanduser(read-only) andtemplate_vars(modifiable). A listener can add its own variables to a core notification email.This is the companion to
core.messenger_template_paths(#7054 for master, #7098 for 3.3): that event lets an extension supply its own copy of a core email template, and this one gives that copy new data to show.The dispatcher comes from the global
$phpbb_dispatcher, so the constructors of theemailandjabbernotification methods do not change.The new
tests/notification/notification_method_messenger_base_test.phpsends one notification through the real messenger and checks that a variable added by a listener reaches the email template. Without the event the test fails.The code around this spot differs on master, so this does not merge up cleanly. The master version is in #7100.
Investigated and written by Claude on behalf of William Jacoby (bonelifer).