Simple:Press Documentation

Plugin: AutoLinking

Plugin Description

Plugin: Autolinking – This Simple:Press plugin allows keywords in forum posts to be converted into URL links.

Plugin Overview

  • Parses post content and converts keywords into links based on a predefined keywords and replacement URLs lists set up by forum Admin.
  • It changes ALL occurrences of the keywords in ALL forum posts to links when displayed.
  • It does not change the actual content of the post saved in the database.

Plugin Features

Installing this Simple:Press plugin adds:

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

Activating this plugin provides:

  • A change to the new “Auto Linking” 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 “Components – Auto Linking” forum Admin panel.
    • The “Getting Started” link associated with the “Deactivate/Uninstall/Options” selections should be selected to view the pertinent information regarding the plugin.
  • A new “Components – Auto Linking” forum Admin panel where elements for this plugin are set up by the forum Admin.
    • Keywords are typed into the “Keywords” section.
    • The corresponding URL is typed into the “URL Replacement” which replaces the keyword when the keyword is used in a post.
    • The “Components – Auto Link” forum Admin panel can be accessed from the forum Admin menu at:
      • Forum > Components > Auto Linking
      • Forum > Plugins > Available Plugins > Auto Linking > Options
    • A new sub-menu entry “Autolink” linked to the new “Components – Auto Linking” forum Admin panel under the “Components” menu item access from the Admin menu at Forum > Components.
  • ALL occurrences of the “keywords” in ALL forum posts become links to their “URL Replacements”.

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

Plugin Requirements

Requires Simple:Press version 5.6.2 and above.

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

As part of the installation, a “Auto Linking” 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 “Components – Auto Linking” forum Admin panel.

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 “autolink“.
  • 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 “autolink.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 “Auto Linking” 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 Auto Linking plugin section or b) under the Components entry on the forum menu on the left side forum admin page click the Auto Linking sub-menu item to get the “Components – Auto Linking” Admin panel with the “Keywords” and “URL Replacements” sections.

Note:
It is strongly recommended the forum Admin distribute to all their users / publish the list of keywords and their URL Replacements so the forum users will understand the special use of those words in the forums.
    • Inputting Keywords and URL Replacements

A Keyword is input on a line in the “Keywords” section and the associated URL is input on the same line in the “URL Replacements” section.

Note:
The below steps have all the keywords input followed by all the URL replacements. A keyword could be input in the “Keywords” section followed immediately by its URL replacement being input in the “URL Replacements” section. Be certain to click the “Update” button when the process is complete.
    • Keywords
    • Go the “Keywords” section.
    • Enter a keyword, one per line.
      • Keywords can be a single word or a multi-word string to be matched in the post’s content.
      • Keywords are case sensitive. Ebay is not the same as ebay.
    • Repeat the steps above until all keywords are entered, then input the associated URLs.
    • URL Replacements
    • Go the “URL Replacements” section.
    • Enter a URL Replacement, one per line, associating the URL with the keyword on the equivalent line.
      • URLs must be in the  form http://xxx.com as it will get hyperlinked.
    • Repeat the steps above until all URL Replacements are entered.
    • If there are no other changes to be made on the panels, click the “Update” button at the bottom of the “Components – Auto Linking Options” sub-panel. Otherwise proceed to make the next change.
    • Examples
    • Keyword = ebay / URL Replacement = http://www.ebay.com
    • Keyword = Ebay / URL Replacement = http://www.ebay.com/rpp/gift-cards
    • Keyword = Simple:Press website store / URL Replacement = https://simple-press.com/store
    • Keyword = Simple:Press store plugins / URL Replacement = https://simple-press.com/store/plugins
    • Boundary Checking Selection

If a language is being used that does not follow standard word breaks (space, punctuation, etc), it may be beneficial to disable word boundary checking for the keywords.

    • Scroll down to the “Components – Auto Linking Options” sub-panel with its “Options” section.
    • Click in the check box to the left of “Do not use word boundary checking (recommended only for languages that don’t separate words by blank characters) to select to not use word boundary checking.
      • The check box is selected if it contains a green check mark.
      • Clicking a check box containing a green check mark deselects the check box and removes the green check mark.
    • If there are no other changes to be made on the panels, click the “Update” button at the bottom of the “Components – Auto Linking Options” sub-panel. Otherwise proceed to make the next change.

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 Auto Linking 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 “Auto Linking” 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 “Auto Linking” 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 the Auto Linking keywords and URL Replacements as well as the word boundary checking option via the Administrative Options.

Forum Admins and forum users type into their posts the Auto Linking keywords to have the final displayed posts contain the keyword as a link to the URL Replacement location.

    • Examples

While creating or editing a post, type the keywords shown below (without quotation marks) that were set up in the Plugin Administrative Options section examples to have the keywords become links to their respective URLs after the post is submitted.

    • “ebay” converts to a link to the ebay homepage, http://www.ebay.com
    • “Ebay” converts to a link to the ebay gift card page, http://www.ebay.com/rpp/gift-card
    • “Simple:Press website store” converts to a link to the Simple:Press store page, https://simple-press.com/store
    • “Simple:Press store plugins” converts to a link to the plugin page in the Simple:Press store, https://simple-press.com/store/plugins

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

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

More Topics In SimplePress: Plugins


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