This plugin is designed to be used with MT-BlackList. The plugin gives you the ability easily see stats about what is being blocked by your blacklist, including the ability to summarize and rank blacklist entries.
BlacklistStats is an adaptation of the Searches plugin by David Raynes. 99.9% of the credit goes to David, as I modified only a very small portion of the code to create this plugin.
1. Download the plugin:
2. Upload the "blackliststats.pl" file to the plugins directory in your MT installation.
3. Begin using the template tags described below
MTBlacklistStats - A container tag used for displaying statistics about your blacklist activity. The tags below must be used within an MTBlacklistStats container.
days: to include blocks from only the last n days (e.g. <MTBlacklistStats days="7">)
lastn: to include n searches in the list (e.g. <MTBlacklistStats lastn="5">)
unique: to include only the latest instance of a particular blacklist entry (e.g. <MTBlacklistStats unique="1">)
rank: orders the blacklist entries by rank, the most common being the first (e.g. <MTBlacklistStats rank="1">), implies unique
MTBlacklistValue - The blacklist entry that caused the comment/trackback to be blocked (ie. viagra.com).
MTBlacklistDate - The date that the comment was blocked. This tag takes a "format" argument, which works the same as MT Date formats.
MTBlacklistIP - The IP address of the person (or server) of the blocked comment/trackback.
MTBlacklistBlog - The name of the blog on which the blog occured. This is useful if you have more than one blog.
MTBlacklistType - The type of block: 'comment' or 'trackback'
MTBlacklistRank - The rank of the blacklist entry. For example, the blacklist entry that resulted in the highest number of blocks would be ranked #1.
MTBlacklistTotal - The total number of blocks for a blacklist entry. For example if 5 comments were blocked containing "viagra.com", this tag would have a value of 5.
Also included in the zip file is a sample template. The template creates two tables:
Blacklist Stats - lists each block by date, most recent listed first.
Rankings - lists each blacklist entry, ranked from the most blocks to the least.
You may need to adjust the stylesheet and image paths. I used the stylesheet used by the MT admin interface.
1. If you want keep your stats private, be sure to build the stats file in a protected area.
2. It may be a good idea to uncheck "Rebuild this template automatically..." and just manually rebuild the stats from time to time (especially if you have a large activity log).
3. The plugin pulls data from the activity log. If you reset the activity log, your BlacklistStats will also be reset.