Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
there is currently no way for another plugin to be used by the same rules integration that comes with message_notify because the plugin to be used is hardcoded:
message_notify_send_message($message, $options, 'email');
This probably should be configurable by UI to support additional plugins/ backends.
Comment | File | Size | Author |
---|---|---|---|
#9 | plugin_definition_in-2269277-9.patch | 4.37 KB | subhojit777 |
#2 | rules-support-for-all-notifiers-2269277-2.patch | 6.88 KB | thsutton |
Comments
Comment #1
thsutton CreditAttribution: thsutton commentedI've attached a patch for almost-finished support for all notifier plugins. This removes the single "send-message-via-email" action and instead provides an action for each plugin.
Each action allows the user to select the text field to store each view mode defined by that plugin.
Remaining work:
If I finish these items off, is there any particular reason that this wouldn't get committed?
Comment #2
thsutton CreditAttribution: thsutton commentedThe attached patch resolves the "find a better way to pass the plugin ID through to the process callback".
It also does something toward "handle plugin options properly" too: the default options defined by the plugin are now used, but there is still no way to actually configure plugin-specific options as part of the action (except the 'mail' option for the 'email' plugin; which remains hard coded).
Comment #4
subhojit777Plugins will provide multiple options and they will be different from other. Handling them together will be quite difficult. I was thinking that there will be a select list where user will select desired plugin (email, sms, digest_week, digest_day, etc.), and upon selecting any plugin options will be seen by altering form states.
However, this can easily be overcome by
hook_entity_insert()
, although the solution will not be generic.Comment #5
subhojit777Besides patch in #2 does not work in 7.x-2.5 release. The patch was not applying cleanly. I applied the patch on latest dev release of the module, and replaced
message_notify.rules.inc
with stable release's rules file. As a result the action configuration was not appearing, there was only a Save button and nothing else.Comment #6
subhojit777This patch simply provides a select list of available message notify plugins. Options based on selected plugin is not available in this patch. Please have a look.
Comment #7
subhojit777Patch in #6 is a complete rewrite of #2
Comment #8
subhojit777Unnecessary comment removed
Comment #9
subhojit777Some minor comment and description changes.
Unnecessary function removed.
Comment #10
bluegeek9 CreditAttribution: bluegeek9 as a volunteer commented