Tags:
navigation2Add my vote for this tag create new tag
, view all tags

SuggestLinksPlugin

Automatically highlight group of words that could become a link

Introduction

A plugin that suggests you where you are probably forgetting to add a link.

This plugin for each topic name of this web:

  • splits the topic name in words
  • remove stop-words (single letters, "an", "the", "and")
  • drops too long topic names (max 4 words, i.e. 24 permutations)
  • tries to find plurals
  • computes all permutations of the words
  • looks for the above sequences of words separated by at most two words

TODO:

  • re-do the preview templates using skins and appropriate API handlers
  • add a set of stopTopics ... topics we don't want to link to (Web Home, Web Preferences ...)

Syntax Rules

Usage Example

you type you get if correctly installed
Example of a plugin that suggests topic links found in text Example of a plugin that suggests topic linksPlugins.SuggestLinksPlugin found in text Example of a plugin that suggests topic links found in text

Plugin Settings

Plugin settings are stored as preferences variables. To reference a plugin setting write %<plugin>_<setting>%, i.e. %NEWPLUGIN_SHORTDESCRIPTION%

  • One line description, is shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = Automatically highlight group of words that could become a link

  • Stop-words to ignore (single letters are always ignored):
    • Set STOPWORDS = an, and, the, to, for

  • You can choose the way the found text should be highlighted by setting the format to be applied before (FORMAT1) and after (FORMAT2) the text found. $topic stands for the topic name suggested, $web for the web you selected.
    • Example that just uses a different highlight color:
      • #Set FORMAT1 =
      • #Set FORMAT2 = $web.$topic
    • Example that just links to the found topic: (remove the # to enable)
      • #Set FORMAT1 = "prima $web.$topic]["
      • #Set FORMAT2 = "dopo"

Plugin Installation Instructions

Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the TWiki server.

  • Install the CPAN:List::Permutor Perl package from http://www.cpan.org.
  • Download the ZIP file from the Plugin Home (see below)
  • Unzip SuggestLinksPlugin.zip in your twiki installation directory. Content:
    File: Description:
    data/TWiki/SuggestLinksPlugin.txt Plugin topic
    lib/TWiki/Plugins/SuggestLinksPlugin.pm Plugin Perl module
  • Configure the Plugin:
    • Run the configure script to enable the plugin
    • Change the plugin settings as needed
  • When you want to see suggestions add the URL parameters:
    • suggestions=on
    • suggestionsWeb=TWiki this is the web you want to get the links from (default: the current web)
    • suggestionsLength=3 (default: patterns of no more than 4 words -- max limit = 6 i.e. 240 permutations per topic)
  • The edit.suggest.tmpl template can be used to enable suggestions during preview. To use it set COVER=suggest (or add skin=suggest to the URL)

If the installation is correct you should see the words "plugin that suggests topic links" above, highlighted and with an icon showing the alt="Plugins.SuggestLinksPlugin" string.

Plugin Info

Plugin Author: TWiki:Main/AndreaSterbini
Copyright: © 2001 TWiki:Main/AndreaSterbini
© 2007-2011 TWiki:Main.TWikiContributors
License: GPL (GNU General Public License)
Plugin Version: 2011-02-01
Change History:  
2011-02-01: TWikibug:Item6638: Doc improvements; XHTML fixes; changing TWIKIWEB to SYSTEMWEB -- TWiki:Main.PeterThoeny
2001-11-26: Initial version
TWiki Dependency: $TWiki::Plugins::VERSION 1.1
CPAN Dependencies: CPAN:List::Permutor
Other Dependencies: none
Perl Version: 5.005
Benchmarks: GoodStyle nn%, FormattedSearch nn%, SuggestLinksPlugin nn%
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/SuggestLinksPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/SuggestLinksPluginDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/SuggestLinksPluginAppraisal

Related Topics: TWikiPlugins, DeveloperDocumentationCategory, AdminDocumentationCategory, TWikiPreferences

Topic attachments
I Attachment Action Size Date Who Comment
Unknown file formatmd5 SuggestLinksPlugin.md5 manage 0.2 K 2011-02-01 - 08:37 PeterThoeny  
Compressed Zip archivetgz SuggestLinksPlugin.tgz manage 7.8 K 2011-02-01 - 08:37 PeterThoeny  
Compressed Zip archivezip SuggestLinksPlugin.zip manage 10.2 K 2011-02-01 - 08:36 PeterThoeny  
Unknown file formatEXT SuggestLinksPlugin_installer manage 3.5 K 2011-02-01 - 08:37 PeterThoeny  
Topic revision: r11 - 2011-08-23 - PeterThoeny
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.