In our sites, we typically have a moderator who manages the spam.

In the current code, the email notifications only go to user 1, who really has nothing to do with the editorial policy. So I'm adding the ability to specify a different user to get email notices about spam.

Would you be interested in incorporating this code into the module? I'd be glad to provide it as a patch when it's done and tested. (And if there are desirable design considerations, I'd be glad to hear them)

CommentFileSizeAuthor
#1 useradmin.5.x-1.1-2.patch2.03 KBKarl DeBisschop

Comments

Karl DeBisschop’s picture

StatusFileSize
new2.03 KB

I'm adding a patch that works against the current version. I see from other posts that you're only accepting patches against 5.x-3.x so I'll need to repeat the work. Will you accept patches against the posted DEV snapshot or do I need to check out from CVS? (I cannot get CVS through the firewall here, so I'll need to do some setup work if the latter)

The approach I've taken is to allow an alternate user name to be specified. This has a few problems:

- I do not check at the time of entry that the user exists. I can add that code, it only just occurred to me now.
- I should use auto-completion of username to help avoid those errors in the first place. I'll need to do some research to find out how that is done.
- You can only specify one alternate user. that's a limitation.
- It seems in some sense that all those users that specified with spam admin privileges should be sort of easy to specify here.

Maybe, instead of a text field, there should be a set of radio boxes allowing you to select any/all of those users that can admin spam as possible email targets.

Karl DeBisschop’s picture

It looks like 5.x-3.x development is taking place in the DRUPAL-5--3 branch. There is currently no provision for notifying site admins about posts marked as spam, so the changes cannot be applied to that branch, as far as I can see.

jeremy’s picture

The plan for the 3.x version of the spam module is to integrate it with the actions module. You could then define actions to do anything you like, including mailing all users in a given role, etc. As actions functionality is now part of Drupal 6, it makes sense to start supporting it now in the 5.x version.

If you want to get involved in that, I believe integration will need to happen at spam_mark_as_spam() and spam_mark_as_not_spam().

I'm on vacation through the end of the year, so my replies may be sporadic.

Karl DeBisschop’s picture

Thanks for confirming the lay of the land. I'll need to look into how coding to integrate with the actions module, then I'll see what I can do.

jeremy’s picture

Version: 5.x-1.1-2 » 5.x-3.x-dev

Updating issue version. Patches to integrate the 3.x version of the spam module with the actions module would be very much appreciated.

jeremy’s picture

Status: Active » Postponed

Issue postponed until spam module is integrated with actions module. Please re-open with patches.

jeremy’s picture

Status: Postponed » Closed (won't fix)

Sorry, this won't be happening in the 5.x-3.x version of the module. It will happen in the 6.x branch, however -- upgrading to Drupal 6 is highly recommended.

This feature will be implemented here:
#448412: Actions integration for Spam module

gnassar’s picture

Was about to reassign this to 6.x and reopen -- this wouldn't actually be handled by Actions integration, would it? That works the other way -- Actions integration would have us presenting, say, "mark as spam" actions for other modules to use. For us to *use* other Actions, we'd first have to have a UI and mechanism for implementing the task in the first place. Then, if we wanted, we could use actions instead of a static set of functions to implement.

jeremy’s picture

Email / notifications can be configured with triggers and actions, yes. I coded something like this for the Ad module and use it in production. I will become very dependent on the spam module again soon (later this month, possibly), and thus will likely be contributing on this soon as well.

gnassar’s picture

Version: 5.x-3.x-dev » 6.x-1.x-dev
Status: Closed (won't fix) » Active

Yes, but that's not what the Actions integration issue in the queue is about -- it's not about using "send email" actions; it's about us creating our own "mark as spam" actions for other things to use. Sounds like this is a different issue, it seems. Reopening/reassigning.

gnassar’s picture

Title: Specify email for user who manages spam filter » Allow Actions on spam/not-spam

Changing the title to reflect the broader goal of using Actions on spam status changes.

mitchell’s picture

I referenced this issue when adding another actions related issue: #742402: Integrate Spam module with Rules module.

gnassar’s picture

Assigned: Unassigned » gnassar