Need someone to lead product management at your software company? I create software for people that create software and I'm looking for my next opportunity. Check out my resume and get in touch.

Related tags with Tags.app and Movable type

Freshness Warning
This blog post is over 17 years old. It's possible that the information you read below isn't current and the links no longer work.

I’m using Tim Appnel’s excellent Tags.app to create my tags pages. For example, see my bestof tag that highlights some of my favorite blog entries.

A new addition to my tag pages is a list of tags that are regularly used with the selected tag. For example, when I use the tag folksonomy I often use the tags tags, tagyu, tagging, simplelinks, web20—those terms are related to folksonomy because I commonly use them together.

To install this feature on your site, you’ll first need to be using the Tags.app plugin. You’ll also need to have Brad Choate’s SQL plugin. And you’ll need to be using MySQL as your database. This might work with other SQL databases, but I haven’t tested it, so you’re on your own there.

Stick this code somewhere in your tag page templates...

Related tags: <MTSQL query="SELECT t1.tagmap_tag, count(t1.tagmap_tag) AS cnt FROM mt_tagmap as t1, mt_tagmap as t2 WHERE t2.tagmap_tag='[MTSearchString]' and t2.tagmap_entry_id=t1.tagmap_entry_id and t1.tagmap_tag != '[MTSearchString]' GROUP BY t1.tagmap_tag ORDER BY cnt desc LIMIT 5"><a href="/tag/<MTSQLColumn column="1">"><MTSQLColumn column="1"></a> </MTSQL>

The entire thing needs to be on a single line in your MT template.

This will take the top 5 tags by usage that are used in entries where the current tag is also used. Want to show more or less tags? Change the LIMIT 5 to LIMIT 10 or whatever number you’d like.

Timothy Appnel
June 8, 2006 11:33 PM

Nicely done Adam. Some form of related tags will be in Tags.App. I released a glimpse in the preview release of the next version of Tags.App I was working on in December. http://code.appnel.com/changelog/2005/12/000019.html That release was put on hold pending the native implemention of tagging in MT.

This discussion has been closed.

Recently Written

Too Big To Fail (Apr 9)
When a company piles resources on a new product idea, it doesn't have room to fail. That keeps it from succeeding.
Go small (Apr 4)
The strengths of a large organization are the opposite of what makes innovation work. Starting something new requires that you start with a small team.
Start with a Belief (Apr 1)
You can't use data to build products unless you start with a hypothesis.
Mastery doesn’t come from perfect planning (Dec 21)
In a ceramics class, one group focused on a single perfect dish, while another made many with no quality focus. The result? A lesson in the value of practice over perfection.
The Dark Side of Input Metrics (Nov 27)
Using input metrics in the wrong way can cause unexpected behaviors, stifled creativity, and micromanagement.
Reframe How You Think About Users of your Internal Platform (Nov 13)
Changing from "Customers" to "Partners" will give you a better perspective on internal product development.
Measuring Feature success (Oct 17)
You're building features to solve problems. If you don't know what success looks like, how did you decide on that feature at all?
How I use OKRs (Oct 13)
A description of how I use OKRs to guide a team, written so I can send to future teams.

Older...

What I'm Reading

Contact

Adam Kalsey

+1 916 600 2497

Resume

Public Key

© 1999-2024 Adam Kalsey.