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.
It would be nice if there were events that triggered at certain points in the moderation workflow. The most pressing use case for my own purposes would be to send an email to a specific address when a user uploads an image that needs to be moderated. I'm sure other folks could come up with many other use cases that might benefit from Rules integration.
Comment | File | Size | Author |
---|---|---|---|
#9 | rules_integration_2916651_9.patch | 2.96 KB | prethiee |
#6 | interdiff.txt | 555 bytes | RedEight |
#6 | rules_integration_2916651_6.patch | 1.25 KB | RedEight |
Comments
Comment #2
RedEight CreditAttribution: RedEight at 95Visual commentedHere's a patch that should add what I need. I wasn't able to get the user account to push through right now, but I'm sure someone can figure that out.
Comment #3
RedEight CreditAttribution: RedEight at 95Visual commentedtypo in initial patch.
Comment #4
prethiee CreditAttribution: prethiee as a volunteer and commentedThanks for the request RedEight, I totally agree on integrating rules with the module. It definitely gives a leg up on the overall functionality of the module. Meanwhile, I was testing to pull through the user obj into the actions section and was able to get them show in GUI.You can switch it between either current_user or user for variables under the rules_event_info. I have included the patch, hope it can help you in any way with what you're trying to achieve.
Comment #5
RedEight CreditAttribution: RedEight at 95Visual commentedThe only note I would make is that there is no check to ensure rules is installed. Unless you wanted to implement some of this modules features in Rules, I don't think this module needs to set rules as a dependent. We should just add an
if (module_exists('rules'))
around any call torules_invoke_event
. That'll prevent a confusing white-screen for the few Drupal sites that don't use Rules.Comment #6
RedEight CreditAttribution: RedEight at 95Visual commentedLike this
Comment #7
RedEight CreditAttribution: RedEight at 95Visual commentedI think two other areas could benefit from an event.
Image Approved: with variables for the image, submitting user, and approving moderator.
Image Denied: with variables for the image, submitting user, and denying moderator.
Comment #8
prethiee CreditAttribution: prethiee as a volunteer and commentedagreed, the good old white-screen, we have all been there.
Comment #9
prethiee CreditAttribution: prethiee as a volunteer and commentedAlong with the event that is already in place, I have added a patch covering the two more scenarios you suggested and definitely see their potential to be added in the upcoming release.
Comment #11
prethiee CreditAttribution: prethiee as a volunteer and commentedThe current release has the rules integrated. Re-open this thread to suggest new use-cases.