r7 - 19 Jul 2005 - 01:25:52 - WillNorrisYou are here: TWiki >  Plugins Web > SuggestLinksPlugin
Tags:
navigation 2 Add my vote for this tag, , create new tag

SuggestLinksPlugin

[ move all devel chit chat to SuggestLinksPluginDev ]

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 stopwords (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 ...)

Settings

  • Short description of this Plugin (this appears in TWikiPlugins only if you enable it with suggestions=on)
    • Set SHORTDESCRIPTION = Automatically highlights group of words that could become a link
  • Stopwords 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"

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

Installation

  • Install the List::Permutor Perl package (see http://www.cpan.org).
  • Unzip the SuggestLinksPlugin.zip package in your TWiki installation directory.
  • 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)
  • I add an example of template that allows you to enable suggestions during preview
    • it's called edit.suggest.tmpl
    • to use it set SKIN=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.

-- AndreaSterbini - 26 Nov 2001

Topic attachments
I Attachment Action Size Date Who Comment
zipzip SuggestLinksPlugin.zip manage 6.3 K 01 Jan 2002 - 05:54 AndreaSterbini fixed a small problem with the cgi query
Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r7 < r6 < r5 < r4 < r3 | More topic actions
Plugins.SuggestLinksPlugin moved from Plugins.SuggestLinkPlugin on 27 Nov 2001 - 05:14 by AndreaSterbini - put it back
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback SourceForge.net Logo