function notifications_spamapi in Spam 6
Spam module _spamapi() hook.
File
- content/
spam_content_notifications.inc, line 39 - Include file for integration with the contact form.
Code
function notifications_spamapi($op, $arg1 = NULL, $arg2 = NULL, $arg3 = NULL) {
switch ($op) {
case 'content_module':
// Register with the spam api as a content type module.
return 'notifications';
case 'content_id':
// Notifications are aren't scanned by themselves.
return 0;
case 'content_types':
$types = array();
$types[] = array(
'name' => 'notifications',
'module' => 'notifications',
'title' => t('Notifications'),
'description' => t("Allows users to get notified about updates on your website. Messages won't be sent if the content triggering them is found to be spam. Messages will get sent later if the content is marked 'not spam' and published."),
'default_value' => 0,
);
return $types;
case 'filter_content_type':
return variable_get('spam_filter_notifications', FALSE);
case 'filter_fields':
// Tell spam filter which fields should be scanned for spam.
// We do not want to actually filter notifications. We rely on the
// filtering of the content (node/comment/...) that created the notification.
return array();
case 'feedback_form':
case 'error_form':
// We do not need a separate form. See above.
return array();
case 'mark_as_not_spam':
case 'feedback_approved':
case 'publish':
case 'load':
case 'title':
case 'status':
case 'edit_link':
case 'link':
case 'hostname':
case 'redirect':
case 'overview_filter_join':
case 'overview_filter_where':
case 'unpublish':
case 'hold':
break;
}
}