wiki:TagsPlugin/0.5/Installation

Version 1 (modified by athomas, 7 years ago) (diff)

Copied old docs.

Setting up tags in Trac

Note: setuptools must be installed on your system for this to work.

  1. Install Trac 0.9 through 0.11 and set up a trac project.
  2. Download tags:
Trac versionZIPSubversionBrowse
0.10download(/tagsplugin/tags/0.4.1, tags-0.4.1.zip)?http://trac-hacks.org/svn/tagsplugin/tags/0.4.1source:tagsplugin/tags/0.4.1
0.11download(/tagsplugin/tags/0.5, tags-0.5.zip)?http://trac-hacks.org/svn/tagsplugin/tags/0.5source:tagsplugin/tags/0.5
  1. Build and install an egg from this source.
  1. Configure appropriately for your version of Trac.

For Trac 0.10, update your trac.ini with the following:

[trac]
default_handler = TagsWikiModule

[components]
trac.wiki.web_ui.wikimodule = disabled
tractags.* = enabled

NOTE: Be careful with the default_handler entry, it's already in the file. You must override it''

For Trac 0.11 update your trac.ini with this:

[components]
tractags.* = enabled

Be sure to remove any previous TagsPlugin configuration changes. In particular trac.wiki.web_ui.wikimodule = disabled and default_handler = TagsWikiModule must be removed.

  1. Run trac-admin <env> upgrade on your Trac environment.
  2. Restart your web server.

At this stage the plugin should be working and you should see a text control for tags in your Wiki edit page. You should also see a navigation link in the top-right corner labeled Tag Index.


You're good to go. See TagsPlugin for more on how to use tags.

Customising the Default Behaviour

If you want to customize the default behaviour of the tag index, or any of the macros, edit the [tags] section of your trac.ini:

OptionDescription
index=cloud|listDisplay the tag index as a cloud or list?
index.args=...Keyword arguments to pass to the index display function (see TagCloud and ListTags for details).
listing.args=...Keyword arguments to pass to the listing for each tag under the /tags/ URL space.
<macro>.args=...Default arguments to pass to each of the tag macros, in addition to those provided in the macro call.
expression_space=...true or false. enables/disables expression support under /tags

eg.

[tags]
index = cloud
index.args = smallest=10, biggest=40, mincount=2, showcount=false
listing.args = showheadings=true
tagcloud.args = mincount=2, showcount=false

If you want to customize which ticket fields to extract tags from, edit the fields variable in [tags.ticket] section in trac.ini. (Fields that can be used: component,severity,keywords,priority,owner,reporter,cc,version,milestone,status,resolution,summary,description; summary and description aren't recommended.). e.g.

[tags.ticket]
fields=component,severity,keywords