Bad Behavior on Drupal 7

Bad Behavior is a set of PHP scripts that is designed to keep your blog or forum clean from spam by taking a much different approach than typical solutions. While I could go into a big explanation, you can read all about it here

That said, Drupal 7 is available for download, but the Drupal 6 Bad Behavior module has not yet been ported to Drupal 7. These instructions will help you get a very crude installation of Bad Behavior protecting your Drupal 7 site, albeit in the “no logging” mode, which is not the preferred method. If you’re familiar with Drupal 7 enough to attempt a port, I would ask that you please visit the Drupal 6 module and contact the developer. The Drupal community would greatly appreciate it.

These instructions are based on the Bad Behavior Porting Guide.

First, download Bad Behavior from http://bad-behavior.ioerror.us/download/

When you unzip it, you should have a folder called bad-bahavior.

Upload that folder somewhere to your web root, so that bad-behavior-generic.php is accessible as http://example.com/bad-behavior/bad-behavior-generic.php (These are sample instructions only, advanced users are encouraged to place the scripts wherever they like.)

edit bad-behavior-generic.php

Locate the following line:

'httpbl_key' => '',

Input your http:BL API key from Project Honey Pot. If your API key is ‘exampleAPIkey’, you’ll have this:

'httpbl_key' => 'exampleAPIkey',

edit drupal index.php

Right below the opening <?php tag, insert the following line, making sure it has the correct relative location of bad-behavior-generic.php:

require_once("bad-behavior/bad-behavior-generic.php");

That’s it!

Questions, comments, and feedback are always welcome and appreciated.

 

About these ads

,

  1. Leave a comment

Share your thoughts

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 110 other followers

%d bloggers like this: