NP_Censor.php

The Censor plugin will block the display of offensive words/phrases in comments and items. It is based on NP_CommentCensor and in many ways replaces it. There is a site-wide list of banned words and each blog have a list of additional offensive words. By default, the actual comment and item texts, as stored in the database, are not changed. It can be set to not allow offensive comments to be saved. Offensive words/phrases will be replaced by the string ”****” when the comment or item is displayed on the blog.

Note from the developer: This is not designed to be a SPAM fighting plugin, though one could imagine it used for such a purpose with the block option enabled. I believe it would require a lot of management for minimal results as a SPAM fighting tool. It is intended to keep church or children sites from displaying naughty words, to keep Voldemort's name off the blogs at the Ministry of Magic, or to censor mention of the Yankees on a Red Sox fan's site. It is as the name implies a censor.

General Plugin info
Author: Frank Truscott
Current Version: 1.02
Download: NP_Censor.zip size=1KB, 1 file
Code: Please Download
Demo: none
Forum Thread: here

Upgrading

If you were a user of NP_CommentCensor, you should save your list(s) of banned words to a text file, then uninstall the plugin before installing this plugin.

Installing

  1. Unzip the file and upload the contents to your plugin directory
  2. Install the plugin…
  3. Set the list of offensive phrases in the plugin options and/or the blog settings for each blog needing censorship

How to use the plugin

Compatibility Note: If you have NP_CommentControl, or any other plugin that subscribes to the PreAddComment event, you will need to move NP_Censor up in the list of plugins so that it is listed before NP_CommentControl.

Simply set the list of banned words in the plugin options and/or the blog settings for each blog needing censorship. Below is an example of how it works.

If your list of banned words is:

Blasted, darn, foul up, uck 

The comment

I am so peeved at the Darn filthy ducks that continue to foul up our blasted sidewalks.

will be displayed as

I am so peeved at the **** filthy d****s that continue to **** our **** sidewalks.

If you set the “Should comments with banned words be blocked” option to 'yes', the user will not be able to submit comments with offensive words. He will instead see an error indicating why he could not submit the comment.

Available SkinVars and/or TemplateVars

  • There are no available SkinVars or TemplateVars for this plugin.

Options

  • In the plugin options, there will be a field where the site administrator can maintain a comma-separated list of words and phrases to be censored from comments/items in all blogs.
  • In the plugin options, there will be a field where the site administrator can set whether comments with offensive words will be blocked (not saved to db) for all blogs. If set to no, the feature can be enabled/disabled on a per blog basis. If set to yes, all blogs will use this feature regardless of the blog setting. Default is no.
  • In the plugin options, there will be a field where the site administrator can set whether items will be censored for all blogs. If set to no, the feature can be enabled/disabled on a per blog basis. If set to yes, all blogs will use this feature regardless of the blog setting.Default is yes.
  • In the settings for each blog, there will be a field where the blog administrator can maintain a comma-separated list of words and phrases to be censored from comments/items.
  • In the settings for each blog, there will be a field where the blog administrator can set whether comments with offensive words will be blocked (not saved to db). Default is no.
  • In the settings for each blog, there will be a field where the blog administrator can set whether items will be censored. Default is yes.

Tips and Tricks

Wishlist

Bugs

please report to the forum thread here.

History

  • Version 1.0, released 1-26-2007
    • initial release
  • Version 1.01, released 1-29-2007
    • Item titles now censored
  • Version 1.02, released 7-09-2007
    • Fix bug where php error being thrown when a banned word is blank.

Plugin review

NP_Censor version 1.02 works with Nucleus CMS version 3.31 - 2007-10-27 ftruscot

censor.txt · Last modified: 2008/09/26 21:14 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki