Simple:Press Documentation

Plugin: Ban (User Ban)

Plugin Description

Plugin: Ban – This Simple:Press plugin allows the forum Admin to ban users from the forum(s) (not the whole site) by IP address, by an IP address range, host name or user agent. A registered member of the site can also be banned by username with a length of time they are to be banned. Various ban messages can be authored to inform the user of the ban imposed or removed.

Plugin Overview

  • Provides the forum Admin four (4) ways to ban attempts to get into the forum.
  • Provides the forum Admin a way to ban a registered user, move the banned user to another usergroup, and to specify the time the user is banned.
  • Provides the forum Admin with four (4) different ban related messages that can be viewed by the banned users depending upon the ban.
  • Provides the forum Admin with a page listing the banned users.
  • Allows the forum Admin to immediately terminate any ban by removing it.
  • Provides a “banned” forum page which is all a fully banned user can view.

Plugin Features

Installing this Simple:Press plugin adds:

  • A new “Ban‘ 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 “ban” containing the plugin’s files.

Activating this plugin provides:

  • A change to the new “Ban” 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 new “Users- Add Ban” forum Admin panel having other panels displayed below it.
    • The “Getting Started” link associated with the “Deactivate/Uninstall/Options” selections should be selected to view the pertinent information regarding the plugin.
  • A new “Users – Add Ban” forum Admin panel and other panels displayed below it where elements for this plugin are set up by the forum Admin.
    • “Users – Add Ban” panel with “Add IP Ban”, “Add IP Range Ban”, “Add Hostname Ban”, and “Add User Agent Ban” sections where bans of the various types are set up.
    • “Users – Banned Messages” panel with “General Banned Message”, “User Banned Message”, “User Restricted Message”, and “User Restored Message” sections where the various banned related messages can be defined.
    • “Users – User Bans” panel with “Add User Ban”, and “Currently Banned Users” sections where specific forum users can be banned for a specified time frame, and a list of Banned Users is available to the forum Admin.
    • The “Users – Add Ban” forum Admin panel and the other panels displayed below it can be accessed from the Forum Admin menu at:
      • Forum > Users > Ban
      • Forum > Plugins > Available Plugins > Ban > Options
  • A new sub-menu entry “Bans” linked to the new “Users – Add Ban” forum Admin panel and the other panels displayed below it.
    • The new sub-menu entry “Bans’ can be accessed from the forum Admin menu at Forum > Users.
    • A new “Banned” forum page with one of the “banned” messages displayed to “banned” users when they login to the forum.
  • New “Banned Messages” displayed to fully banned users or users banned but with reduced permissions.
    • The “General Banned Message” is displayed on the new “Banned” forum page.
    • The “User Banned Message” is displayed on the new “Banned” forum page.
    • The “User Restricted Message” is displayed in the forum header when the banned user who has been temporarily restricted logs in.
    • The “User Restored Message” is displayed in the forum header when the banned user logs in after the has been lifted.

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

Plugin Requirements

Requires Simple:Press version 5.5.7 and above.

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

As part of the installation, a “Ban” 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 “Users – Add Ban” forum Admin panel having other panels displayed below it.

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 “ban“.
  • 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 “Ban.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 “Ban” 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 Ban plugin section or b) under the Users entry on the forum menu on the left side forum admin page click the Bans sub-menu item to get the “Users – Add Ban” Admin panel with other panels display below it.

Note:
Please click the “Help” link in each section of the each of the panels for more information on that section’s feature(s).
    • Setting up the “Users – Add Ban” Panel Selects
    • Go to the “Users – Add Ban” Panel.
Note:
Bans put in place can be removed by removing them from the respective ‘ban’ section and clicking the “Update Bans” button at the bottom of the “Users – Add Ban” panel.
    • “Add IP Ban” Section Selections

This feature allows banning IP address or octets.

      • To Ban an IP Address or octets, enter the IP address(es) to be banned one IP address per line in the section’s text input box.
        • Wildcards (*) are permitted for one or more octets.
        • Examples
            188.45.66.*
            123.456.34.55
    • Repeat the step above until all IP addresses or octets to be banned have been entered on separate lines.
    • If there are no other ban sections to implement, click on the “Update Bans” button at the bottom of the panel. Otherwise proceed to the next ban section.
    • “Add IP Range Ban” Section Selections

This feature allows banning a range of IP addresses.

      • To Ban a range of IP Addresses, enter the start IP address and the end IP address to be banned separated by a dash (-) with one IP address range per line in the section’s text input box.
        • Wildcards (*) are NOT permitted.
        • Examples
            90.12.14.002-90.12.14.020
            92.16.17.111-92.16.17.125
    • Repeat the step above until all IP ranges to ban have been entered on separate lines.
    • If there are no other ban sections to implement, click on the “Update Bans” button at the bottom of the panel. Otherwise proceed to the next ban section.
    • “Add Hostname Ban” Section Selections

This feature allows banning by hostname with one range per line. A hostname is any portion of the fully qualified domain from which the user is visiting.

      • To Ban by hostname, enter a hostname to ban with one range per line in the section’s text input box.
        • Wildcards (*) are permitted.
        • Examples
            *.ru
            *.cn
    • Repeat the step above until all hostnames to be banned have been entered on separate lines.
    • If there are no other ban sections to implement, click on the “Update Bans” button at the bottom of the panel. Otherwise proceed to the next ban section.
    • “Add User Agent Ban” Section Selections

This feature allows banning by User Agent with one agent per line. A user agent is the software identifier in use by the visiting user. It could be crawler, bot, browser or other.

    • To Ban a User Agent, enter the User Agent to ban with one User Agent per line in the section’s text input box.
      • Wildcards (*) are permitted.
      • Examples
      • googlebot*
    • Repeat the step above until User Agents to be banned have been entered on separate lines.
    • If there are no other ban sections to implement, click on the “Update Bans” button at the bottom of the panel. Otherwise proceed to the next ban section.
  • Setting up the “User – Banned Messages” Panel Selections
  • Go to the “User – Banned Messages” Panel.
    • “General Banned Message” Section Selections

This feature allows writing the message a user will see displayed when have been banned by IP, IP range, Hostname, or User Agent.

    • To write the General Banned Message, enter the text of the message in the section’s text input box.
    • The default message is: “You have been banned from this forum”.
    • If there are no other ban messages to implement, click on the “Update Ban Messages” button at the bottom of the panel. Otherwise proceed to the next ban message section.
    • “User Banned Message” Section Selections

This feature allows writing the message a registered users will see when they have been banned based on their user account.

    • To write the User Banned Message, enter the text of the message in the section’s text input box.
    • The default message is: “You have been banned from this forum”.
    • If there are no other ban messages to implement, click on the “Update Ban Messages” button at the bottom of the panel. Otherwise proceed to the next ban message section.
    • “User Restricted Message” Section Selections

This feature allows writing the message a registered users will see when they have been banned and have been moved to a different usergroup that potentially has restricted permissions.

    • To write the User Restricted Message, enter the text of the message in the section’s text input box.
    • The default message is: “Your account has been temporarily restricted and moved to a different usergroup”.
    • If there are no other ban messages to implement, click on the “Update Ban Messages” button at the bottom of the panel. Otherwise proceed to the next ban message section.
    • “User Restored Message” Section Selections

This feature allows writing the notification registered users will see when they visit the forum and their ban restriction (and possibly having been moved to a different usergroup) has expired.

    • To write the User Restored Message, enter the text of the message in the section’s text input box.
    • The default message is: “Your ban has expired and your account has been restored”.
    • If there are no other ban messages to implement, click on the “Update Ban Messages” button at the bottom of the panel. Otherwise proceed to the next ban message section.
  • Setting up the “Users – User Bans” Panel Selects
  • Go to the “Users – User Bans” Panel.
    • “Add User Ban” Section Selections

In this panel a registered user can be banned. A fully banned user can login to the forum, but can only view the “Banned” page and its functionality.

When banning a user, the user many optionally be moved to a different usergroup. The destination usergroup may potentially have restricted permissions from the original usergroup but not as severe as the full ban. If the user is moved to a different usergroup, all other usergroup memberships are suspended.

Optionally, the ban may be made temporary by specifying a ban time limit in hours.

      • To ban a registered forum user, begin entering the user’s “display name” in the text input box to the right of “Enter user to ban”.
Note:
User display names can be seen on the “User – Member Information” forum Admin panel accessed from the forum Admin menu at Forum > Users > Member Information.
      • A drop down will appear with the possible existing display names to ban.
      • Move the cursor down the list to highlight the display name of the user to ban, and click on it to have it appear in the text input box.
    • If the banned user is to be moved to another usergroup, click on the ‘down arrowhead’ in the menu box to the right of “Enter usergroup to move user to (optional) to have the available usergroups to move the user.
      • Move the cursor down the list to highlight the usergroup to which the banned user is to be moved, and click on it to have it appear in the menu box.
    • If the ban is to be temporary including any optional move to a different usergroup, enter the duration of the ban in hours in the text input box to the right of “Enter ban duration in hours (optional)”.
    • When the ban options have been completed for this user, click on the “Update User Ban” button at the bottom of the panel to save the selections.
    • The user and ban information for the user just banned will appear in the “Currently Banned Users” section of the panel.
    • Note:
      Once completed, a specific user’s ban cannot be modified. The ban must be removed from the banned list in the “Currently Banned Users” section and a new ban implemented.
    • Repeat the steps above to ban another registered forum user.
    • “Currently Banned Users” Section Selections

This section displays the list of currently banned registered forum users along with their user and ban formation.

    • To immediately remove the ban and return the user to the original usergroup(s), click on the “X” associated with the user under the “Manage” column.

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 Ban 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 “Ban” 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 “Ban” 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 to set up ban messages, implement as well as end bans as specified in the Plugin Administrative Options section of this plugin page.

  • Currently banned users can be viewed in the “Currently Banned Users” section of the “Users – User Bans” sub-panel at the very bottom of the panel accessed from the forum admin menu at Forum > Users > Bans.

Forum users do not use the plugin directly. After the forum Admin has configured bans and ban messages, banned forum users can login and out, see ban messages, and have limited or no permissions for an extended or temporary period of time depending upon the ban imposed by the forum Admin.

  • A fully banned user can only view the “Banned” page content.
  • A banned user moved to a different usergroup will have the permissions of that usergroup.
  • After the ban has been lifted, the previously banned user:
    • will see the “User Restored” Message when logging-in to the forum.
    • be instated into original usergroup(s) if moved as part of the ban.

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.0.

Codex page sync’d to code version 5.6.4 and plugin version 1.0.14.

More Topics In SimplePress: Plugins


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