Spam Protection

Enables you to filter comment, forum and other spam with your choice of services (Akismet, Defensio, Typepad Anti-Spam)

#1. What this plugin does

  • Filters comment, forum and other spam with your choice of services (Akismet, Defensio, Typepad Anti-Spam). Comment and forum spam filtering is disabled by default. ( It is not recommended to use non-custom adapters for filtering if you use plugins that alter the extension you are filtering spam on. This could have unexpected results unless you know the specifics.)
  • Provides an administration tool to manage items marked as spam.
  • Allows you to filter spam in your extensions.
  • ​Add your own section adapters to enable your extensions to use the spam moderation queue when filtering spam.

#2. Installation

  1. Decide which spam service you wish to use. Register at the service you choose to use and obtain an API key.​​​​ Akismet (http://akismet.com), Defensio (http://defensio.com), Typepad Anti-Spam (http://antispam.typepad.com)
  2. Download, unpack and upload the spam_protection plugin folder to your plugin directory.
  3. Install the plugin in the administration panel.
  4. Go into the plugin's configurations in the admin panel and select your spam service and enter your API key.
  5. Check to see that everything is configured to your preference.
  6. The rest is up to your spam service and you can find all spam items caught in Administration -> Other -> Spam Protection

#3. Adding spam filtering to your extensions

An example of what it would look like to add spam filtering to your extension:

if(cot_plugin_active('spam_protection'))
{
    require_once cot_incfile('spam_protection', 'plug');
    $spam_data = array(
        'content' => $msg['text'],
        'authorname' => $usr['name'],
        'authoremail' => $usr['profile']['user_email'],
        'authorid' => $usr['id'],
        'authorip' => $usr['ip'],
        'date' => $sys['now'],
        'section' => 'guestbook',
        'data' => array(
            'guestbook' => $msg
        ), 
    );
    $spam_check_result = spam_protection_check($spam_data);
    if($spam_check_result['is_spam'])
    {
        // Item was returned as spam
        spam_protection_queue_add($spam_data); // Add to the moderation queue if you want. Not required.
    }
}

See https://github.com/xerora/cot-spam_protection#spam_protection_checkdata for more options to pass.

Go to https://github.com/xerora/cot-spam_protection or spam_protection/docs/README.htm for further documentation.


1. elfrenazo  2013-04-02 04:30

Gracias, lo usare en comentarios !

Only registered users can post new comments