TIP RandomTopicPlugin is not installed on Foswiki.org.

RandomTopicPlugin

Pick and display some random topic names/links.

Syntax Rules

  • %RANDOMTOPIC% - inserts a single random topic name in its place.
  • %RANDOMTOPIC{params}% - inserts potentially more than one random topic, with user formatting. Parameters:
  • topics="5" - Number of topics requested. Default is 1 topic
  • include="^Web" - Perl regular expression. Only topics that match this expression will be shown. Default is set by RANDOMTOPICPLUGIN_INCLUDE (see below).
  • exclude="^Web" - Perl regular expression. Any topics that match this expression will never be shown. Default is set by RANDOMTOPICPLUGIN_EXCLUDE (see below).
  • format=" format string " . The format string accepts 3 quoted parameters:
    • $t will be expanded to \t (necessary for bullet lists)
    • $n will be expanded to \n (So that things appear on separate lines - again for bullet lists)
    • $topic will be expanded to the randomly chosen name
    • Default is a bullet list: "$t* $topic$n"

Examples

A single random topic:
%RANDOMTOPIC%

5 random topics as a bullet list:
%RANDOMTOPIC{topics="5"}%

10 random topics as a table:
%RANDOMTOPIC{
  header="| *Topic* |$n"
  format="| $topic |"
  separator="$n"
  topics="10"
}%

10 random topics, excluding any that start with "Web":
%RANDOMTOPIC{
  topics="10" 
  separator=", "
  exclude="^Web"
}%

Jump to a random topic:
%BUTTON{"I'm feeling lucky"
  icon="ruby"
  target="%RANDOMTOPIC%"
}%

RandomTopicPlugin Global Settings

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

  • Perl regular expression matching topics to be selected from
  • Set INCLUDETOPICS =
  • Perl regular expression matching topics to be excluded
  • Set EXCLUDETOPICS = ^Web

Plugin Installation Instructions

You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.

Open configure, and open the "Extensions" section. Use "Find More Extensions" to get a list of available extensions. Select "Install".

If you have any problems, or if the extension isn't available in configure, then you can still install manually from the command-line. See http://foswiki.org/Support/ManuallyInstallingExtensions for more help.

Plugin Info

Plugin Author: Foswiki:Main.MichaelSparks
Plugin Version: 12359 (2011-08-22)
Change History:
22 Aug 2011 2.0 modernized -- Foswiki:Main.MichaelDaum
28 Mar 2010 1.3.0 port to Foswiki -- Foswiki:Main.WillNorris
27 Dec 2005 1.201 Foswiki:Main.WillNorris - changed INCLUDE and EXCLUDE preferences (to INCLUDETOPICS and EXCLUDETOPICS) for Dakar compatability
15 Nov 2004 1.200 Crawford Currie - removed non-functional persist option, added exclude and include parameters, ported to Cairo & BuildContrib build system, add to CVS.
10 Jul 2003 1.010 Initial version
Dependencies: None
Plugin Home: http://foswiki.org/Extensions/RandomTopicPlugin
Support: http://foswiki.org/Support/RandomTopicPlugin
I Attachment Action Size Date Who Comment
RandomTopicPlugin.md5md5 RandomTopicPlugin.md5 manage 174 bytes 22 Aug 2011 - 16:02 MichaelDaum  
RandomTopicPlugin.sha1sha1 RandomTopicPlugin.sha1 manage 198 bytes 22 Aug 2011 - 16:02 MichaelDaum  
RandomTopicPlugin.tgztgz RandomTopicPlugin.tgz manage 4 K 22 Aug 2011 - 16:02 MichaelDaum  
RandomTopicPlugin.zipzip RandomTopicPlugin.zip manage 5 K 22 Aug 2011 - 16:02 MichaelDaum  
RandomTopicPlugin_installerEXT RandomTopicPlugin_installer manage 4 K 22 Aug 2011 - 16:02 MichaelDaum  
Topic revision: r3 - 22 Aug 2011, MichaelDaum
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy