Tag Clouds

From KnowledgeTree Document Management Made Simple

Jump to: navigation, search

Contents

Introduction

Tag Clouds is a new visualisation tool to assist in categorising and searching for documents.

Jalaloedien has written a good introduction to the topic and this component in his blog: http://people.knowledgetree.com/jalal/2007/02/21/12.html

Requirements

To implement a 'tag cloud', the user must be prompted to associate tags with a document on 'add document', 'checkin' or on 'edit tags'. These tags are a type of 'metadata' that can be displayed as a 'tag cloud' on the dashboard.

A user may click on known 'tags' in the 'tag cloud' and which will result in all associated documents being displayed that are accessible by the user.

Components

The Tag Cloud Plugin requires a user that is working with a document to associate 'tags' with it.

Dashlet

The dashlet must display the tags with the size scaled according to tag usage.

Clicking on a tag will show all documents which is associated with the tag and to which the user has access.

Metadata

Tag information is captured as part of the metadata.

A special field set must be created 'Tag Cloud' with a field called 'Tags'. This can then be used when the document is added, checked in, or simply editing metadata.

Database Requirements

The following tables are created:

  • document_tags (document_id int, tag_id int)

document_id => document.id

tag_id => tag_words.id

  • tag_words (id int, tag varchar(100))

Implementation

TagCloudPlugin

This is used to register all the components that are to be used and creates the fieldset and field required.

KTAddDocumentTrigger

This is the trigger that is activated on the postValidate trigger action when a document is added. This is what implements the population of the document_tags and tag_words tables.

KTEditDocumentTrigger

Similar to KTAddDocumentTrigger, but is activated on the postValidate trigger action when a document is edited.

TagCloudRedirectPage

This implements a 'virtual' page that renders the search results based on a tag word being selected via the dashboard.

TagCloudCriterion

This in conjunction with the TagCloudRedirectPage implements the search functionality based on a tag word.

TagCloudDashlet

This is the dashlet that renders the Tag Cloud on the dashboard.

  • get_tag_weightings()

Returns an array of weightings for tags based on their frequency

  • get_relevant_tags()

Returns the relevant tags for the current user.

Testing Criteria

  • Add a document with tags. Should see tags become visible on tag cloud.
  • Add a document with tags as another user that first user has no permissions to. Should see tags become visible on tag cloud, but first user should not see the new tags.
  • View document with tags. Change tags. Should see tag cloud change appropriately.
Personal tools