• This web contains the official documentation of the TWiki Release 4.0.2, code named DakarRelease. It is a read-only web for reference.
• This is an older release, see TWiki-6.0 for the latest release documentation.
classification1Remove my vote on this tag tagging2Add my vote for this tag create new tag
, view all tags

Tag-me Plugin

Plugin to tag wiki content collectively in order to find content by tags and to get a meaningful page ranking.


The larger a wiki gets, the harder it is to find content. This wiki tagging Plugin attempts to solve the issue based on these assumptions:

  • Assertion 1: Intranet search does not work well due to inadequate ranking of search engines on intranets. This is because there are typically not many cross-links between pages.
  • Assertion 2: Let the individuals build their own taxonomy to find content quickly
  • Assertion 3: Let the users do the ranking to get an "human intelligence" ranking of important content

There are clear benefits in tagging content in a large TWiki (10K or more topics):

  • Find relevant content in a large system quickly,
    • by quickly accessing related topics via the tags on a topic
    • by quickly accessing related topics via related tags listed in a specific tag view
    • by quickly identifying important tags in the tag cloud
  • Access my favorite topics quickly (assuming I tag topics of interest)
  • Solve the search ranking issue of wiki content indexed by a search engine
  • Help solve stale content issue (old topics do not get tagged)

The design goals of the TagMePlugin were as follows:

  • Any topic can be tagged by individuals -> create taxonomy for individuals
  • Show tag statistics of all users on each topic -> show popularity
  • Encourage users to reuse the same tag on a topic -> get a "collective ranking", or "vote for a tag", or "tag count"
  • Make it as easy as possible to increase the tag count
  • Make it as easy as possible to add a new tag to a topic
  • Encourage users to create new tags, but try to avoid use of similar tags for the same subject
  • Search for topic by tag, sorted by tag popularity

User Interface

Tag List on Topic

Every topic has a list showing all tags associated with the topic. Additional tags can be added to the topic, and new tags can be created.

Screenshot of tags shown on a topic:
Screenshot of tags on a topic

You see:

  • a link to the all tags view,
  • a list of tags with vote count and add/remove vote buttons,
  • an add tag selector, and
  • a link to create a new tag

Create New Tag

A never before used tag needs to be added to the system before a topic can be tagged with it. Use this form to add a new brand new tag.
  • Create new tag: (use only alphanumeric characters and underscore)

Add Tag to Topic

Once a new tag is created, it can be added in the tag list of the topic

List All Tags

TagMeViewAllTags shows all tags used in the system. The font size indicates the overall tag count of a tag.

Screenshot of tag cloud in the list all tags view:
Screenshot of view all tags tag cloud

TIP Tip: In a WebHome of a web you can show a tag cloud of all tagged topics in that web with this variable:
%TAGME{ tpaction="showalltags" web="%WEB%" format="<a href=\"%SCRIPTURL%/view%SCRIPTSUFFIX%/%TWIKIWEB%/TagMeSearch?tag=$tag;qweb=%WEB%\" style=\"font-size:$size%\">$tag</a>" }%

List My Tags

TagMeViewMyTags shows all tags used by logged-in user. The font size indicates the overall tag count of a tag.

Tag Search

TagMeSearch shows a list of topics that are tagged with a specific tag, sorted by relevance. Topics with a high tag count are shown first.

Plugin Variable

The Plugin handles a %TAGME{}% variable that performs different actions. The tpaction="" is a required parameter.

  • %TAGME{ tpaction="show" }% - shows the tag list on topic

  • %TAGME{ tpaction="showalltags" ... }% - view all tags or my tags as a tag cloud
    Parameter Comment Default
    by="me" My own tags only; can also be a USERNAME all tags
    web="%WEB%" Limit query to a web current web
    topic="*Plugin" Limit query to a topic, or a comma-space delimited list of topics with optional asterisk wildcards all topics
    exclude="fixme" Exclude tags; specify a tag, or a comma-space delimited list of tags with optional asterisk wildcards all tags
    minsize="90" Minimum size of tag $size (typically percent font size) "90"
    maxsize="180" Maximum size of tag $size "180"
    format="..." Format of a tag, tokens $tag, $size "$tag"
    separator=", " Separator between tags ", "

  • %TAGME{ tpaction="query" ... }% - tag search
    Parameter Comment Default
    by="me" My tagged topics only; can also be a USERNAME all tagged topics
    web="%WEB%" Limit query to a web current web
    topic="*Plugin" Limit query to a topic, or a comma-space delimited list of topics with optional asterisk wildcards all topics
    tag="..." Name of tag (required)
    sort="web" Sorting of tagged topics: "tagcount" by tag count (relevance), "web" by web then topic name, "topic" by topic name "tagcount"
    norelated="on" Do not show the list of "related tags" (show related tags)
    nototal="on" Do not show total number of topics found (show total)
    minsize="90" Minimum size of topic $size (typically percent font size) "90"
    maxsize="180" Maximum size of topic $size "180"
    format="..." Format of a topic, any token of FormattedSearch can be used, such as $web, $topic, $summary, $rev, $n. In addition, $votecount expands to the number of tag votes, $size to the suggested font size, and $taglist to the tag list of the topic. (nice formatting)
    separator=", " Separator between tags, $n or $n() can be used for newlines "$n"

  • %TAGME{ tpaction="newtag" ... }% - create new tag
    Parameter Comment Default
    tag="..." Name of tag. Accepts alphanumeric and underscore characters only (required)

  • %TAGME{ tpaction="add" ... }% - add tag to topic, or add vote to existing tag
    Parameter Comment Default
    tag="..." Name of tag (required)
    nostatus="on" Turn off status text shown when a tag is added or voted on (show status text)

  • %TAGME{ tpaction="remove" ... }% - remove my tag vote on existing tag
    Parameter Comment Default
    tag="..." Name of tag (required)
    nostatus="on" Turn off status text shown when a tag is removed or voted on (show status text)

Plugin Settings

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

  • One line description, is shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = Tag wiki content collectively to find content by keywords

  • Log add/create actions:
    • Set LOGACTION = 1

  • Debug plugin: (See output in data/debug.txt)
    • Set DEBUG = 0

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.

  • Download the ZIP file from the Plugin web (see below)
  • Unzip TagMePlugin.zip in your twiki installation directory. Content:
    File: Description:
    data/TWiki/TagMePlugin.txt Plugin topic
    data/TWiki/TagMePluginViewAllTags.txt Supporting topic to view all tags
    data/TWiki/TagMePluginViewMyTags.txt Supporting topic to view my tags
    data/TWiki/TagMePluginSearch.txt Supporting topic to search for tagged topics
    data/TWiki/TagMePluginDebug*.txt Supporting topics for debug
    data/TWiki/TagMePlugin*.txt,v Topic repository files
    lib/TWiki/Plugins/TagMePlugin.pm Plugin Perl module
    pub/TWiki/TagMePlugin/*.gif Icon files
  • Configure and enable the Plugin:
    • TWiki 4.0 and up: Run the configure script to enable the Plugin
    • Change the Plugin settings as needed
    • Add the %TAGME{}% variable to the page decoration. It should be exactly of the form %TAGME{ tpaction="%URLPARAM{tpaction}%" tag="%URLPARAM{tag}%" }%. This should be done so that it is rendered for every topic, e.g. somewhere in the skin template, such as the WebTopBar. A good place is also the WEBCOPYRIGHT since it gets displayed by every topic view. Example setting in the TWikiPreferences:
      • Set WEBCOPYRIGHT = Tags: %TAGME{ tpaction="%URLPARAM{tpaction}%" tag="%URLPARAM{tag}%" }%%BR% Copyright © 1999-2018 by...
    • For international character support: Remove the onblur attribute from the name="newtag" input tag in the "Create New Tag" form
  • Test if the installation was successful:
    • Add a tag


  • TWiki 04-Sep-2005 and older: Tags are lost if a topic is renamed or moved

Plugin Info

Plugin Author: TWiki:Main.PeterThoeny (blog)
Copyright: © 2006, Peter@ThoenyPLEASENOSPAM.org, StructuredWikis LLC
License: GPL (GNU General Public License)
Plugin Version: 14 Nov 2006 (V1.032)
Change History:  
14 Nov 2006: Fix IE browser crash issue on print (forms can't be named "tags"; debug by TWiki:Main.KevinKalmbach)
14 Oct 2006: Fix show default problem introduced by version 07 Oct 2006 (contributed by TWiki:Main.ChristianSuenkel)
07 Oct 2006: nostatus="on" parameter for add/remove tag (contributed by TWiki:Main.FredMorris)
05 Oct 2006: Fix issue of missing topics in tag search if topic name contains plus or minus sign (workaround for TWiki core Bugs:Item2625 and Bugs:Item2967)
04 Oct 2006: Fix issue of statistics moving WebHome tags to WebStatistics
02 Oct 2006: Support for topic rename (tags are no longer lost)
14 Sep 2006: MAKETEXT support (TWiki:Main.KoenMartens); fixed nested webs issue; fix in generated XHTML (TWiki:Main.ArthurClemens)
20 May 2006: Support international characters (contributed by TWiki:Main.AntonioTerceiro)
09 May 2006: Support for sub-webs; enclose tag list on topic in span class="tagMePlugin"; tag selector not shown if empty; limit max size of new tags to 30 characters
21 Mar 2006: TagMeSearch with minsize and maxsize paramters; TagMeSearch format with $votecount, $size; fixed JavaScript compatibility issue on TWiki 4.0
11 Mar 2006: TagMeSearch with sort, norelated, nototal, format and separator paramters; linked tags in create new tag section; renamed TagMeViewSpecificTag to a shorter TagMeSearch; workaround for Dakar Bugs:Item1838 to fix broken links in top bar
06 Mar 2006: Remove my tag vote; added exclude="", minsize="" and maxsize="" parameters; more intuitive icons; in default view, sort tags alphabetically instead of sort by tag vote
03 Mar 2006: Allow underscore in tags (and convert space and dash to underscore); added web="" and topic="" parameters; fixed font size issue in tag cloud with disproportional counts
28 Feb 2006: Use tabs in all/my/specific tags view; show related tags in specific tags view; check if topic exists when adding tags;
26 Feb 2006: Added view all tags / my tags (as tag clouds); view specific tag (sorted by tag count); do not allow guests to create new tags; log add/create tag actions
20 Feb 2006: Initial version
TWiki Dependency: $TWiki::Plugins::VERSION 1.024
CPAN Dependencies: none
Other Dependencies: none
Perl Version: 5.005
Benchmarks: GoodStyle 100%, FormattedSearch 100%, TagMePlugin 99%
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/TagMePlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/TagMePluginDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/TagMePluginAppraisal

Related Topics: TagMeViewAllTags, TagMeViewMyTags, TagMeSearch, TagMeDebugViewTags, TagMeDebugSearch, TWikiPlugins, DeveloperDocumentationCategory, AdminDocumentationCategory, TWikiPreferences

-- TWiki:Main.PeterThoeny - 14 Nov 2006

Edit | Attach | Watch | Print version | History: r17 < r16 < r15 < r14 < r13 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r17 - 2006-11-15 - 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-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.