Availability
Available as of blojsom 2.25.
Description
The phrase spam moderation plugin checks for specific phrases within comments and trackbacks. If a phrase is found within the response, the comment or trackback can be moderated or deleted automatically.
There is also an administration plugin to allow you to edit the spam phrases from the web administration console.
Installation and Setup
In your global /WEB-INF/plugin.properties file, add the following line:
spamphrase-moderation=org.blojsom.plugin.moderation.SpamPhraseModerationPlugin
spamphrase-moderation-admin=org.blojsom.plugin.moderation.admin.SpamPhraseModerationAdminPlugin
In your individual blog.properties file, there are a number of properties that control how this plugin operates.
| Property |
Description |
Default value |
| delete-phrasespam |
Determines if the comment or trackback should be deleted automatically if it contains any phrase spam. |
false |
For example:
delete-phrasespam=true
The plugin's default phrase blacklist file is called spam-phrase-blacklist.properties and the plugin looks for this file in the individual /WEB-INF/(blog-id)/ directory.
If you would like to change the name of the phrase blacklist file used, you can set this as an initialization parameter using the property spam-phrase-blacklist in /WEB-INF/web.xml. For example:
<init-param>
<param-name>spam-phrase-blacklist</param-name>
<param-value>spam-phrase-blacklist.properties</param-value>
</init-param>
Usage
The phrases used in the spam phrase blacklist file may be either phrases or regular expressions. Each phrase or regular expression is given on a separate line in the file.