-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
3.3.20-RC1
-
None
Location:
includes/functions_messenger.php, messenger::template(), just before
set_template_paths() is called.
Purpose:
Let an enabled extension supply its own copy of a core notification email
template (e.g. language/en/email/post_in_queue.txt), so it can customize
the rendered content of a core notification without patching core or
duplicating the whole notification type.
Use case:
This is the 3.3.x version of PHPBB-17722, which added
core.messenger_template_paths to master for 4.0.0-b1
(https://github.com/phpbb/phpbb/pull/7054). On 3.3 the messenger is still
the legacy messenger class, so 3.3 boards do not have the event.
The request comes from adding the recipient's email address to the
post_in_queue approval email. Extensions can already add data through
get_email_template_variables(), but nothing looks for email templates in
an extension's own directory, so the email body has no way to use that
data. core.notification_message_email only allows editing the finished
subject/message text, which is not a substitute for a template.
Variables:
- template_lang (string, read-only): language being resolved
- template_dir_prefix (string, read-only): template subdirectory prefix
- template_paths (array, modifiable): filesystem paths searched for the
template file; a listener adds its own extension-owned directory here
The event name, variables and docblock match the master version.

