Hi Guys,
Sorry to bother you with this insignificant feature request, but I was wondering if you might give a little free guidance when you happen upon this post. No rush. Summary is, I'd like to make it so that the "mark as spam" link needs to be clicked three times before the corresponding admin selected action is taken. What I've done is change the score from being immediately marked as 99 when the "mark as spam" link is clicked to 32 + the previous value of the score column. I've tested my theory on a dev version of the spam module and it works the way I'd like.
This is how I've created the functionality, recognizing that a single user could click on the link three times and single handedly cause the action. I'm okay with that, for now anyway.
spam.module Currently
Line 1735: $extra['score'] = 99;
I'd like to modify it as follows:
Line 1735: $score = (int)db_result(db_query("SELECT score FROM {spam_tracker} WHERE content_type = '%s' AND content_id = %d", $type, $id));
Line 1736: $extra['score'] = $scroe + 32;
What I'd prefer is to create a custom module overriding the function where this code belongs. The function is spam_mark_as_spam . I've overridden contributed module functionality in the past, but not like this. As far as I can tell, this function is specific to this module and is not called by any other hook that I can hijack. This leads me to believe that my only alternative is to hack spam.module rather than do the right thing and override in a custom module.
Any feedback at all would be greatly appreciated and again no rush,
Sincerely,
Comments
Comment #1
AlexisWilke commentedHi rmjackson,
The problem is that this function is used in several circumstances. For example, it is called when you go to the Comment Approval page. This would mean that comments would have to be marked as spam 1 to 3 times on that screen.
Thank you.
Alexis
Comment #2
avpadernoI am closing this issue, since it's for a Drupal version no longer supported.