Simple:Press Documentation

Plugin: Profanity Filter

Plugin Description

Plugin: Profanity Filter – This Simple:Press plugin allows substitution of ‘banned’ words or phrases with alternatives of the forum Admin’s choosing.

Plugin Features

Installing this Simple:Press plugin adds:

  • A new Profanity Filter section in the “Available Plugins – Install Simple:Press Plugins” panel under the forum Admin menu path Forum > Plugins > Available Plugins. From this panel the plugin can be activated, or deleted by the Admin.
  • When properly installed, a new folder in the “forum-plugin” folder named “profanity-filter” containing the plugin’s files.

Activating this plugin provides:

  • A change to the new Profanity Filter section in the “Available Plugins – Install Simple:Press Plugins” panel under the Admin menu path Forum > Plugins > Available Plugins so the Simple:Press plugin can be deactivated, uninstalled, or have its Options set up.
    • The Options link goes to the existing “Options – Content Settings” forum Admin panel with its new “Profanity Filter” section.
    • The “Getting Started” link associated with the “Deactivate/Uninstall/Options” selections should be selected to view the pertinent information regarding the plugin.
  • The existing “Options – Content Settings” forum Admin panel can also be reached under the Admin menu path Forum > Options > Content Settings.
  • A new “Profanity Filter” section in the existing “Options – Content Settings” forum Admin panel where:
    • Profanity word/phrase list can be input to filter the offensive words/phrases from posts.
    • Replacement word/phrase list can be input to replace the offensive words/phrases being filtered from posts.
    • Check box selection can be made to replace:
      • each filtered word/phrase by its corresponding individual replacement word/phrase, or
      • all filtered words/phrases by the a single replacement word or group of words.
    • Check box selection to not use boundary checking (recommended only for languages that don’t separate works by blank characters).
  • The “Help” link should be used to assist with the set up of the options.

There are no new permissions added to the permission sets due to this plugin.

Plugin Requirements

Simple:Press version 5.3.2 and above is required.

This plugin must be installed, activated, and its options set before it is operational.

As part of the installation, a “Profanity Filter” section is added to the Plugin Management panel under the admin menu Forum > Plugins > Available Plugins. From this panel the plugin can be activated, deactivated, uninstalled, deleted, or its options set using its “Activate/Delete” and “Deactivate/Uninstall/Options” selections.

  • The Options link goes to the existing “Options – Contents Setting” forum Admin panel.

There are no new permissions added to the permission sets due to this plugin.

The plugin does not have template tags so no recommendation regarding Custom or Child Themes is being made.

Plugin Installation and Activation

Please see Using Plugins on how to obtain and install this Simple:Press plugin.

  • Whatever method is used to add the Simple:Press plugin, the folder that should have been added to the forum plugin folder is named “profanity-filter“.
  • If using the “Simple:Press Upload Plugin – Upload a Simple:Press Plugin” panel at the forum Admin menu Forum > Plugins > Plugin Uploader, the folder to browse for after downloading it from the Simple:Press site is “profanity-filter.zip” before clicking the “Upload Now” button.

As mentioned there the default location for Simple:Press plugin folders is …/wp-content/sp-resources/forum-plugins. If this path is changed, it is important to note that the plugin’s folder and its content need to reside in the forum plugins folder wherever it has been moved and however it has been renamed. See Storage Locations for more information.

Activation is accomplished from the Admin Dashboard panel menu by selecting Forum > Plugins > Available Plugins from the drop down forum Admin menu. On the “Available Plugins – Install Simple:Press Plugins” panel select the Profanity Filter plugin and click on “Activate”. The “Activate/Delete” label changes to “Deactivate/Uninstall/Options” with a “Getting Started” Link.

  • The “Getting Started” link associated with the “Deactivate/Uninstall/Options” selections should be selected to view the pertinent information regarding the plugin.

To deactivate the plugin, click on “Deactivate”. The “Deactivate/Uninstall/Options” label changes to “Activate/Delete”.
To re-activated the plugin, click on on “Activate”. The “Activate/Delete” label changes to “Deactivate/Uninstall/Options”.

Plugin Administrative Options

After activation, a) on the aforementioned “Available Plugins – Install Simple:Press Plugins” panel, click “Options” on the Profanity Filter plugin section or b) under the Options entry on the Forum menu on the left side forum Admin page click the Content Settings sub-menu item to get the “Options – Content Settings” Admin panel with the new “Profanity Filter” section.

Set up of the Profanity Filter plugins options is accomplished in the “Profanity Filter” section.

Set up ‘profanity filters’ so it will substitute a ‘banned’ word or phrase with an alternative chosen. Enter each new word or phrase be removed on a new line in the top box. Place the alternative on a new line in the bottom box ensuring that each entry is in the same position in the list. When posts are displayed, any match found in the top list will be substituted with the word from the equivalent position in the bottom list.

It can also be selected to replace every bad word in profanity list with one word(s) in replacement list’ option. If that option is selected, then every bad word in the profanity list will get replaced with the complete word or words (total content) in the replacement list.

This is most useful when you want to replace all word(s) in the bad list with the same replacement word(s).

Note:
If the check box associated with “Replace every bad word in profanity list with the word(s) in replacement list” is selected, the entire content of all the lines in the “replacement word list” will replace the word/phase on EACH line of the “profanity word list”.That is, the word or phrase on the 1st line, 2nd line, etc. of the “profanity word list” is replaced by the total content on all the lines in the “replacement word list”.Typically if the check box is selected, there is only one (1) word or phase in the “replacement word list”.

  • The check box is selected if it contains a green check mark.

If the check box is NOT selected, the individual word or phrase on a line in the “profanity word list” is replaced by it corresponding word or phrase in the “replacement word list”.

That is, the word or phrase on the 1st line of the “profanity word list” is replaced by the word or phrase on the 1st line of the “replacement word list”.

  • The check box is NOT selected if it does not contain a green check mark.
  • Specifying the Profanity Word List
    Please review the Note immediately above when beginning the process.
  • In the text input box to the right of “Profanity word list – words to filter from post:” enter the individual words or phrases to be filtered from user posts.
    • Enter the word or phrase to be removed one per line in the text box.
  • If there are no other inputs to be made in the “Profanity Filter” section, click on the “Update Content Options” button to save the selections. Otherwise, proceed to the next selection.
  • Specifying the Replacement Word List
    Please review the Note immediately above when beginning the process.
  • In the text input box to the right of “Replacement word list – words to replace in post:” enter the individual words or phrases to replace the words or phases from user posts.
    • Enter the word or phrase to be the replacement one per line in the text box.
    • The replacement line corresponds to a similarly located line in the Profanity word list, in one replacement technique.
  • If there are no other inputs to be made in the “Profanity Filter” section, click on the “Update Content Options” button to save the selections. Otherwise, proceed to the next selection.
  • Specifying the Replacement Technique
    Please review the Note immediately above when beginning the process.
  • If the total content within the “Replacement word list” is to replace the word/phrase on each of the individual lines in the “Profanity word list”, select the check box to the left of “Replace every bad word in profanity list with word(s) in replacement list.
    • The check box is selected if it contains a green check mark.
  • If the individual word/phrase on a line within the “Replacement word list” is to replace the individual word/phrase on the corresponding line in the “Profanity word list”, deselect the check box to the left of “Replace every bad word in profanity list with word(s) in replacement list.
    • The check box is deselected if it does NOT contains a green check mark.
  • If there are no other inputs to be made in the “Profanity Filter” section, click on the “Update Content Options” button to save the selections. Otherwise, proceed to the next selection.
  • Specifying the Word Boundary Checking
  • If “word boundary checking” is NOT to be used, select the check box to the left of “Do not use word boundary checking (recommended only for languages that don’t separate words by blank characters).
    • The check box is selected if it contains a green check mark.
  • If “word boundary checking” is to be used, deselect the check box to the left of “Do not use word boundary checking (recommended only for languages that don’t separate words by blank characters).
    • The check box is deselected if it does NOT contains a green check mark.
  • If there are no other inputs to be made in the “Profanity Filter” section, click on the “Update Content Options” button to save the selections. Otherwise, proceed to the next selection.

To be complete for multilingual forums, the language translation files for this plugin should be installed or downloaded/properly placed in the appropriate forum-language folder for SP plugins using one of the procedures below in the “Plugin Language Translation” section of this page.

Plugin Language Translation

A plugin may not have language translation files, but in general each Simple:Press plugin has its own language translation files each with multiple pages for translating the forum plugin’s message strings.

Forum Plugin translation files are to reside in a unique forum folder location as defined by the “Simple:Press Plugin Language Files” entry on the “Integration – Storage Locations” forum Admin panel available through the forum Admin menu at Forum > Integration > Storage Locations.

  • The default location for forum plugin translation files is the folder “…/wp-content/sp-resources/forum-language/sp-plugins”.

Information regarding downloading language files, “mo’ language file placement, and translation (language localization) is found at Localization.

WARNING: On the Localization page, the Language Translation “.mo” Files Overview should be reviewed and well understood for naming convention and language translation file placement.

More information is available regarding translation files at Simple:Press Translations. which is the repository for Simple:Press language translation files. On the base page, select the “Getting Started Guide” link for basics about it’s use. On that page, select the “register a username here” link to obtain a password to the site. Use the “Contact Form” link to request the desired language if it is not currently available. The “Contact Form” link may also be used to volunteer to be a validator for a translation project.

This plugin’s available language translation files with translation statistics, and message translations can be viewed at Profanity Filter within the repository for Simple:Press language translation files.

  • Installing this Simple:Press Plugin’s Language Translation “.mo” files
    The plugin’s language translations files for each language can be correctly located in two ways.

    • Using the Admin Word:Press “Site Language” and Simple:Press “Language Translation” Features
      WARNING: On the Localization codex page, the Language Translation “.mo” Files Overview should be reviewed and well understood for naming convention and language translation file placement.
        • Under the “Language Translation Selection Sequences” heading, the “Coordinated Language Translation File Download Using the Simple:Press ‘Language Translation’ Selection” section, follow the instructions at “Adding its Translation File(s) After Downloading/Activating a Simple:Press Theme or Simple:Press Plugin”.
          • Follow the instructions to select the “Site Language” and then get to the admin page with the “Integration – Language Translations” section where there should be an entry for “Profanity Filter” along with an “Install” button.
          • Click on the “Install” button for this plugin to install the language translation file for the current “Site Language” language.
            • Note: If the message “No Translation Project Exists” is displayed rather than the “Install” button, a translation file for that language could not be found in GlotPress at this time. Consider posting in the Simple:Press forum if it is felt there needs to be one added.
          • Be sure to verify the locale (filename) for the “.mo” file matches the language code for the language as referenced in the “Warning” above. If it does not, change it to match.
          • As called out in the section, continue to change the “Site Language” language and repeat the process until all desired translation files for this plugin have been installed.

       

    • Manually Finding and Storing Simple:Press Plugin’s Language Translation ‘mo’ files
    • WARNING: On the Localization codex page, the Language Translation “.mo” Files Overview should be reviewed and well understood for naming convention and language translation file placement.
    • After reviewing the material discussed under the “Language Translation Selection Sequences” heading, the “Manual Installation of Simple:Press Language Translation Files section, follow the steps outlined at “Finding and Storing ANY Simple:Press Plugin’s Language Translation ‘mo’ files”.
    • Each time through the process at the step, “Scroll down the list and click on the name of the plugin whose language files are being sought to see the translation file Version Number available”, substitute “Profanity Filter” for the phrase “the name of the plugin whose language files are being sought”.
    • Be sure to verify the locale (filename) for the “.mo” file matches the language code for the language as referenced in the “Warning” above. If it does not, change it to match.
    • Repeat the steps for each language it is desired to have a translation file (french, spanish, etc.) for the plugin on the website.

Plugin Special Notes

None

Plugin Usage

Forum Admins use the plugin set up the plugin’s options.

Forum users do not use the plugin, but their posts are evaluated for banned words by it and the post content altered if banned words are found.

Template Tags Used in the Plugin

There are no Template Tags used in this plugin.

Actions and Hooks Used in the Plugin

There are no Actions and Hooks available in Template Tags for this plugin.

There are no other Actions and Hooks available for this plugin.

Plugin and Template Tag Changelog

Since Simple:Press version 5.1.

Codex page sync’d to code version 5.6.1 and plugin version 1.2.4.

More Topics In SimplePress: Plugins


Copyright © 2006-2019 Simple:Press. All Rights Reserved.