Freetag v0.220 Released! Tag combos, here we come!

It’s been a few weeks since an update of Freetag, and I’ve got a couple of really nice features built into this one. If you’re just hearing about this now, Freetag is an open-source tagging and folksonomy module that you can use to retrofit existing PHP/MySQL applications with tagging functionality like del.icio.us and flickr.

Powerful constructor options

The first, and really most important feature, is one that should have been in there from the beginning. You can now pass in an array of options to the constructor of Freetag, to customize the instance to your database parameters. It allows you to essentially build all of the instance-specific stuff into your own Freetag instance, instead of having to re-edit the class file every time you download a new version.

In addition to making upgrades work more smoothly, I’ve abstracted out the characters that the normalize_tag function uses to one of these constructor parameters. That means you can pass along your own preg_replace-compatible normalization filter. This allows you to effectively allow underscores, spaces, etc. in your normalized tags, and theoretically will also work for including high-ASCII from other charsets, like accents in Spanish and French.

Tag Combos

The second major feature is one i’ve been sitting on for a while, because I wanted to get it working nicely with the user-specific tagging schema in Freetag. Tag combos in Freetag allow you to get all objects tagged with a combination of an arbitrary number of tags. This allows Freetag-based sites to allow ‘drilldown’ browsing through tags – so you’ll be able to browse your tags for something like “la+dining”, which is super useful.

I owe Kellan some thanks for pointing out the link to Peter Cooper’s snippets sample of tag combos. I took his code as a starting point, and worked it into the Freetag schema, so that now it works well, plus it supports restricting to a particular user ID’s set. That should be very useful for browsing into especially complicated personally tagged datasets by highly metadata-prolific users.

What’s next?

I’ve received some requests for performance numbers, so i’ll be spending my next chunk of time prepping a stress testing suite that should give people a good idea of how Freetag will perform on your environment. If you’ve got some ideas about this, please post your suggestions to the Freetag mailing list!

Other than that, now that tag combos are part of Freetag, I’ll start brainstorming about a full boolean tag logic function that Leonard and I were tossing ideas back and forth about tonight. I can think of one or two ways to implement this with poor performance, but i’m really looking for a MySQL 3.X-compatible solution that will have reasonable performance. I may just include the ‘dumb’ versions in the next release, and save the optimizations for later. If you’ve got an opinion, chime in on the mailing list and let me know what you think.

Leave a Reply

Your email address will not be published. Required fields are marked *