Freetag - an Open Source Tagging / Folksonomy module for PHP/MySQL applications

Tagging and folksonomy are pretty popular terms nowadays. In a nutshell, the concept is simple - allow users to describe content with descriptive words and phrases, or tags, that can then be used as an informal categorization system known as a folksonomy. The model of tagging has really caught on strong with the blogosphere zeitgeist (as well as tech investment), and for good reason: it works, so far.

Freetag is a module that implements a simple, fairly robust beginning of a tagging and folksonomy system. It works with PHP4 and MySQL 3.23 so far, and i imagine that if it gets popular, it should be easy to port to additional databases and/or languages.

You point it at your users, then you point it at your objects, and use the API to allow your users to tag your objects.

Eventually, it will be extended with a RESTful interface, so that you can plop a gateway PHP script somewhere and get instant access and inter-operation between any applications that use Freetag.

I’ve wanted to do this since my star-studded lunch group started thinking about integrating tagging between sites, and I started off on my crazy plan of creating a lightweight way to decide where to go to lunch. I felt that any site I was going to spend effort in developing should have some sort of tagging / folksonomy support, so i happily generalized the Freetag PHP class in preparation for a time to use it in other projects.

Freetag is now in use in at least one high-profile project - Upcoming.org, where I integrated Freetag within about an evening and a half. Since then, there have been some big improvements to the class, and you can see it in action behind the scenes over there.

For the technical details, head over to the Freetag project page. Or browse through the Freetag API Documentation.

It’s my first ever big contribution to the world of open source, as Freetag is released with a dual BSD and LGPL license. I hope you get some mileage out of it!

Thanks go out to all the people who I bounced ideas off of - Andy Baio, Phil Fibiger, Greg Knauss, Leonard Lin, Christian Newton, the users of eatlunch.at, as well as John Lim, on whose ADOdb for PHP layer I always rely.

Update! I had to make a small change to the library to fix a problem with quoted tags that someone found on Upcoming. I’m sure there will be many more problems found, now that the code is out there, but you should grab the tarball again to get version 0.201, because this is a really annoying bug. Sorry about that! - Sunday 4/17/2005, 10:00 AM.

6 Responses to “Freetag - an Open Source Tagging / Folksonomy module for PHP/MySQL applications”

  1. Marc Says:

    Omg, I cant believe no one replied yet. Thanks for sharing your code! I was gonna create my own class to play with but this is much nicer :). Thanks!

  2. getluky Says:

    Thanks for the comment, Marc. :) I have plans to incorporate some really good feedback i’ve been getting offline, plus some good features that I really should support. The advantage of having it open source is that we can all pound on it and make some really interesting things happen!

  3. MEX Blog Says:

    To tag or not to tag…

    Foto: aboutpixel.deTagging ist, wie man an der Häufigkeit der Meldungen in der Blogosphere erkennen kann, derzeit eines der spannendsten Themen im Netz. Auch wenn unterschiedliche Vorstellungen darüber existieren, wie Tags anzuwenden seien, und was s…

  4. Meriblog: Meri Williams’ Weblog » 184 Open Tabs Says:

    [...] — via Life In A Northern Time; also Who Should You Vote For? Open Source Usability Freetag — a free open source tagging [...]

  5. doomicile » Blog Archive » Webmontag in Hamburg Says:

    [...] Tagging Technik, freetag-library , datenbanknormalisierung/performance [...]

  6. You’re It! » Blog Archive » Interview with Gordon Luk (FreeTag) Says:

    [...] Nearly ten months ago, at the suggestion of Andy Baio I interviewed Gordon Luk (via IM) about FreeTag, an “Open Source Tagging / Folksonomy module for PHP/MySQL applications” he originally created for Upcoming and announced almost a year ago in his blog. [...]

Leave a Reply