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 History Action Size Date Who Comment
Unknown file formatmd5 SuggestLinksPlugin.md5 r3 r2 r1 manage 0.2 K 2011-02-01 - 08:37 PeterThoeny  
Compressed Zip archivetgz SuggestLinksPlugin.tgz r3 r2 r1 manage 7.8 K 2011-02-01 - 08:37 PeterThoeny  
Compressed Zip archivezip SuggestLinksPlugin.zip r5 r4 r3 r2 r1 manage 10.2 K 2011-02-01 - 08:36 PeterThoeny  
Unknown file formatEXT SuggestLinksPlugin_installer r3 r2 r1 manage 3.5 K 2011-02-01 - 08:37 PeterThoeny  
Edit | Attach | Watch | Print version | History: r12 < r11 < r10 < r9 < r8 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r12 - 2013-10-16 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2016 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.