Plugin: Topic Expire – A plugin allowing a topic author to specify an expiration date when creating a topic.
- Provides a screen or modified topic creation form where a topic’s expiration parameters can be specified or changed.
- Allows an author with permission to assign an expiration date when creating a topic.
- Allows an author with permission to specify when creating a topic whether the expired topic is deleted or moved to a different destination forum.
- Allows the forum admin using the forum toolset to modify the expiration date.
- Allows the forum admin using the forum toolset to modify the destination forum specified by the author.
Requires Simple:Press version 5.5.7 and above.
The plugin must be activated before it is operational.
As part of the installation, a “Topic Expire” section is added to the Plugin Management panel under the forum Admin menu – Plugins/Available Plugins. From this panel the Topic Expire plugin can be activated, deactivated, or uninstalled.
The forum admin must edit permissions of the various usergroups to allow them privileges to select an expiration date and to select whether the expired topic will be deleted or moved to a different forum.
Plugin Installation and Activation
Please see Using Plugins on how to obtain and install the Topic Expire 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 “Topic Expire” 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”.
Plugin Administrative Options
The forum admin must edit permissions of the various usergroups to allow them privileges to select an expiration date and selection of deletion or destination forum when the topic expires.
- Assign Permissions
- Allowing users to select a topic expiration date or destination forum is controlled by their group permission.
- Each member group that are to have the ability to change a topic expiration date or destination forum must have that permission turned on.
- This is accomplished from the Simple:Press Administration panel by clicking/opening “Permissions” and selecting “Manage Permissions Sets” in its sub-menu.
- Select “Edit Permission” for the permission set to be updated, scroll down to “Creating” and click the radio button next to “set a topic expiration when creating a new topic”.
- When enabled, the radio button is green in color. Click “Update Permission” to have the selection saved.
- At a later time clicking the radio button when it is green removes the green color and will remove the permission when followed by clicking “Update Permission” to save the revised selection.
- Changing Topic Expiration Date and Destination Forum
- Once set, only the forum admin can change the topic expiration date and whether a topic will be deleted or moved to another forum upon its expiration by using the Forum Tool box function in the Forum view.
- To modify the topic expire parameters the forum admin should:
- Navigate to the Forum view for the forum containing the topic of interest.
- Hovering the cursor over the topic allows the “Forum Toolset” icon (crossed screwdriver and wrench) to be displayed to the left of the “balloon” column.
- Clicking the “Forum Toolset” icon provides a drop down menu with “Topic Expiration” in the list of selections.
- Clicking the “Topic Expiration” selection provides a window where the existing selections for topic expiration date and destination forum are shown.
- Clicking in the top input box (date selection box) provides a popup calendar where the new month, year, and date for the topic to expire can be specified. If no expiration date is desired, select the contents of the box and delete the contents so the box is blank.
- Clicking on the down arrow to the right of the lower input box (destination forum selection box) provides a dropdown menu of possible forums into which the topic can be moved upon its expiration. Highlight/select the desired forum.
- Clicking the “Update Topic Expiration” box will result in the topic’s expiration date and destination forum being changed to the new values.
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 Topic Expire plugin’s available language translation files with translation statistics, and message translations can be viewed at Topic Expire 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.
Users with permission who author topics are able to select an expiration date for the topic when it is created as well as whether to delete the topic or move it to a different forum.
- Setting Topic Expiration Date
- The topic expiration date is set when creating a new topic. If the input box is left blank, there will be no expiration date.
- Below the topic text input area is the “Select Topic Expire Options” section in a new topic. Clicking in the top input box in the left corner of the section allows specifying the expiration date using the popup calendar.
- Using the calendar that appears after the input box is selected, specify the month, then year, then date the topic should expire .
- Selecting to Move or Delete an Expired Topic
- The selection to move an expired topic to another forum or just delete it is made when creating a new topic. If the input box is left blank (no forum selected), the expired topic will be deleted.
- In the “Select Topic Expire Options” section the lower input box showing “Select forum” as the default is where a destination forum for an expired topic is selected.
- Click on the down arrow to the far right of the input box to view the list of available forums where the expired topic can be moved.
Plugin Special Notes
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_topic_expire_button’, $tout) – Allows modification of the display code to add the topic expire button.
- apply_filters(‘sph_topic_expire_form’, $tout) – Allows modification of the display code to add the topic expire form to set the topic expiration date and/or the destination forum for the topic when expired .
- apply_filters(‘sph_topic_expire_check’, ‘forum’) – Allows check of a forum for topic expirations.
- do_action(‘sph_topic_expire_expired’, $topic->topic_id, $topic->forum_id, $topic->expire_action) – Hook fired to let others know a topic has been moved.
Plugin and Template Tag Changelog
Since Simple:Press version 5.5.1.
Version 5.6.5: hook name corrected from ‘sph_move_topic’ to ‘sph_topic_expire_expired’.
Codex page sync’d to code version 5.6.5 and plugin version 1.0.12.
More Topics In SimplePress: Plugins