Upgrading from pre-2.0
If you are upgrading from any version prior to the 2.0 release of Bad Behavior, you need to perform the following steps before installation:
First, remove all copies of Bad Behavior 1.x and any pre-release copies of Bad Behavior 2. Then, use phpMyAdmin, the MySQL command line, or another tool to remove any
*bad_behavior_log tables in your database.
Now you are ready to install Bad Behavior version 2.
Bad Behavior is a MediaWiki extension. It is supported on MediaWiki 1.17 or later versions, though it may still work on versions as old as 1.7.
Before uploading, create a
settings.ini file using the included
settings-sample.ini file as a template and change the configuration options to your liking in
Upload both the folder and its contents to your MediaWiki
extensions directory, taking care to use ASCII mode. You should end up with a
bad-behavior folder in your
extensions folder, which contains the Bad Behavior files. Once on the server, edit your
LocalSettings.php file, and add this line at the end of the file.
require_once( "$IP/extensions/bad-behavior/bad-behavior-mediawiki.php" );
If you are upgrading from a version of Bad Behavior prior to 1.1, you may have a similar line in your
index.php file instead. This is because prior versions were not full-fledged MediaWiki extensions. Remove it from
index.php and add the above line in
After installation you don’t need to do anything! Bad Behavior protects your entire MediaWiki automatically.
One MediaWiki-specific setting is available for use in
$wgBadBehaviorTimer (default false): When enabled, adds an HTML comment to rendered pages showing Bad Behavior’s version and run time in milliseconds.
To view the Bad Behavior log, you will need a copy of phpMyAdmin installed, or some other way to view the database. Most Web hosts include phpMyAdmin as part of the control panel. Bad Behavior stores its log in the
bad_behavior table in your MediaWiki database. Browse or search through it with phpMyAdmin, the MySQL command line, or another tool. At this time Bad Behavior does not come with a built-in log viewer.