Simple:Press Documentation

Plugin: Warnings, Suspensions and Bans

Plugin Description

Plugin: Warnings, Suspensions, and Bans – A Simple:Press plugin allowing a forum admin to warn, suspend, or ban selected users as well as notify them of the action by sending them messages.

Plugin Features

A warning allows the forum admin to send a warning notice to a user for a specified time (until a specified date). Warnings do not reduce the capabilities of a user being warned. The permissions of the usergroup containing the warned user continues to determine the user’s abilities to use the forum.

A suspension allows the forum admin to move a user  to a different usergroup, possibly having reduced permissions, within the forum until a date specified by the admin.  The temporary destination usergroup could be any one of the standard usergroups or a special usergroup specifically set up with permissions for suspended users.  After the specified date, the suspended privileges are regained when the user is automatically returned to the original usergroup.

A ban allows the forum admin to move a user to a different usergroup, possibly having restricted permissions, within the forum without specifying an end date for the ban. The temporary destination usergroup could be any one of the standard usergroups or a special usergroup specifically set up with restricted permissions for banned users.  When the admin decides the ban is over, the admin must use the plugin’s ban panel or the his “forum toolset” options to end the ban. The privileges lost during the ban are regained when the user is returned to the original usergroup by the manual ending of the ban.

The ban section of this plugin does not allow banning by IP address, by an IP address range, host name or user agent. Please see Plugin: Ban if you wish to use this type of ban.

The Warning, Suspension, and Ban Plugin:

  • Provides screens associated with warnings, suspensions and bans used by the forum admin to identify users to be affected by these actions, to specify the duration of the action for warnings and suspensions, and to compose the messages to be seen by the effected users.
  • Allows a forum admin to decide whether or not to show warnings, suspensions, and ban notifications on a user’s profile when the user checks it. The notification method can be a) Simple:Press notification message or b) Private Message (PM) (requires Private Message plugin to be active).
  • Allows a forum admin to compose the title used in the notification (if using PM), to compose the warning, suspension, or ban message sent to users (either PM or visible on the forum page after the user logs-in, and to compose the warning, suspension,or ban message shown on the user profile (if enabled). These items can each be different for a warning as opposed to a suspension or a ban.
  • Allows a forum admin to separately identify users to be given warnings, those to receive suspensions, and those to be banned.
  • Provides the effected user with the predetermined message(s) discussed above indicating the warned, suspended, or banned status and in the case of warnings and suspensions the duration of the warning or suspension.
    • Messages shown on the top of the forum page after the user logs-in will remain there until removed by the user. These messages are not automatically removed when the warning, suspension, or ban is lifted.
    • Messages visible when the user goes to his/her profile cannot be removed by the user. They remain until the warning, suspension, or ban has been lifted.
  • Adds icons and text to the forum admin’s “forum toolset” available on each user post. Clicking the text associated with these icons allows the forum admin to directly and immediately:
    • “Notify user”
    • “Warn this user”
    • “Suspend this user”
    • “Ban this user”
    • “Remove user warning” if a warning currently exists
    • “Remove user suspension” if a suspension currently exists
    • “Remove user ban” if a ban currently exists
  • The forum admin does not have to edit the usergroup permission sets to allow the warned, suspended, or banned user to view the warning, suspension, or ban messages.

Plugin Requirements

Requires Simple:Press version 5.5.7 and above.

The plugin must be activated and its options set-up before it is operational.

As part of the installation, a “Warnings and Suspensions” section is added to the Plugin Management panel under the forum Admin menu – Plugins/Available Plugins. From this panel the Warnings, Suspensions, and Bans plugin can be activated, deactivated, uninstalled, or its options set-up.

Plugin Installation and Activation

Please see Using Plugins on how to obtain and install the Warnings, Suspension, and Bans plugin. As mentioned there the default location for 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. On the Simple:Press Administration page menu, click “Plugins” to open the Plugins drop-down menu, and select “Available Plugins”. Select the “Warnings and Suspensions” plugin on the “Plugin Management” panel and click on “Activate”. The “Activate/Delete” label changes to “Deactivate/Uninstall/Options”. To deactivate the plugin, click on “Deactivate”. The “Deactivate/Uninstall/Options” label changes to “Activate/Delete”.

Plugin Administrative Options

After activation, a) on the aforementioned “Available Plugins” page and “Plugin Management” panel, click “Options” on the “Warnings and Suspension” plugin section or b) under the newly added “Warnings” entry added to the forum menu on the left side forum admin page click the Warnings submenu “Options” to get the Warning and Suspensions panel with “Warning and Suspensions – Options” section, as well as “Warning and Suspensions – User Messages” section.

  • Show Warning, suspension, and ban notification on user profile
    • In the “Warning and Suspensions – Options” section, click on the radio button to the left of “Show warning, suspension and ban notification on user profile” to have the appropriate notification shown on the user’s profile. The button indicates it is selected by turning green in color.
    • Select the method of notification by clicking on the radio button to the left of “Simple Press Notifications” or “Private Message (must have plugin active)” depending on which method of notification is desired. The button indicates it is selected by turning green in color. “Simple Press notifications are notifications that are displayed on the top of the forum page after a warned, suspended, or banned user logs-in.
    • Click on the “Update” button to save the setting if no message changes are be made on this panel. Otherwise, wait to click the “Update” button until all desired message changes have been made.
  • Setting Warning, Suspension, and Ban Messages
    • On the same panel as above, scroll down to the section titled “Warnings and Suspensions – User Messages” with its three (3) subsections one each for “Warning Messages”, “Suspension Messages”, and “Ban Messages”.
    • Under “Warning Messages”, use the three (3) text input boxes to compose the information to be sent to the users who will later be identified to receive a warning. If text in any box is not to be changed, that box does not need to be accessed.
    • Click on the “Update” button to save the setting if no further message changes are be made on this panel. Otherwise, wait to click the “Update” button until all desired message changes have been made.
    • Under “Suspension Messages”, use the three (3) text input boxes to compose the information to be sent to users who will later be identified to receive a suspension. If text in any box is not to be changed, that box does not need to be accessed.
    • Click on the “Update” button to save the setting if no further message changes are be made on this panel. Otherwise, wait to click the “Update” button until all desired message changes have been made.
    • Under “Ban Messages”, use the three (3) text input boxes to compose the information to be sent to users who will later be identified to receive a ban. If text in any box is not to be changed, that box does not need to be accessed.
    • Click on the “Update” button to save the setting if no further message changes are be made on this panel. Otherwise, wait to click the “Update” button until all desired message changes have been made.

After activation, under the newly added “Warnings” entry added to the forum menu on the left side forum admin page click the Warnings sub-menu item “Warning” to get to the “Warning and Suspensions – Add New Warnings” section, as well as “Warning and Suspensions – Current Warnings” section.

From the “Warning and Suspensions – Add New Warnings” section:

  • Add New Warning
    • In the text input box to the right of “User to warn” type in the Display Name (as shown under Forum -> Users -> Member Information) of the user to be given the warning.
    • Click on the input box to the right of “Warning expiration” to set the month, year, and date the warning will expire.
    • Click on the “Add Warning” button to send the warning message(s) to the user, and to add the user to the listed of warned users shown under the “Current Warnings” section.
    • Under the “Current Warnings” section, verify the warned user has been added.
    • Note: After the expiration date of the warning, the warning message on the user’s profile (if the option is active) will no longer be seen by the previously warned user.
  • Manually Remove Warning
    • Under the “Current Warnings” section, find the warned user who is to have the warning removed.
    • Under the “Manage” column for that user, click on the button to remove the warning. Note: “Remove Warning” is shown when hovering over the button.
    • Under the “Current Warnings” section, verify the warned user has been removed.
    • Note: After the warning has been manually removed, the warning message on the user’s profile (if the option is active) will no longer be seen by the previously warned user.

After activation, under the newly added “Warnings” entry added to the forum menu on the left side forum admin page click the Warnings sub-menu “Suspensions” to get to the “Warning and Suspensions – Add New Suspension” section, as well as “Warning and Suspensions – Current Suspensions” section.

From the “Warning and Suspensions – Add New Suspension” section:

  • Add New Suspension
    • In the text input box to the right of “User to suspend” type in the Display Name (as shown under Forum -> Users -> Member Information) of the user to be given the suspension.
    • Click on the input box to the right of “Suspension expiration” to set the month, year, and date the warning will expire.
    • Click on the down arrow to the right of the input box that is to the right of “Select usergroup” to see the list of possible usergroups and to select the one the suspended user is to be put into until the suspension is lifted.
    • Click on the “Add Suspension” button to add the user to the listed of suspended users shown under the “Current Suspensions” section.
    • Under the “Current Suspensions” section, verify the suspended user has been added.
    • Note: After the expiration date of the suspension, the suspension message on the user’s profile (if the option is active) will no longer be seen by the previously suspended user.
  • Manually Remove Suspension
    • Under the “Current Suspensions” section, find the suspended user who is to have the suspension removed.
    • Under the “Manage” column for that user, click on the button to remove the suspension. Note: “Remove Suspension” is shown when hovering over the button.
    • Under the “Current Suspensions” section, verify the previously suspended user has been removed.
    • Note: After the suspension has been manually removed, the suspension message on the user’s profile (if the option is active) will no longer be seen by the previously suspended user.

After activation, under the newly added “Warnings” entry added to the forum menu on the left side forum admin page click the Warnings sub-menu “Bans” to get to the “Warning and Suspensions – Add New Bans” section, as well as “Warning and Suspensions – Current Bans” section.

From the “Warning and Suspensions – Add New Ban” section:

  • Add New Ban
    • In the text input box to the right of “User to ban” type in the Display Name (as shown under Forum -> Users -> Member Information) of the user to be banned.
    • Click on the down arrow to the right of the input box that is to the right of “Select usergroup” to see the list of possible usergroups and to select the one the banned user is to be put into until the ban is lifted.
    • Click on the “Add Ban” button to add the user to the listed of banned users shown under the “Current Bans” section.
    • Under the “Current Bans” section, verify the banned user has been added.
    • Note: After the the admin removes the ban, the ban message on the user’s profile (if the option is active) will no longer be seen by the previously suspended user.
  • Manually Remove Ban
    • Under the “Current Bans” section, find the Banned user who is to have the ban removed.
    • Under the “Manage” column for that user, click on the button to remove the ban. Note: “Remove Ban” is shown when hovering over the button.
    • Under the “Current Bans” section, verify the previously banned user has been removed.
    • Note: After the the admin removes the ban, the ban message on the user’s profile (if the option is active) will no longer be seen by the previously suspended user.

It may be desirable to add special usergroups with specific permissions to handle either suspended user or banned users during

  • Adding a special usergroup with special permissions for either Suspended or Banned Users

    • A special user group could be specifically created from the admin panel by selecting Forum -> User Groups ->Create New User Group.
    • Its permission set could be one specifically created from the admin panel by selecting Forum -> Permissions -> Add New Permission Set.
    • From the admin panel the user group and permission set can then be added to forum(s) by selecting Forum -> Forums -> Manage Groups And Forums.
      • By selecting “Add Permission” under Forum Group, the user group can be assigned its permission set and mapped to all the forums in the group.
      • By selecting “Add Permissions” under a specific forum in the group, the user group can be assigned its permission set and mapped to only that forum in the group.
      • This can be repeated for other individual forums within the forum group, and to other forum groups.

The forum admin does not have to edit the usergroup permission sets to allow the warned, suspended, or banned user to view the warning, suspension, or ban messages.

  • There is not a warning, suspension, or ban message viewing enable in the permission sets.

The CRON Inspector under the forum menu Toolbox entry is a time based job scheduler used to determine when to check for expired warning and suspensions.

  • Verifying when warnings and suspensions are checked for removal by the CRON Inspector
    • From the admin menu click on “FORUM”.
    • From the forum menu click on “Toolbox”.
    • From the Toolbox sub-menu, click on “CRON Inspector” to see the panel with the “Toolbox – CRON Inspector” section and the “Toolbox – CRON Update” section.
    • Under the “Toolbox – CRON Inspector” section, the “CRON Schedules” subsection shows the name, descriptions, and interval (in seconds) for the various selections available for checking events. The “Active CRON” subsection lists the specifics for the active checks currently being done.
      • In the “Active CRON” subsection, under “HOOK”, find “sph_warnings_cron” to verify when the next warnings and suspension check will be done, what the timestamp will be at the next run, the schedule (or frequency) the check is run, and any arguments.
    • Under the “Toolbox – CRON Update” section, the “Delete CRON “subsection can be used to remove an existing CRON, the “Add CRON” subsection can be used to add a new CRON, and the “Run CRON” subsection can be used to cause an existing CRON to run once.

Plugin Language Translation

A plugin’s message strings can be translated from English to other languages and then the translation displayed if language translation files are available. Some plugins may not have such files.

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

More information is available regarding translation files at Simple:Press Translations. 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.

The Warnings, Suspensions, and Bans plugin’s available language translation files with translation statistics, and message translations can be viewed at The Warnings, Suspensions, and Bans Translations. If available, export the file for the selected language to its proper forum language sub-folder as a “mo” file using the export link at the bottom of the page displaying the actual message translations for the language selected. The default location for plugin language files is …/wp-content/sp-resources/forum-language/sp-plugins. If this path is changed, it is important to note that the plugin’s language file needs to reside in the language sub-folder for sp plugins wherever it has been moved and however it has been renamed. See Storage Locations for more information.

Plugin Usage

Forum admins can access the forum admin’s “forum toolset” available on each user post by hovering the cursor over the post . The “forum toolset” icon is a crossed screwdriver and a wrench in some themes. Hovering over the “forum toolset” icon displays the popup message “Open the forum toolset”. Clicking on the “forum toolset” icon provides a menu containing icons and text that allow the forum admin to directly and immediately take action relating to warnings, suspensions, and bans without going to the forum menu “Warning” entry and its sub-menu.

  • Admin’s Forum Toolset Warning, Suspension, and Ban capabilities
    • “Notify user” – compose a message in real-time advising the author of the post of possible or actual action being taken because of the post. The message will appear on the top of the forum page after the user has logged-in and can be removed by the user after reading.
    • “Warn this user” – select the end date of the warning, place the user in the warned list, and send the predetermined warning messages(s) to the user.
    • “Suspend this user” – select the end date of the suspension, select a forum usergroup with possibly reduced permissions to move the user into during the suspension, place the user in the suspended list, and send the predetermined suspension messages(s) to the user.
    • “Ban this user” – select a forum usergroup with possibly restricted permissions to move the user into during the ban, place the user in the banned list, and send the predetermined ban messages(s) to the user.
    • “Remove user warning” – if a warning is active, remove the user from the warned list, and remove the warning message from the user’s profile (if one had been placed there).
    • “Remove user suspension” – if a suspension is active, move the user back to the “pre-suspension” usergroup (if moved), remove the user from the suspended list, and remove the suspension message from the user’s profile (if one had been placed there).
    • “Remove user ban” – if a ban is active, move the user back to the “pre-ban” usergroup (if moved), remove the user from the banned list, and remove the ban message from the user’s profile (if one had been placed there).

Users specified by the forum admin will see warning, suspension, or ban messages in the header of the forum page after they login.

  • Removing the Warning, Suspension, or Ban Message seen at login
    • Messages shown on the top of the forum page after the user logs-in will remain there until removed by the user. These messages are not automatically removed when the warning, suspension, or ban is lifted.
    • Click on the “Remove Notice” text shown with the Warning, Suspension, or Ban Message. The message will be removed and will not be displayed on future log-ins.

If set-up by the forum admin, warned, suspended, or banned users will see warning, suspension, or ban messages when they access their profiles from within the forum.  The forum admin can specify the notification method to be  a) Simple:Press notification message or b) Private Message (PM) (requires Private Message plugin to be active). Regardless of the user’s restricted status, the user is able to retrieve the PM’s if the PM plugin is active.

  • Removing the Warning, Suspension, or Ban Message seen on the User’s Profile

    • This message cannot be removed by the user. It is removed automatically when the warning, suspension, or ban has ended.

Plugin Special Notes

The ban section of this plugin does not allow banning by IP address, by an IP address range, host name or user agent. Please see Plugin: Ban for information on this type of ban.

Template Tags used in the Plugin

There are no Template Tags available for this plugin that allows you to further customize it’s usage or otherwise customize your website.

Actions and Hooks Used in the Plugin

There are Actions and Hooks available in the Plugin.

  • apply_filters(‘sph_warnings_addresses_query’, $spdb) – Allows database query to get users that can be Private Messaged ( PM’ed).

Plugin and Template Tag Changelog

Since Simple:Press version 5.5.0

Codex page sync’d to code version 5.5.2.

Related

Plugin: Ban

More Topics In SimplePress: Plugins


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