Simple:Press Documentation

Plugin: Admin Bar

Plugin Description

Plugin: Admin Bar – This Simple:Press plugin helps to manage the administrators postbag of new forum posts and posts awaiting moderation. It also adds optional Akismet support to help identify and quickly deal with spam posts.

Plugin Features

Installing this Simple:Press plugin adds:

  • A new Admin Bar 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 “admin-bar” containing the plugin’s files.

Activating this plugin provides:

  • A change to the new Admin Bar 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 “Admins – Global Admin Options” forum Admin panel with a new “Admin Bar Options” section.
    • The “Getting Started” link associated with the “Deactivate/Uninstall/Options” selections should be selected to view the pertinent information regarding the plugin.
  • A new “Admin Bar Options” section in the existing “Admins – Global Admins Options” forum Admin panel where the global option to display the “Admins Postbag” in the Forum section of the WordPress Admin Dashboard can be selected by the primary forum Admin.
    • The “Help” link should be used for assistance in setting up the options.
    • The “Admins – Global Admins Options” forum Admin panel can be accessed under the Admin menu path Forum > Admins > Global Admin Options.
  • On the WordPress Admin Dashboard in the “Forums” section a new sub-section “The Admin postbag” where the topics with new/unread posts are listed along with links to those topics are shown when the “Admin Bar Options” section “Display the admin postbag in the dashboard” option has been selected in the “Admins – Global Admins Options” forum Admin panel.
    • The WordPress Admin Dashboard can be accessed from the WP Admin menu by clicking “Dashboard”.
    • Scroll down the “Dashboard” to see the “Forums” section.

For Forum Admins and Moderators Only:

  • A new “Admin Bar Options” section in the existing “Admins – Your Admin Options” forum Admin panel where the personal option for displaying the admin bar buttons in the header of the forum pages can be set by the individual forum Admin.
    • The “Help” link should be used for assistance in setting up the options.
    • The “Admins – Your Admin Options” forum Admin panel can be accessed under the Admin menu path Forum > Admins > Your Admin Options.
  • A new “Admin Bar” with buttons and links at the very top of the forum page if the logged in Admin has selected the “Admin Bar” option in the “Admins – Your Admin Options” forum Admin panel.

      • The buttons are:

      • “View New Posts” that links to the new “New/Unread Posts Management” page (aka “Admin Postbag”) which lists the Topics with new/unread posts and the number of posts in each listed topic. The topics shown include those having new/unread posts not needing moderation, those needing moderation and those identified as potential SPAM. This button can both open and close the “Admin Postbag” page.
      • “Unread:’X'” where ‘X’ indicates the number of new/unread posts (not topics) in the “New/Unread Posts Management” (aka “Admin Postbag”) that do not need moderation nor have been identified as potential SPAM posts.
      • “Need Moderation: ‘Y'” where ‘Y’ indicates the number of new/unread posts (not topics) in the “New/Unread Posts Management” (aka “Admin Postbag”) that need moderation and have not been identified as potential SPAM posts.
      • “Spam: ‘Z'” where ‘Z’ indicates the number of new/unread posts (not topics) in the “New/Unread Posts Management” (aka “Admin Postbag”) considered to be SPAM. Suspected SPAM posts MAY require moderation based on the Akismet option selected in the Plugin Administrative Options section of this Codex page, but are not included in the “Need Moderation” count.
      • “Admin Links” which when clicked displays a popup page with links to the Major Entries in the Forum Admin Menu.
    • A new “New/Unread Posts Management” page (aka Admin Postbag) where the Forum, the Topic Title, and the number of new/unread posts are listed.
      • The topics are grouped by Forum.
      • Each topic has a “View” button or in the case of suspected SPAM posts a “View Spam” button that when clicked, opens a slide down window with the “Post Details” containing the post text and other post information immediately below the button.
Note:

  • Posts needing moderation have and, based on the Akismet Plugin Spam option selected in the Plugin Administrative Options section of this Codex page, suspected SPAM posts MAY have the following message: “Awaiting moderation
  • Suspected SPAM posts have the additional message: “Akismet marked as spam
      • Within the slide down window are the following action buttons:
        • For new/unread posts NOT requiring Moderation
        • “Mark This Post As Read And Go To The Topic”
        • “Mark This Post As Read And Close”
        • “Mark This Post as Read and Quick Reply”
        • “Delete this Post”
        • For new/unread posts requiring Moderation
        • “Mark This Post Approved And Go To The Topic”
        • “Mark This Post Approved And Close”
        • “Mark This Post Approved And Quick Reply”
        • “Delete this Post”
        • For new/unread posts marked as potential SPAM
        • “Mark This Post Approved And Go To The Topic”
        • “Mark This Post Approved And Close”
        • “Mark This Post Approved And Quick Reply”
        • “Delete this Post”
        • “Remove this member and all Their Posts”
      • A new “Quick Reply” text box that opens within the post’s “Post Detail” section for composing and sending a quick reply to the post when the “Mark This Post As Read And Quick Reply” or the “Mark This Post Approved And Quick Reply” button is clicked.
      • Clicking the “View” or “View Spam” button again, closes the slide down window if none of the other actions are taken.
  • On the WordPress Admin Dashboard in the top of its “Forums” section a new sub-section “The Admin postbag” where the topics with new/unread posts are listed along with links to those topics are shown when the “Admin Bar” option has been selected in the “Admins – Global Admins Options” forum Admin panel.
    • This is not to be confused with the “New/Unread Posts Management” (aka “Admin Postbag) panel shown at the very top of the forum page headers.

Plugin Requirements

If the Akismet Plugin is to be used to aid in the detection of SPAM posts, it must first be downloaded, installed, activated, and set up.

The Simple:Press Admin Bar plugin requires Simple:Press version 5.6.2 or above.

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

As part of the installation, a “Admin Bar” 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 “Admins – Global Admin Options” forum Admin panel with the new “Admin Bar Options” section where this plugin’s options are set by the forum Admin.

There are no new permissions added to the permission sets due to this plugin that must be set up.

The plugin has two (2) template tags with both of them, ‘sp_AdminQueue()’, and ‘sp_AdminLinks()’ incorporated into standard supplied Simple:Press themes.

  • If the location of the template tag in the themes as well as the argument and parameter values for the template tag are acceptable, nothing need be done.
  • If any item relating to the template tag is to be modified or if the other template tag is to be added to a theme, it is recommended that a Child or Custom theme is created first to accept the changes prior to installing this plugin.
  • In all cases the template tag should be called conditionally, if (function_exists(‘ ‘)) so that if the plugin is deactivated or does not exist, the website will continue to operate.

Plugin Installation and Activation

Please see Using Plugins 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 “admin-bar“.
  • 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 “admin-bar.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 “Admin Bar” plugin and click on “Activate”. The “Activate/Delete” label changes to “Deactivate/Uninstall/Options” with a “Get 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 Admin Bar plugin section or b) under the Admin entry on the forum menu on the left side forum admin page click the Global Admin Options sub-menu item to get the “Admins – Global Admin Options” Admin panel.

  • Specifying Global Admin Bar Options
    • Go to the “Admin Bar Options” section of the Admin panel.
      • Please click on the section’s “Help” link for more information.
    • If all Administrators and Moderators are to be shown the “Admin’s Postbag” in the forum section of the WP Dashboard, click on the check box to the left of “Display the admins postbag in the dashboard”.
      • The check box is selected if it contains a green check mark.
      • Clicking in a check box with a green check mark will disable the option and remove the check mark.
    • If there are no more options to set on the page, click on the “Update Global Admin Options” button at the bottom of the panel to save the settings. Otherwise proceed to the next section, if there is one.
  • Specifying Akismet Plugin Spam Options
    The Akismet Plugin, if activated, can be used to identify potential SPAM posts to be shown in the “Admin Postbag”.

    • If the “Akismet” plugin in active, go to the “Akismet” section of the Admin panel.
      • Please click on the section’s “Help” link for more information.
    • If the Akismet marked spam posts are to be placed in moderation, click on the check box to the left of “Place Akismet marked post into moderation”.
      • The check box is selected if it contains a green check mark.
      • Clicking in a check box of another option will disable this option and remove the check mark.
    • If the Akismet marked spam posts are not to be saved, click on the check box to the left of “Do not save Akismet marked spam posts”.
      • The check box is selected if it contains a green check mark.
      • Clicking in a check box of another option will disable this option and remove the check mark.
    • If Akismet is not to be used, click on the check box to the left of “Do not use Akismet”.
      • The check box is selected if it contains a green check mark.
      • Clicking in a check box of another option will disable this option and remove the check mark.
    • If there are no more options to set on the page, click on the “Update Global Admin Options” button at the bottom of the panel to save the settings. Otherwise proceed to the next section, if there is one.

The primary forum Admin can select to initially given himself/herself and all forum moderators the option to use the Admin Bar along with other options.

Note:
Moderators can override the Simple:Press Admin Bar setting specified by the primary forum Admin by individually going into the “Your Admin Bar Options” section of the “Admins – Your Admin Options” forum Admin panel and selecting the settings they desire.
  • Selecting the “Admin Bar” Option for the Primary Admin and All Moderators
    • In the Admin menu, navigate to Forum > Admins and click the “Your Admin Options” sub-menu entry to display the “Admins – Your Admin Options” Admin panel.
    • Go to the “Your Admin Bar Options” section.
      • Please click on the section’s “Help” link for more information.
    • To display the Simple:Press admin bar in the header of the forum pages, click on the check box to the left of “Display the Simple:Press admin bar”.
      • The check box is selected if it contains a green check mark.
      • Clicking in a check box containing a green check mark will disable the option and remove the check mark.
    • Extending the Options to All Moderators
    • Go to the “Set Your Moderator Options” section.
      • Please click on the section’s “Help” link for more information.
    • To display the Simple:Press admin bar in the header of the forum pages along with other options for Moderators, click on the check box to the left of “Grant all moderators the same options as above”.
      • The check box is selected if it contains a green check mark.
      • Clicking in a check box containing a green check mark will disable the option and remove the check mark.
    • If there are no more options to set on the page, click on the “Update Your Admin Options” button at the bottom of the panel to save the settings. Otherwise proceed to the next section, if there is one.

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 Admin Bar 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 “Admin Bar” 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 “Admin Bar” 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 Usage

The primary forum Admin uses this plugin to set the plugin’s Administrative Options.
Forum Users do not use this plugin.
Forum Admins and Forum Moderators use this plugin to set their personal “Admin Bar” option and view/adjudicate new/unread posts.

    • Selecting Personal “Admin Bar” Option
      • In the Admin menu, navigate to Forum > Admins and click the “Your Admin Options” sub-menu entry to display the “Admins – Your Admin Options” Admin panel.
      • Go to the “Your Admin Bar Options” section .
        • Please click on the section’s “Help” link for more information.
      • To display the Simple:Press admin bar in the header of the forum pages, click on the check box to the left of “Display the Simple:Press admin bar”. The picture below shows a radio button instead of a check box.

 

      • The check box is selected if it contains a green check mark.
      • Clicking in a check box containing a green check mark will disable the option and remove the check mark.
    • If there are no more options to set on the page, click on the “Update Your Admin Options” button at the bottom of the panel to save the settings. Otherwise proceed to the next section, if there is one.

Forum Admins can go to Forum Admin panels from the “Admin Bar” in the forum page header.

  • Going to Forum Admin Panels
    • Click on the “Admin Links” button in the forum page header to display a popup window of “Admin links”.
    • Click on the link to the desire forum Admin menu entry (e.g. Forums, Options, Components, etc.) to display the forum Admin menu entry with its sub-menu entries and the 1st forum Admin panel in the sub-menu.
    • Click on the sub-menu entries under the forum Admin menu entry to display that sub-menu item’s forum Admin panel, if desired.

Forum Admins and Forum Moderators can view/adjudicate new/unread posts in the “New/Unread Posts Management” page (aka “Admins Postbox”) using the “Admin Bar”.

    • Viewing/Adjudicating New/Unread Posts Using the Admin Bar
      • Go to the top of a forum page to view the “Admin Bar” buttons.

        • The non-action buttons identify the number of posts of the various types in the “New/Unread Posts Management” panel.

        • “Unread:’X'” button where ‘X’ indicates the number of new/unread posts (not topics) in the “New/Unread Posts Management” (aka “Admin Postbag”) panel. This number does not include the posts (not topics) that need moderation or are potential SPAM.
        • “Need Moderation: ‘Y'” button where ‘Y’ indicates the number of new/unread posts (not topics) in the “New/Unread Posts Management” (aka “Admin Postbag”) panel that need moderation and have not been identified as potential SPAM posts.
        • “Spam: ‘Z'” button where ‘Z’ indicates the number of new/unread posts (not topics) in the “New/Unread Posts Management” (aka “Admin Postbag”) panel considered to be SPAM. Suspected SPAM posts MAY require moderation based on the Akismet option selected in the Plugin Administrative Options section of this Codex page, but are not included in the “Need Moderation” count.
      • Click on the “View New Posts” button in the “Admin Bar” portion at the very top of the forum page header to display the “New/Unread Posts Management” (aka “Admin Postbag”) panel listing the forums and forum topics with new/unread posts.
        • Each topic has a button used to open it and “View” its new/unread posts.
Note: The button that opens a topic for viewing identifies the types of posts in it and can change over time as different posts are added to the topic.

  • A “View” button with BLUE background: Only posts that do not need moderation.
  • A “View” button with RED background: At least one (1) post that needs moderation but no SPAM identified posts.
  • A “View SPAM” button with BLUE background: At least one (1) SPAM identified post.
  • A “View SPAM” button with a RED background: At least one (1) SPAM identified file and at least one (1) non-SPAM post that needs moderation.
        • Click on the “Empty the Admin Postbag” button at any time to mark regular and SPAM identified posts as read or approved, respectively, removing them from the list and returning to the forum page where the “View New Posts” button was clicked.
          • Topics with a “View” button having a RED background have post(s) that “Needing Moderation” so are not removed. Their post(s) needing moderation remain and must be individually adjudicated.
        • For topics with only “Non-SPAM” identified posts, click on the “View” button for the topic to see the “Post Detail” for all the new/unread posts of this type in the topic.
Note:
When viewing topics with multiple new/unread posts of these types:

  • Only the latest post shown in the topic will have all the action buttons discussed below.
  • On the buttons with labels “Mark This Post …” the words “This Post’ are replaced by “All Posts”.
  • All the previous posts of that type in the topic will only have a “Delete This Post” button.
          • Clicking the “View” button again, closes the slide down window if none of the below actions were performed.
          • For new/unread posts NOT requiring Moderation
          • Click on the “Mark This Post As Read And Go To Topic” to mark the post as read removing it from the list and to go to the topic.
          • Click on the “Mark This Post As Read And Close” to mark the post as read removing it from the list and to stay on the “New/Unread Posts Management” (aka “Admin Postbag”) panel.
          • Click on the “Mark This Post as Read and Quick Reply” to open a text window where a quick reply can be composed.
            • After completing the quick reply, click the “Save New Post” button to save and to send the quick reply post.
            • The original post is removed from the “Admin Postbag” list.
          • Click on the “Delete this Post” button to disapprove the post removing it from the list, and to delete it from the forum as well as the author’s lists of posts.
          • For new/unread posts requiring Moderation but NOT identified as SPAM
          • Click on the “Mark This Post Approved And Go To Topic” to mark the post as approved removing it from the list and to go to the topic.
          • Click on the “Mark This Post As Approved And Close” to mark the post as approved removing it from the list and to stay on the “New/Unread Posts Management” (aka “Admin Postbag”) panel.
          • Click on the “Mark This Post As Approved and Quick Reply” to open a text window where a quick reply can be composed.
            • After completing the quick reply, click the “Save New Post” button to save and to send the quick reply post.
            • The original post is marked as approved and removed from the “Admin Postbag” list.
          • Click on the “Delete this Post” button to disapprove the post removing from the list, and to delete it from the forum as well as the author’s lists of posts.
        • For topics with “SPAM” identified posts, click on “View Spam” button for the post to see the “Post Detail” for all the new/unread posts of in the topic.
Note:
When viewing topics with multiple new/unread posts of this type:

  • Only the latest post shown in the topic will have all the action buttons discussed below.
  • On the buttons with labels “Mark This Post …” the words “This Post’ are replaced by “All Posts”.
  • All the previous posts of this type in the topic will only have a “Delete This Post” and “Remove This Member And All Their Posts” buttons.
        • Clicking the “View Spam” button again, closes the slide down window if none of the below actions were performed.
        • For new/unread posts identified as SPAM possibly requiring Moderation
        • Click on the “Mark This Post Approved And Go To Topic” to mark the post as approved removing it from the list and to go to the topic.
        • Click on the “Mark This Post As Approved And Close” to mark the post as approved removing it from the list and to stay on the “New/Unread Posts Management” (aka “Admin Postbag”) panel.
        • Click on the “Mark This Post As Approved and Quick Reply” to open a text window where a quick reply can be composed.
          • After completing the quick reply, click the “Save New Post” button to save and to send the quick reply post.
          • The original post is marked as approved and removed from the “Admin Postbag” list.
        • Click on the “Delete this Post” button to disapprove the post removing from the list, and to delete it from the forum as well as the author’s lists of posts.
        • Click on the “Remove This Member And All Their Posts” to remove the author of the post from the Simple:Press forum and the WordPress website as well as to delete all his/her posts.

Plugin Special Notes

None

 

Template Tags Used in the Plugin

There are two (2) template tags available for this plugin that allow further customization of the plugin’s usage or otherwise customize the website. Both, ‘sp_AdminQueue()‘, and ‘sp_AdminLinks()‘ are incorporated into standard supplied Simple:Press themes.

  • If the location of the template tags in the themes as well as the argument and parameter values for the template tags are acceptable, nothing need be done.
  • If any item relating to the template tags are to be modified or if the other template tags are to be added to a theme, it is recommended that a Child or Custom theme is created first to accept the changes prior to installing this plugin.
  • In all cases the template tags should be called conditionally, if (function_exists(‘ ‘)) so that if the plugin is deactivated or does not exist, the website will continue to operate.

The Template Tags can be viewed by selecting their link below.

Action and Hooks Used in the Plugin

There are Actions and Hooks available in the Plugin’s Template Tags. The Template Tag’s Action and Hooks can be viewed by selecting its link below.

There are other Actions and Hooks available for this plugin to modify aspects of the plugin.
In file ‘sp-admin-bar-ahah-links.php‘:

  • apply_filters(‘sph_ShowAdminLinks’, $out, $br) – Allows modification of the contents of the Admin Links popup window contents before it is output/returned.

In file ‘sp-admin-bar-components.php‘:

  • apply_filters(‘sph_AdminQueueWarning’, $out) – Allows modification of the warning message, “WARNING: The admin postbag contains %s posts which require removal” that is displayed if there are 200 or more posts in the “Admin Postbag” before it is displayed/returned.
  • do_action(‘sph_quickreply_form’, $newpost, $topic, $post) – Hook fired just before the Quick Reply Form is displayed/returned.

In file ‘sp-admin-bar-ahah-quickreply.php‘:

  • do_action(‘sph_quick_reply’, $p->newpost) – Hook fired so plugins can act on the quick reply contents right before the message “Quick reply saved” is displayed.

In file ‘sp-admin-bar-ahah-spam.php‘:

  • do_action(‘sph_quickreply_form’, $newpost, $topic, $post) – Hook fired after the deletion of a user’s posts from the forum and deletion of the user from Simple:Press and from WordPress, but before the message, “%s Posts and User Removed” is displayed, where %s is replaced with the number of posts removed.

Plugin and Template Tag Changelog

Since Simple:Press version 5.0.

Codex page template tags sync’d to code version 5.6.3 and plugin version 1.4.15.



Individual Template Tags


 

sp_AdminQueue

Description

sp_AdminQueue() – This template displays the forum admin queue buttons.

Usage

sp_AdminQueue($args, $viewLabel=”, $unreadLabel=”, $modLabel=”, $spamLabel=”, $toolTip=”);

Arguments

$args – List of arguments for controlling display.
Type:
(string) (optional)
Default:
‘tagId’ => ‘spAdminQueue’
‘tagClass’ => ‘spAdminQueue’
‘buttonClass’ => ‘spButton’
‘icon’ => ‘sp_AdminQueue.png’
‘iconClass’ => ‘spIcon’
‘countClass’ => ‘spButtonAsLabel’

tagId‘: CSS ID for the Div.
tagClass‘: CSS Class for the Div.
buttonClass‘: CSS Class for the buttons.
icon‘: Filename of file containing the Admin Queue icon to display.
iconClass‘: CSS Class for the icon.
countClass‘: CSS Class for the count number in the buttons.

$viewLabel – Text shown as the label on the button for viewing the “New/Unread Posts Management” (aka “Admin Postbag”) panel.
Type:
(string) (optional)
Default:
None

$unreadLabel – Text shown as the label on the button showing the number of new/unread posts not needing moderation nor identified as potential SPAM.
Type:
(string) (optional)
Default:
None

$modLabel – Text shown as the label on the button showing the number of new/unread posts needing moderation and not identified as potential SPAM.
Type:
(string) (optional)
Default:
None

$spamLabel – Text shown as the label on the button showing the number of new/unread posts identified as potential SPAM.
Type:
(string) (optional)
Default:
None

$toolTip – Text displayed when the cursor hovers over the button for viewing the “New/Unread Posts Management” (aka “Admin Postbag”) panel.
Type:
(string) (optional)
Default:
None

Special Notes

In standard supplied Simple:Press themes this template tag is included in the forum Header (‘spHead.php’) file.
The exception is:

    • the reboot theme where the template tag is not included in the ‘spHead.php’ file, but is included in the ‘spHeadDesktop.php’ and ‘spHeadMobile.php’ files.

 

The function is called conditionally, if (function_exists(‘ ‘)), so that if the plugin is deactivated or does not exist, the website will continue to operate.

The template tag can be placed elsewhere in the forum pages if that better fits the site’s theme. If the template tag is to be modified or its location on a page changed, it is suggested a Custom or Child theme be made to accept the modified template tag. Please see discussion at Template Tags Used in the Plugin.

The function requires the use of file ‘sp-admin-bar-queue-tag.php’ located in the plugin’s Template Tag folder.

Examples

In the forum header display the “Admin Queue” having “tagClass of “spLeft”, “buttonClass” of “spLeft spButton”, “countClass” of “spLeft spButtonAsLabel”, “$viewLabel” of “View New Posts”, “$unreadLabel” of “Unread:”, “$modLabel” of “Need Moderation:”, “$spamLabel” of “Spam:”, and displaying the message “Open/Close the Admin Postbag” when the cursor is hovered over the View button. Call the function conditionally.

if (function_exists('sp_AdminQueue')) sp_AdminQueue('tagClass=spLeft&buttonClass=spLeft spButton&countClass=spLeft spButtonAsLabel', __sp('View New Posts'), __sp('Unread: '), __sp('Need Moderation: '), __sp('Spam: '), __sp('Open/Close the Admin Postbag'));

 

Actions and Hooks Used in the sp_AdminQueue Template Tag

  • apply_filters(‘sph_AdminQueue_args’, $a) – Allows modification of the arguments to the template tag. $a contains the parsed arguments.
  • apply_filters(‘sph_AdminQueue’, $out, $a) – Allows modification of the display code just prior to being output/returned. $out will contain the html display code.

Changelog

See Plugin and Template Tag Changelog for Template Tag changes and Codex page syncing to code versions.


 

sp_AdminLinks

Description

sp_AdminLinks() – This template displays the forum admin links button.

Usage

sp_AdminLinks($args=”, $label=”, $toolTip=”);

Arguments

$args – List of arguments for controlling display.
Type:
(string) (optional)
Default:
‘tagId’ => ‘spAdminLinks’
‘tagClass’ => ‘spAdminLinks’
‘icon’ => ‘sp_AdminLinks.png’
‘iconClass’ => ‘spAdminLinks’

tagId‘: CSS ID for the Div.
tagClass‘: CSS Class for the Div.
icon‘: Filename of file containing the Admin Links icon to display.
iconClass‘: CSS Class for the icon.

$label – Text shown as the label of the Admin Links button along with the icon.
Type:
(string) (optional)
Default:
None

$toolTip – Text displayed when the cursor hovers over the Admin Links button.
Type:
(string) (optional)
Default:
None

Special Notes

In standard supplied Simple:Press themes this template tag is included in the header (‘spHead.php’) file.
The exception is:

    • the reboot theme where the template tag is not included in the ‘spHead.php’ file, but is included in the ‘spHeadDesktop.php’ and ‘spHeadMobile.php’ files.

 

The function is called if the function ‘sp_AdminQueue’ exists, if (function_exists(‘ ‘)), so that if the plugin is deactivated or does not exist, the website will continue to operate.

The template tag can be placed elsewhere in the forum pages if that better fits the site’s theme. If the template tag is to be modified or its location on a page changed, it is suggested a Custom or Child theme be made to accept the modified template tag. Please see discussion at Template Tags Used in the Plugin.

The function requires the use of file ‘sp-admin-bar-links-tag.php’ located in the plugin’s Template Tag folder.

Examples

Display the Admin Bar Admin link button with “tagClass” of “spRight spButton”, “label” of “Admin Links” and displaying the message “Select an admin page” when the cursor is hovered over the “Admin Links” button. Call the function if the function ‘sp_AdminQueue()’ exists.

if (function_exists('sp_AdminQueue')) sp_AdminLinks('tagClass=spRight spButton', __sp('Admin Links'), __sp('Select an admin page'));

 

Actions and Hooks Used in the sp_AdminLinks Template Tag

  • apply_filters(‘sph_AdminLinks_args’, $a) – Allows modification of the arguments to the template tag. $a contains the parsed arguments.
  • apply_filters(‘sph_AdminLinks’, $out, $a) – Allows modification of the display code just prior to being output/returned. $out will contain the html display code.

Changelog

See Plugin and Template Tag Changelog for Template Tag changes and Codex page syncing to code versions.


More Topics In SimplePress: Plugins


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