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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

RedEight created an issue. See original summary.

RedEight’s picture

Here'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.

RedEight’s picture

FileSize
1.17 KB

typo in initial patch.

prethiee’s picture

Thanks 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.

RedEight’s picture

Status: Active » Needs work

The 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 to rules_invoke_event. That'll prevent a confusing white-screen for the few Drupal sites that don't use Rules.

RedEight’s picture

Like this

RedEight’s picture

I 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.

prethiee’s picture

agreed, the good old white-screen, we have all been there.

prethiee’s picture

FileSize
2.96 KB

Along 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.

  • PertFayonner committed 187ba87 on 7.x-1.x
    Issue #2916651 by pertfayonner,redeight: Rules Integration.
    
  • PertFayonner committed 215c189 on 7.x-1.x
    Issue #2916651 by pertfayonner,redeight: Rules Integration.
    
  • PertFayonner committed 57570a2 on 7.x-1.x
    Issue #2916651 by pertfayonner,redeight: Rules Integration.
    
  • PertFayonner committed dc2280a on 7.x-1.x
    Issue #2916651 by pertfayonner,redeight: Rules Integration.
    
prethiee’s picture

Status: Needs work » Fixed

The current release has the rules integrated. Re-open this thread to suggest new use-cases.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.