Simple:Press Documentation

Plugin: Unanswered Topics

Plugin Description

Plugin: Unanswered Topics – This Simple:Press plugin provides the ability to show a page of unanswered topics inside the forum between the forum’s header and footer display.

Note:

  • The Simple:Press Plugin: Template Tags and Widgets must be installed and activated for its “Unanswered Posts” template tag before this plugin can operate properly.
  • The sp_AddButton template tag or another equivalent needs be added to a Child or Custom theme to provide a link to the “Unanswered Forum Topics” page provided by the “Unanswered Topics” plugin.

Plugin Features

Installing this Simple:Press plugin adds:

  • A new “Unanswered Topics” section in the Plugin Management panel under the 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 “unanswered” containing the plugin’s files.

Activating this plugin provides:

    • A change to the new “Unanswered Topics” section in the Plugin Management panel under the Admin menu path Forum > Plugins > Available Plugins so the plugin can be deactivated, or uninstalled.
      • There are no options for this plugin.
      • The “Getting Started” link associated with the “Deactivate/Uninstall” selections should be selected to view the pertinent information regarding the plugin.
    • A new “Unanswered Forum Topics” page containing the list of unanswered topics in the website forums.
      • “Unanswered” is interpreted as only the original topic post is in the topic. No other posts have been made to the topic.

Note:

  • The “Unanswered Forum Topics” page would have a URL of “website/forum/unanswered”.
  • A link, menu item, tab or button to that page must be created on the site (possibly in the header of the forum page) to allow forum users to navigate to the page.
  • The sp_AddButton template tag or another equivalent could be added to a Child or Custom theme to provide such a link.

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

Plugin Requirements

Simple:Press version 5.5.7 and above is required.

This plugin requires the Simple:Press Plugin: Template Tags and Widgets installed and activated and uses the Template Tag: Unanswered Posts function.

The “Unanswered Topics” plugin must be installed, and activated before it is operational.

As part of the installation, an “Unanswered Topic” 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, or deleted.

  • There are no options that need be set up for this plugin.

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

The plugin does not have template tags of its own, but requires the use of the “Unanswered Post” template tag from the “Template Tags and Widgets” plugin on the new “Unanswered Forum Topics” page provided by this plugin.

More importantly the sp_AddButton common-view template tag (or equivalent) must be added to a theme for providing a link to the new “Unanswered Topics” page provided by this plugin. It is strongly recommended that a Child or Custom theme be made to accept this necessary addition to a theme. As will be shown in the examples, it is recommended that the link be added to the Child Theme’s header file.

Plugin Installation and Activation

Please see Using Plugins on how to obtain and install the Plugin: Template Tags and Widgets required by this plugin.

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

  • Whatever method is used to add this Simple:Press plugin, the folder that should have been added to the forum plugin folder is named “unanswered“.
  • 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 “unanswered.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” and then “Plugins” from the drop down Forum Admin menu. On the Simple:Press Administration panel select the “Unanswered Topics” plugin on the “Plugin Management” panel and click on “Activate”. The “Activate/Delete” label changes to “Deactivate/Uninstall”.

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

Plugin Administrative Options

Once installed there are no options that need to be set in the Simple:Press admin area.

WARNING:
Please see the Plugin Special Notes section of this Codex page for the necessary addition required to make the “Unanswered Topics” plugin function correctly along with optional display layout changes in the new “Unanswered Forum Topics” 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 Unanswered Topic 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 “Unanswered Topics” 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 “Unanswered Topic” 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

Please see the Plugin Special Notes section of this Codex page for implementation changes that allow the discussion in this section to be valid.

    • Getting to the “Unanswered Forum Topics” Page
    • If the sp_AddButton template tag as described in this page’s Plugin Special Notes section was implemented the forum user will see:
      • A button labeled “Unanswered” in the header of the forum pages.
      • Clicking on the “Unanswered” button results in the “Unanswered Forum Topics” page being displayed with its list of unanswered forum topics.
      • Within each “unanswered topic” listing:
        • Click on the link associated with “Forum” to navigate to the named forum and its posts, where at least one of the posts is “unanswered”.
        • Click on the link associated with “Topic” to navigate to the actual post that is “unanswered”.

Note:

  • If the Plugin: Template Tags and Widgets has not been installed and activated before this plugin is activated, attempting to view the list of unanswered posts using the “Unanswered Forum Topics” page generated by the ‘spUnansweredView.php’ file will result in the following error message being displayed:
  • “The Template Tags plugin for SP is required for the Unanswered Posts plugin to work.”
  • Please see Using Plugins on how to obtain and install the Simple:Press Plugin: Template Tags and Widgets .

 

Plugin Special Notes

A. Without modification of a forum theme, a forum user does not have a means of navigating to the new “Unanswered Forum Topics” page.

    • Setting Up Access to the “Unanswered Forum Topics” page
    • The “Unanswered Forum Topics” page has a URL of “website/forum/unanswered”.
    • A link, menu item, tab or button to that page must be created on the site (possibly in the header of the forum page) to allow forum users to navigate to the page.
    • Whatever is added should not be added to a standard supplied Simple:Press theme, but should be added to a Child or Custom theme to provide access.
    • In this example, the sp_AddButton will be added to the header of a Child theme based on the Simple:Press “Default” theme.

Example

  • Using the child theme based on the “Default” theme in the header immediately after the call to ‘sp_MemberButton’ that displays the “Members” button and link conditionally call the “AddButton()” template tag in the header of forum pages with “tagClass” of “spButton spRight”, “icon” of “sp_ControlOpen.png”, and “link” of “http://funsite/?page_id=104/unanswered” where “funsite” is the website, “?page_id=104” is the forum page address within the website, and “unanswered” is the address for the “Unanswered Forum Topics” page. Display the “label” of “Unanswered” on the button, the message “Go to Unanswered Forum Topics” when hovering the cursor over the button, and make the “buttonID” be “spLogoButton”.A. If not already done, download the Default Child Framework and set it up as discussed in the Creating a Child Theme page. If not already done, copy the Default theme’s ‘spHeader.php’ file over to the child theme and in the ‘userInfo’ section add the call to ‘sp_AddButton()’ as shown under “After” below and save.Before:
    sp_MemberButton('tagClass=spButton spRight', __sp('Members'), __sp('View the members list'));
    sp_InsertBreak('direction=right');
    
    sp_LastVisitLabel('tagClass=spLabelSmall spRight', __sp('Last visited %LASTVISIT%'));

    After:

    sp_MemberButton('tagClass=spButton spRight', __sp('Members'), __sp('View the members list'));
    sp_AddButton('tagClass=spButton spRight&icon=sp_ControlOpen.png&link=http://funsite/?page_id=104/unanswered', __('Unanswered'), __('Go to  Unanswered Forum Topics'), 0, 'spLogoButton');
    sp_InsertBreak('direction=right');
    
    sp_LastVisitLabel('tagClass=spLabelSmall spRight', __sp('Last visited %LASTVISIT%'));

B. It may be desirable to modify the display layout on the “Unanswered Forum Topics” page.

    • Changing the “Unanswered Forum Topics” Page Layout
    • Changes are made by modifying the arguments and/or parameters in the Unanswered Posts template tag call in the ‘spUnansweredView.php’ file.
    • The ‘spUnansweredView.php’ file is located in the “unanswered” plugin’s “template-files” folder which if the default is being used is found at …/sp-resourses/forum-plugins/unanswered/template-files.
    • The settings used on the “Unanswered Forum Topics” page are:
sp_UnansweredPostsTag('itemOrder=FTAUD&limit=10');
    • This creates a list of the latest 10 unanswered posts showing the Forum link, a Topic link, membersAvatar, members name and the date of post.
  • Please see the Template Tag: Unanswered Posts Codex page for details on the arguments and parameters in the template tag and what they control in a displayed page.

Template Tags Used in the Plugin

There are no Template Tags supplied by this plugin.

The plugin does require:

  • the sp_UnansweredPostsTag template tag from Plugin: Template Tags and Widgets for use in the new “Unanswered Topics” page provided by the “Unanswered Topics” plugin.
  • the addition of link, menu item, tab, or button to allow forum users to navigate to the “Unanswered Forum Topics” page.
    • In the example shown on this Codex page, the sp_AddButton Common View template tag was added in the header file (‘spHead.php’) of a Child Theme Framework based on the “Default” theme to link to the new “Unanswered Forum Topics” page.
    • Depending on Simple:Press standard theme selected, the change may have gone into the Child Theme Framework’s ‘spHeadDesktop.php or ‘spHeadMobile.php’ files rather than the ‘spHead.php’ file.
    • Please see the

Plugin Special Notes

    • section of this Codex page for examples of an implementation.

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

More Topics In SimplePress: Plugins


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