Knowledge Base / Appnel Solutions 

Last Modified
17 October 2006 @ 9pm

Tags.App 1.1x Manual

This documentation is for version 1.13.

Tags.App is a plugin for the display and navigation of a content folksonomy (tags) in Movable Type weblogs.

SYNOPSIS

 <MTEntries>
   <p><$MTEntryTitle$><br />
   del.icio.us: <MTEntryTags><$MTDeliciousTag$> </MTEntryTags>
   here: <$MTTagList$>
   </p>
 </MTEntries>

 <div class=tagcloud>
   <MTBlogTags>
     <a href=<$MTTagLink$> style=font-size:<$MTTagSize$>px; 
            color:#<$MTTagGradient$>;>
       <$MTTag$>
     </a> 
   </MTBlogTags>
 </div>

 <!-- or the easy way -->
 <$MTTagCloud$>

DESCRIPTION

Tags.App is a plugin for the display and navigation of a content folksonomy (tags) in Movable Type weblogs.

The basis of this plugin was originally developed for The O'Reilly Radar weblog, http://radar.oreilly.com/. It also includes all of the functionality of the freely available mt-tagslite plugin.

Tags.App provides four areas of functionality in achieving this goal:

  • The means to dynamically navigate tags and tag intersections.[1]

    This functionality allows users to browse and search the content folksonomy created through the tagging of weblog entries. This functionality is similar to the functionality found on the popular social bookmarking site del.icio.us.

  • The display and linking of tag data as lists and clouds

    Tags.App includes a suite of template tags for the display of a content folksonomy. This functionality includes the ability to visualize tags as clouds with elements for volume and entropy (use over time).

  • Indexing of tag usage

    Tags.App provides the infrastructure to indexing tag usage efficiently and in the background. This is critical to enabling tags to be navigated and rendered as clouds.

  • The quick linking of the tags to other folksonomies such as del.icio.us or Flickr.

    This functionality is inherited from mt-tagslite.

[1] An intersection refers to entries that have been marked with two or more specific tags.

HOW TO TAG AN ENTRY

To tag a Movable Type weblog entry, enter each tag in the tag (keyword) field separated by spaces. Tags may only use alphanumeric unicode characters, colon (:), period/dot (.), and the underscore (_) character. Depending on the display options you have set for the New/Edit Entry screen in MT this field may not be visible. By default the tags field is not displayed.

If the tags field is not visible, click the Customize the display of this page link and the bottom of the screen. Select custom and check the box next to tags. Also select any other fields you want to display. Click the Save Changes button when completed. The entry screen will reload with the tags field visible.

Upon saving an entry in a Tags.App enabled weblog, the system will convert any uppercase characters to lowercase, remove any duplicates and sort the tags in ascending order.

TAGS

  • MTBlogTags [steps= days= top= latest=]

    A container tag that lists all of the tags for the weblog in context. This tag supports the following optional arguments.

    • steps
    • The number of levels to use when calculating cloud attributes such as volume and entropy. The higher the steps the greater the detail of the tag cloud. The default is 32.

    • days
    • Only list tags with at least one entry in the past N days.

    • top
    • Only list the top N tags based on count. Cannot be used with latest.

    • latest
    • Only list the last N tags based on their latest use. Cannot be used with top.

  • MTDeliciousTag

    Outputs the tag in context hyperlinked to del.icio.us.

  • MTEntryTags

    A container tag that lists the tags for the entry in context. Tags are stored in the keywords field and separated by a least one space.

  • MTFlickrTag

    Outputs the tag in context hyper-linked to Flickr.

  • MTFeedEntryTags

    An experimental container tag that extracts the first dc:subject tag from the Feeds.App entry in context and loops through each.

  • MTRelatedTags [steps= days= top= latest=]

    A container tag that lists any tags that are related to the current search. This tag mayu only be used in the context of a tag search. Other then the scope of the tags considered, its function is identical to the MTBlogTags container.

  • MTSystemTags [steps= days= top= latest=]

    A container tag that lists all of the tags for all Tags.App enabled weblogs in the system. Other then the scope of the tags considered, its function is identical to the MTBlogTags container.

  • MTTag

    Outputs the tag in context.

  • MTTagCloud [scope= days=N top=N latest=N]

    A widget tag for quickly inserting a tag cloud. This tag supports the following optional arguments.

    • scope
    • Defines the scope of the tag data to generate the cloud with. Recognized values are system, related and blog. If omitted the default value is blog.

    • days
    • Renders the cloud with tags that have at least one entry in the past N days.

    • top
    • Renders the cloud with the top N tags based on count. Cannot be used with latest.

    • latest
    • Renders the cloud with the last N tags based on their latest use. Cannot be used with top.

  • MTTagCount

    Outputs the number of entries with the tag in context.

  • MTTagEntropy

    Returns an integer representing a rating based on last use of the specified tag. The rating is relative to the number of steps. The closer the entropy is to the total number of steps the fresher the tag's usage.

  • MTTagGradient [low=#000000 high=#000000]

    Outputs a hexadecimal color string based on the entropy of the tag in context. The color is a shade between the low and high colors. The default value of the low and high attributes are CCCCCC (light grey) and 000000 (black) respectively.

  • MTTagLastUsed [format=]

    Outputs a timestamp to when the tag in context was last used. This tag can be formatted using the standard MT date specifiers.

  • MTTagLink [scope=]

    Outputs a URL to the tags script for listing entries with the tag in context. c is an optional argument that defines what the link will be generated for. A value of system will generate the link for a system search. Likewise a value of blog will generate the link for a search of the weblog in context. The default is blog.

  • MTTagQuery

    Outputs the tag query that was executed. For use on the Tags.App Results template.

  • MTTagQueryBlogID

    Outputs the ID number of the weblog being queried.

  • MTTagSize [min_size=]

    Outputs an integer representing the point size of a font. min_size specifies the lowest point size that can be returned. The default is 8.

  • MTTagsList

    A widget tag that displays a list of linked tags for the entry in context. These links will have a rel attribute of tag in order to work with distributed tagging systems such as Technorati.

  • MTTagsScript

    Outputs an absolute URL to the tag search script.

  • MTTagVolume

    Returns an integer representing a rating based on the relative count of the specified tag amongst other tags and the number of steps.

  • MTTechnoratiTag

    Outputs the tag in context linked to Technorati.

MT-XSearch Tags

  • MTSearchResults

    A container tag for all the search results and navigation.

  • MTSearchResultCount

    Inserts the total number of results returned from the search.

  • MTSearchString [decode_url=0|1]

    Inserts the search string used to fetch the results.

  • MTSearchHeader

    A container tag that renders its contents before the search results.

  • MTSearchFooter

    A container tag that renders its contents after the search results.

  • MTNoSearch

    A container tag the renders its contents if the tempalte was loaded without a search being performed.

  • MTNoSearchResults

    A container tag that renders its contents if no results were returned from the search.

  • MTSearchNavigation

    Container tag that holds all of the following navigational tags.

  • MTSearchPreviousLink

    Generates a URL to the previous page of results.

  • MTSearchNextLink

    Generates a URL to the next page of results.

  • MTSearchFirstLink

    Generates a URL to the first page of results.

  • MTSearchLastLink

    Generates a URL to the last page of results.

  • MTSearchAllLink

    Generates a URL to display all results in one page.

  • MTSearchPreviousNotFirst

    A conditional tag that only renders its contents if the previous page is not the first page of results.

  • MTSearchNextNotLast

    A conditional tag that only renders its contents if the next page is not the last page of results.

  • MTSearchHasPrevious

    A conditional tag that only renders its contents if the current page has a predecessor.

  • MTSearchHasNext

    A conditional tag that only renders its contents if there are more results (pages) after the current page.

  • MTSearchPageLinks

    Creates a context for generating a list of links to a page. Pages are based on the limit and offset params applied to the search.

  • MTSearchPageIndex

    Inserts the page number (an integer).

  • MTSearchPageLink

    Inserts a URL to generate the page number (managed by MTSearchPageLinks) currently in context.

  • MTSearchPageIndexNotCurrent

    A conditional tag that renders its contents if the MTSearchPageLinks index in context does not match the current page of results being rendered.

  • MTSearchPageIndexCurrent

    A conditional tag that renders its contents if the MTSearchPageLinks index in context matches the current page of results being rendered.

TAGS.APP RESULTS TEMPLATES

The Tags.App Results template is used by the mt-tags.cgi script to display entries based tag queries and intersections.

A default version of this template is created as a template module when a weblog is first enabled. This template will be named Tags.App Results. Because of limitations in the MT template management system, the template must remain as a module with this name.

Defining the System Tags.App Template

Movable Type does not support templates that are system resource and do not belong to a specific weblog. System navigation of tag data requires a template that is file-based.

This template is defined by the field labeled Template File that is found only in the system settings of Tags.App Enter the full path of the file on your server which should be used as your system navigation template. You can get a head start by copying either default_results.tmpl or default_results_blog.tmpl found in mt/plugins/tags/tmpl/.

This template will generally be made up of standard core MT tags and those provided by the MT-XSearch library Tags.App is built on. The only Tags.App specific tag you are likely to use is MTTagQueryString.

Note that system templates are not run in the context and have some limitations.

LINK GENERATION

The Tags.App script for navigating entries by their tags is built on the same application framework as the rest of Movable Type. By default URLs are expected to be in form similar to this:

 http://www.example.com/cgi-bin/mt/mt-tags.cgi?blog_id=1&tags=foo

This isn't terribly pretty and hard to remember for users to perform ad-hoc queries. Many tag-enabled sites like Flickr and del.icio.us use more streamlined and cruft-free URLs for access their tag views.

Creating streamlined URLs to this dynamic data requires at least some web server configuration and can take a different forms depending on your situation and preferences. To support advanced configurations, Tags.App includes system and weblog settings that can be used to control the generation of links to tag queries. These options allow you to generate links in different forms in order to match your specific scheme. These settings do not change the form in which parameters need to be passed into the tag script. Any redirect or rewriting rules will need to create a URL that results in a URL like the only above -- the mt-tags.cgi script is run with a query string parameter of tags and blog_id. The blog_id should be omitted for system views.

COMING SOON: A FEW MOD_REWRITE EXAMPLES.

REQUIREMENTS

Movable Type 3.2 is all that is required to use Tags.App.

INSTALLATION

NOTE: This plugin cannot be installed with the Tags plugin released by Six Apart as the two overlap and may cause conflicts that result in unexpected behavior. Also do not run mt-tagslite simultaneously with Tags.App. All the tags and functionality of mt-tagslite is included with this plugin.

  • 1 Download and unpack the latest Tags.App distribution file.
  • 2 Move the files into place.

    Where mt is Movable Type application directory, transfer the contents of the following distribution directories to

      extlib     -> mt/extlib 
      plugins    -> mt/plugins 
      schemas    -> mt/schemas 
      mt-static  -> path/to/mt-static

    DO NOT replace these directories in MT as they are likely to contain other files that your system and other plugins need.

    NOTE: Tags.App requires a few additional libraries, MT-XSearch, MT-XPlugin and MT::TemplateFile which are included with all distributions.

  • 3 Set permissions

    Once these files are in place, go into the mt application directory and set the permissions of mt-tags.cgi, mt-tagsmgr.cgi and mt-load-tags.cgi so it is world executable.

UPGRADING

Upgrading from a previous version of Tags.App is a fairly straight-forward affair. Follow these instructions:

  • Repeat the steps in INSTALLATION.
  • Delete the mt-load-tags.cgi script. There is no need to run it if you are upgrading.
  • To initialize you tag suggestions, go into MT and save one published entry in each Tags.App enabled weblog. THIS IS A TEMPORARY MEASURE UNTIL I FIGURE OUT A BETTER WAY TO ACHIEVE THIS.

SETUP

  • 1 Create the Tags.App data table.

    Run mt-load-tags.cgi to create the necessary data table for indexing tagged entries. Once you have run it successfully DELETE it. It is a potential security risk to not do so.

  • 2 Sign in to MT

    With your web browser sign in to the Movable Type application. If properly installed, you will see Tags.App listed on the plugins page in the System Overview or the weblog Plugins Settings tabs.

  • 3 Enable Weblogs for Tags.App

    To utilize Tags.App each weblog must be enabled. On the Plugins Settings tab of the weblog you wish to enable, click the Tags.App Show Settings link. Check the Tags.App Enabled box. You can customize how links are generated at this time if you wish. Click the Save Changes button once completed. Your weblog is now configured for Tags.App use.

    If you are enabling a weblog with existing published entries Tags.App will build an index at this time. Depending on the number of entries and the availability of background processing this may take some time. See "ENABLING & DISABLING TAGS.APP" for more.

  • 4 Enabling Tag Navigation at the System Level

    You can optionally choose to enable the dynamic navigation of tagged data across the entire Movable Type system of weblogs. On the Plugins screen in the System Overview, click the Tags.App Show Settings link. Check the Tags.App Enabled box. You must define a template file to use for rendering system view pages. See "TAGS.APP RESULTS TEMPLATES". Like the weblog settings you can define how links are generated to suit your URI scheme.

ENABLING & DISABLING TAGS.APP

Tags.App performs a number of task that can be selective enabled/disabled to better control the system overhead associated with these processes. These processes include background indexing[3], the dynamic navigation of tags and the rendering of tag clouds. The effect enabling & disabling Tags.App varies slightly on the weblog and system level.

Weblog

When this functionality is initially enabled for a given weblog three this happen:

  • Navigation of entries by tags and tag intersections facilitated by mt-tags.cgi are enabled.
  • All existing published entries will be indexed. If background processing is available it will be used. Either way, this process may take some time if the weblog has a number of existing entries.
  • A default template used to display entries by tag or intersection by the mt-tags.cgi script. This template is named Tags.App Results and can be found under the weblog's template modules. Due to a limitation of Movable Type this template cannot be renamed.

Disabling a weblog has a similar effect. Once disabled Tags.App will:

  • Remove the index of tag/entry assignments. This process may take some time. Background processing will be used if possible. The tags themselves are left untouched.
  • Disable the navigation of tags and tag intersections.

Disabling a weblog will not removed the default template, Tags.App Results from the weblog. This removal can be done manually through the template listing screen if necessary.

System

Enabling & disabling Tags.App system functionality is more limited in scope. It varies in that a separate system index is not maintained. Instead the plugin uses the indices of each of the enabled weblogs. Since MT does not have the concept of a system template a default template is not created. See "TAGS.APP RESULTS TEMPLATES" for more on creating a template for system navigation.

Essentially, enabling & disabling the plugin from the System settings turns tag navigation and intersections on or off at that level.

[3] This is the purpose to the MT::TagMap object and its underlying data table.

EXPERIMENTAL

Extracting Tags From Syndication Feeds

Tags.App also provides you with the experimental option of extracting and displaying tags from RSS syndication feeds. The plugin looks for a dc:subject element in the feed entry in context and extracts tags from that. This is a convention set by the RSS feeds generated by del.icio.us.

Here is some example MT template markup of its use with Feeds.App:

 <MTFeed uri=http://del.icio.us/rss/tag/batman>
   <MTFeedEntries>
     <p><$MTFeedEntryTitle$><br />
     <MTFeedEntryTags><$MTDeliciousTag$> </MTFeedEntryTags>
     </p>
   </MTFeedEntries>
 </MTFeed>

SEE ALSO

mt-tagslite http://code.appnel.com/mt-tagslite

Feeds.App http://code.appnel.com/feeds-app

Folksonomy (Wikipedia) http://en.wikipedia.org/wiki/Folksonomy


 

Submit Feedback on This Article

Your comments on how we can improve this article are appreciated. Please do not use the feedback form to submit support requests or question. We will not respond to or publish such queries submitted through this form.

Back to Home