Ultimate Tag Warrior 2.9.2

Looks like there’s an interesting bug which is doing odd things to comments. I’m not seeing it, though; but if you are, let me know! Thanks (: We found the bug – it only appears if you display related posts. Updating to version of the plugin will fix it. (I’m pretty sure I fixed a bug in the AJAX tag-adding bits too – it looked like it would have been broken, in any case)

Sometimes you take steps forwards, and then you take steps backwards.

In the WordPress 2.0 version of the plugin, I’ve moved the tag-entering bit back to how it was previously – the way I had it, to get it to work was a flakey-flakey thing which caused problems which far out-weighed its usefulness.

I’ve updated the help (I think!), to include the last few versions worth of changes.

And fixed a few other bugs here and there (:

Support Forum | Ultimate Tag Warrior, for WordPress 2.0 | Ultimate Tag Warrior, for WordPress 1.5


Ultimate Tag Warrior 2.9.1

– Spaces are going to be replaced with hyphens by default instead of underscores. Existing tags aren’t automatically changed; but if you want to, there’s some SQL here that will do it for you.
– Prefixes and suffixes for auto-tags had a dumb bug which I’ve fixed (:

– In wordpress 2, tag names with apostrophes are problematic. If things are broken, try renaming those tags.
– There’s still work to be done with special characters.
– I’m still not sure about .htaccess/rewriting issues in wordpress 2.

Support Forum | Ultimate Tag Warrior 2.9.1, for WordPress 2.0 | Ultimate Tag Warrior 2.9.1, for WordPress 1.5

Ultimate Tag Warrior 2.9

New uber-version of UTW!

– There are new options which might cause wonky behaviour (mostly just automatically included tags appearing) – go to the Options > Tags page and hit save to make ’em vanish.

New Features:
– If there are database permission issues that prevent the auto-updater from running, you won’t see error messages all over the place (but if you do a force-reinstall they will display)
– Related posts are sorted by most tags in common, then most recent first (previously it was just most tags in common order)
– Tag urls are now url-encoded (duh.) – this allows using umlats and other such things (at least in the way I tried (; including ü in your tags works, using magical characters directly is a bit bung still)
– Lists of posts can now include the date of the post (uses the %postdate% formatting placeholder, and the default date format)
– UTW_Show functions have changed a little – the first parameter still takes the name of a predefined format; but if you pass in custom formatting information, it will be added to the predefined format.
– The Options > Tags page has a whole bunch of embedded help. Yay help.
– The automatically included links can now be placed either before or after the content. There’s also the option to add text before and after the tags (handy for Tag: labels, wrapping tags in spans or divs and wrapping html lists in <ul> tags)
– I’ve fixed an odd bug with feeds (it worked for me, but didn’t for a couple of people.. it’s just one of those bugs, I guess)
– [Wordpress 2 only] On the write post screen, the tag entry and tag suggestion boxes have been shuffled into the right-hand column and put into magical boxes for shuffling and hiding and whatnot.
– There’s a new template function, UTW_ShowRSSFeedIcon(). It displays an RSS icon on tag pages for the current tag set (if you’re viewing /tags/tag1 it’s a link to the tag1 feed. On /tags/tag1+tag2 it’s a link to the feed with posts tagged both tag1 and tag2).
– The UTW_AddTagToCurrentPost() has an extra parameter – it allows specifying the minimum user level that you need in order to add tags. It defaults to 3.

Things I haven’t forgotten:
– The ability to exclude tags from displaying in tag clouds and on posts
– The gadabe issue with … in tag links
– Cobbling together a non-includey version
– Displaying tag clouds for a subset of tags (For facetish purposes)

If there are things I have forgotten, let me know (: I get forgetful sometimes..

Support Forum | Ultimate Tag Warrior 2.9, for WordPress 2.0 | Ultimate Tag Warrior 2.9, for WordPress 1.5

WordPress 2.0-RC1, Plugins and URL Rewriting

We fear change

My beloved WordPress plugin, Ultimate Tag Warrior uses URL rewriting to make the good stuff happen. In the 2.0-RC1 release of WordPress, the way URL rewriting works has changed a great deal. What follows, is what I needed to do in order to get Ultimate Tag Warrior to work properly.

First: How Ultimate Tag Warrior worked previously
With old URL rewriting; a request for /tag/sometag would be intercepted; and turned into index.php?tag=sometag behind the scenes. Underlying PHP magic would populate the $_GET array with the value of the tag parameter; then UTW would use the value from the $_GET array to figure out taggy stuff.

Next: Why this doesn’t work anymore
Requests for /tag/sometag are now matched in WordPress code; which means that the $_GET array is no longer being populated with the name of the requested tag. This broke pretty URLs, since as far as the plugin was concerned, there wasn’t a tag being specified.

Finally: How to wrangle it so that it does work properly
There are three things that I needed to do to get UTW to play nicely.

Phase one: Make changes to my rewrite rules
Previously, my additions to the rewrite rules array looked like this:
$rules[substr($baseurl, 1) . "?(.*)$"] = "index.php?tag=$1";

I had to change them, to be like this:
$rules[substr($baseurl, 1) . "?(.*)$"] = "index.php?tag=$matches[1]";
The rewritten URLs changed from having references to $1…$n to having references to $matches[1]…$matches[n].

Phase two: Add my query variables to the list of public variables
I needed to add a new filter in order to get my little paws on the name of the current tag.

This is the filter. It just adds tag to the list of query variables.
function ultimate_query_vars($vars) {
$vars[] = 'tag';
return $vars;

There’s a corresponding filter hookup. This is what mine looks like; because I have most (all?) of my actions inside a class named UltimateTagWarriorActions.
add_filter('query_vars', array('UltimateTagWarriorActions','ultimate_query_vars'));

(For completeness; if you don’t stash your action functions in a class, it looks more like
add_filter('query_vars', 'ultimate_query_vars');)

Phase three: Use the values from the query_vars object instead of $_GET
This part of the exercise was relatively straightforward. I replaced references to $_GET["tag"] with get_query_var("tag"). Obviously, this gave me the name of the tag from the URL instead of an empty string (:

It was a pain to figure out the hoops that I needed to jump through to get this to work; so if you’re in the process of getting a pre WordPress 2.0 plugin to work, I hope that it helps.

Ultimate Tag Warrior 2.8.8

Just a few little bug fixes in this version (:

(The issue with new posts in wordpress 1.6/2b has been fixed; along with an odd bug that Bill found with 404s and a weird plugin interaction; and it adds the core functionality needed for the experimental search)

Download here | General info here | Support Forum here

Update: Tag Search thingy! Download the tag search page; add it to your theme (and make changes as necesary… uh; if you have UTW installed in a different place, you’ll need to tweak the ajax url.. this is just an example!!! (: ); Create a new page, and use the Tag Search page template.

The tag search thing does depend on using version 2.8.8 of UTW.

Ultimate Tag Warrior 2.8.6

This is release #32 that I’ve made of this plugin. Thirty Two. It’s up to about ~90kb of PHP… The first version was 7.7kb.

I was going to call this version UTW 25; but nevermind (:

Changes in this version:

– Tagyu tag suggestions are retrieved using CURL, if available; and file socks when not – some people had hosting provider issues with the file_get_contents() way it initially was. I’ve also tinkered with the escaping – smart quotes were throwing it off by the looks of things.
– The ajax driven tag-adders will accept a comma separated list of tags, so now you can add a bunch o’ tags at once.
– I’ve added another predefined format: technoraticommalistwithlabel; which is like the technoraticommalist, except it puts “Technorati tags: ” at the front of the list. Mostly, this is for use with the automagically included tags.
– There’s a new thing that’s just a little bit special.
I’ve added two template functions: UTW_ShowTimeSensitiveWeightedTagSet and UTW_ShowTimeSensitiveWeightedTagSetAlphabetical. If you use either of these functions on the date.php or archive.php files in your theme (and index.php, I imagine (: ), when you’re viewing at a date based archive; the tag cloud will only display the tags for posts within that date range. (/archives/2005/08/ displays things from August of this year in the popular list in the sidebar, for example.)

– Oooh. I’ve made this theme available for download! (I’ve taken out the gravatar bit, so I *think* the only plugin dependency is UTW) You can find it here

Download here | General plugin info here | Support forum thing here