Ultimate Tag Warrior 2.0 alpha

Alrighty, then.

Are you hardcore?

Then Ultimate Tag Warrior 2.0 alpha might be for you!

This is still somewhat non-shiny; but it appears to be backwards compatible with 1.1.2.

The bundled zip file contains enough information to get you into trouble; but probably not quite enough for you to get it working if you aren’t familiar with existing Ultimate Tag Warrior installs. (In fact, if you’ve never installed Ultimate Tag Warrior before, there’s a pretty good chance that it’s going to steal your lunchmoney.)

Long story short: shiny new code, lives in wp-content/plugins/UltimateTagWarrior (since there are now.. five.. files to it, I think). So once you’ve copied the plugin there, you’ll need to disable UTW1ish, and enable this version. The rest of your install should “all just work the same as it always did”.

If you’re feeling brave, by all means; start using the functions in the core class, and playing with the formatting bits (There are formatting bits! They allow a big bucket of control over the way lists of tags get displayed. All of the lists (I think..) in UTW1ish have been recreated using formatting strings. There’s more about that guff in the help file.)

Oh yuh! Just for Dan, there’s now a lazy-tagging thing that will display a list of all of your tags on the edit screen, and allow you to click on ’em to add them to the list of tags for the post.

And for….Cliff (I think?), tags can have spaces, sortof – if you enter tags with _’s, then most of the time* the formatting stuff will automagically display the tags with spaces (but link to the _’ed name)
* except in strings where you ask it to do something else – the standard %link% things will do the space thing.

Download Ultimate Tag Warrior 2.0 alpha

The answer is…

Tomorrow!

I’ve got most of UTW2 written; however, since it’s UTW2 and not UTW1-and-a-little-bit; I’ve still got a bunch of auxillary stuff to do like documenting the changes which have taken place, and rounding off some of the rough edges.

(Brief overview: there is now a “Core” class which does core tagging stuff; and an “Actions” class, which performs most of the WP action hook behaviour. The main plugin code behaves in the same way, but uses the classes.
I’ve also written a magical thing for formatting! It’s.. scary. Basically, a format is an array of formatting strings, which are used to display lists of tags. A formatting string looks kinda like “<li>%taglink% – %tagcount%</li>” That particular formatting string displays a link to the tag page with the number of occurances (not always applicable), wrapped in li tags. A format, is either a single formatting string; or an array of named formatting strings. More on that tomorrow! I’m getting sleepy (: )

There’s going to be a revolution, baby

I’ve been tinkering with Ultimate Tag Warrior this weekend; but alas, nothing new in the way of releases. It’s, how you say, “explodey into a million pieces sitting in little piles waiting to be put back together again”.

So far, I’ve built; err.. one of the things on my todo list (tags with spaces). However, I’ve also been restucturing my code quite drastically, so it’s going to be a lot easier to do a bunch of the other items on the list; not to mention any other things that materialise.

(Don’t panic! You’ll be able to use UTW2 without making changes to your themes or anything else – I’m keeping everything I do compatible with UTW1.)

I guess 2.0alpha will be out in the next few days. Failing that, a few days after that.

Ultimate Tag Warrior 1.1.1 1.1.2

There’s a new release at http://dev.wp-plugins.org/file/ultimate-tag-warrior/trunk/plugins/ultimate-tag-warrior.php.

It fixes the bugs with the most popular tags list; and it also fixes the bug where /tags/ didn’t work.

You’ll need to update your permalinks for the /tags/ bug, either by going to Options > Permalinks and refreshing; or manually changing your .htaccess file. If you’re doing this manually, you need to change the order of the rules so that the /tags/ rules comes first. I have no idea why this matters; but there you go.

I’ve also added a function for posting to del.icio.us… it’s… not very friendly, in that guard dog will bite your hand off kind of way. I have a feeling that I’m going to have to turn this into a administration function for logged in users; or ask the lovely people at del.icio.us to let the /post/ url accept tags. If you are that interested, by all means have a look.

I don’t think I’ve broken anything in the process, but if I have, sing out!

Go with 1.1.2. It turns out I did introduce a bug.

(p.s. with the other bug on my list relating to the previous page link; so far, not so good – I can’t use the post filters to do the SQL voodoo for the intersections of tags; so fixing this so that it always works, all the time isn’t going to be easy…)

Ultimate Tag Warrior: What Next?

This is my current todo list for Ultimate Tag Warrior

  • * Figure out Joshs’ problem UTW doesn’t play nice with version 1.5 of wordpress. 1.5.1 and beyond are A-OK, though
  • * Fix the Previous Entries bug (The link always shows, even when there aren’t previous entries) [This, I think will end up waiting until WordPress 1.6 comes out]
  • * Fix the /tags/ bugs (/tags/(tagname) doesn’t seem to work)
  • * Fix the really dumb bug in popular tags (Yeah. There’s a dumb bug which makes it break. Whoops!)
  • * Clean up tags when a post is deleted
  • * See if I can get UTW to work with ecto
  • * Write a converter that changes categories into tags
  • * Write a simplfied document for using UTW (I guess there is a point where too much documentation becomes daunting..)
  • * Write a thing that consolidates dupe name tags
  • * Write some things that allow tags with spaces (I’m inclined to structure this in such a way that when you edit tags, you use underscores; but when tags are displayed, they are displayed with spaces instead when it’s appropriate) 2.0a and beyond
  • * Provide a list of the existing tags on the post-editing screen, and allow clicking tags to lazy-add them 2.0a and beyond
  • * Write a thing for posting to del.icio.us (The opposite to usual del.icio.us thing.. I’ve kinda written one; but the first time you click on a “post to del.icio.us” link, del.icio.us pops up a OS-esque login box which is a little intimidating. In case you were wondering; it populates the tags with the tags of the post.. just the title/url is pretty trivial to do (: ) [Again, I think wordpress 1.6 will provide enough stuff to let me do this..]
  • * Make feeds available for tags [wordpress 1.6, I think…]
  • * Properly localise the plugin
  • * Allow unions when selecting multiple tags (Scary: allow a combination of unions and intersections)
  • * Figure out the cause of the 404 error that some people get
  • * World domination

If you have other suggestions, feel free to leave a comment here; that way it’ll be much harder for me to forget about them.

(*phew* I should have called it “Mediocre Tag Warrior and called it a day at version 1.0 (; )

Ultimate Tag Warrior 1.1

I’ve just released Ultimate Tag Warrior 1.1 into the wild! From here on (and indeed since last week), the latest version of Ultimate Tag Warrior is going to live here: http://dev.wp-plugins.org/browser/ultimate-tag-warrior/trunk/. I’ll keep on announcing new versions of it here, though.

Version 1.1 adds ultimate_show_related_tags(), which will display the tags related to the current tag set. If you are viewing /tag/monkey, it will list all of the tags of the posts that match monkey (except for monkey itself.) If you are viewing /tag/monkey+banana it will list all of the tags of the posts that match both monkey and banana (excluding the monkey and banana tags). Clicking the + beside a tag will add it to the tag set.

Dan made me write this suggested this feature.

Ultimate Tag Warrior 1.0

I’m so excited.. Ultimate Tag Warrior 1.0 is now available for download.

Changes
– /tags/Tag1+Tag2 syntax is now supported.
– The ultimate_show_post_tags now defaults to the local tag page; and allows specifying a set of external tag places to link to.

Functions
There are four functions worth thinking about (the rest is “don’t mind the man behind the curtain” stuff)

ultimate_show_post_tags($separator=”&nbsp;”, $baseurl=’/tag/’, $notagmessage = “No Tags”, $morelinks=””)
Display a list of tags associated with the current post.
$seperator is the string that seperates tags. It only appears between tags, and not at the beginning or end of the list.
$baseurl is the base URL to link the text of a tag to. The tag link takes the form {baseurl}{tagname}.
$notagmessage is the text to display when a post has no tags.
$morelinks is either a single link as a string, or an array of links. The links are base urls to other systems that support tagging. As with the base url, the final links take the form of {url}{tagname}. Each link is displayed as an » for brevitys sake.
ultimate_show_popular_tags($limit=10)
Display a list of the most popular tags. The tags are wrapped in li html tags, and the number of matching posts is also displayed.
$limit is the maximum number of tags to display.
ultimate_tag_archive($limit = 20, $postlimit=20)
The tag version of this plugin
ultimate_tag_cloud($order=’tag’, $direction=’asc’)
A tag cloud viewer that lists the tags using the order and direction. $order can be either “tag” or “count”, $direction can be “asc” or “desc”. The list of tags is just displayed with spaces in-between, linking through to the tag page. CSS classes .taglevel1 -> .taglevel7 control the look of tags based on popularity.

Plugin Administration
Click on “Manage”, then “Tags”. This will display a list of all available tags. Clicking on the “Rename Tag” link will allow renaming the tag. Clicking on the “Delete Tag” link will allow deleting a tag (and the associations to posts).
You can rename a tag to be the same as another one if you really want to – the tag cloud and tag archive will merge the tags, as if by magic; but if a post is tagged with both versions, it will seem to be tagged twice with the same tag. Adding a thing to merge tags properly is on my todo list.

Download
http://www.neato.co.nz/plugins/ultimate-tag-warrior-1.0.zip

This file contains the full documentation, the plugin file, an installation script, and a basic tag.php template.

It’s Broken!
(I hope not.)

If it is, send me an email… christine at neato dot co dot nz (I.. uh.. still haven’t figured out the problem with comments… they work okay with the default theme, but there’s nothing I can see that’s different around the comment thing. Oh the irony.. I make this genius plugin, and I can’t get my base install to work properly.)

Ultimate Tag Warrior 0.2

Ultimate Tag Warrior 0.2 has been unleashed!

Changes
– I’ve added a tag cloud function.
– There’s an administration backend that allows editing the name of tags, and removing tags.
– I’ve fixed a couple of bugs, too (;

Functions
There are four functions worth thinking about (the rest is “don’t mind the man behind the curtain” stuff)

ultimate_show_post_tags($separator=”&nbsp;”, $baseurl=’http://www.technorati.com/tag/&#8217;, $notagmessage = “No Tags”)
Display a list of tags associated with the current post.
$seperator is the string that seperates tags. It only appears between tags, and not at the beginning or end of the list.
$baseurl is the base URL to link the text of a tag to. The tag link takes the form {baseurl}{tagname}. The default points to Technorati. The value “/tag/” would link to the local tag page.
$notagmessage is the text to display when a post has no tags.
ultimate_show_popular_tags($limit=10)
Display a list of the most popular tags. The tags are wrapped in li html tags, and the number of matching posts is also displayed.
$limit is the maximum number of tags to display.
ultimate_tag_archive($limit = 20, $postlimit=20)
The tag version of this plugin
ultimate_tag_cloud($order=’tag’, $direction=’asc’)
A tag cloud viewer that lists the tags using the order and direction. $order can be either “tag” or “count”, $direction can be “asc” or “desc”. The list of tags is just displayed with spaces in-between, linking through to the tag page. CSS classes .taglevel1 -> .taglevel7 control the look of tags based on popularity.

Plugin Administration
Click on “Manage”, then “Tags”. This will display a list of all available tags. Clicking on the “Rename Tag” link will allow renaming the tag. Clicking on the “Delete Tag” link will allow deleting a tag (and the associations to posts).
You can rename a tag to be the same as another one if you really want to – the tag cloud and tag archive will merge the tags, as if by magic; but if a post is tagged with both versions, it will seem to be tagged twice with the same tag. Adding a thing to merge tags properly is on my todo list.

Download
http://www.neato.co.nz/plugins/ultimate-tag-warrior-0.2.zip

This file contains the full(ish) documentation (I, uh.. may have neglected to document the admin side), the plugin file, an installation script, and a basic tag.php template.

It’s Broken!
(I hope not.)

If it is, send me an email… christine at neato dot co dot nz.

Ultimate Tag Warrior 0.1

Version 1.0 is here!

This is the first release of my latest and greatest wordpress plugin Ultimate Tag Warrior. It’s a tagging plugin for wordpress with normalised data (Oooh. Aaaah); and three ways of getting tags back out (Tags on a post, popular tags, and an archive a-la my Category Archive plugin).

Functions
There are three functions worth thinking about (the rest is “don’t mind the man behind the curtain” stuff)

ultimate_show_post_tags($separator=”&nbsp;”, $baseurl=’http://www.technorati.com/tag/&#8217;, $notagmessage = “No Tags”)
Display a list of tags associated with the current post.
$seperator is the string that seperates tags. It only appears between tags, and not at the beginning or end of the list.
$baseurl is the base URL to link the text of a tag to. The tag link takes the form {baseurl}{tagname}. The default points to Technorati. The value “/tag/” would link to the local tag page.
$notagmessage is the text to display when a post has no tags.
ultimate_show_popular_tags($limit=10)
Display a list of the most popular tags. The tags are wrapped in li html tags, and the number of matching posts is also displayed.
$limit is the maximum number of tags to display.
ultimate_tag_archive($limit = 20, $postlimit=20)
The tag version of this plugin

Download
http://www.neato.co.nz/plugins/ultimate-tag-warrior-0.1.zip

This file contains the full documentation, the plugin file, an installation script, and a basic tag.php template.

Category Archive plugin 0.2

Behold, version 0.2 of my category archive plugin!

Changes

  • Some type checking on the parameters passed in to the functions.
  • The addition of get_limited_category_archive(), which gets only the categories specified
  • The inclusion of a $getchildren parameter to the standard archive-getter, which allows excluding the display of child categories

Function Reference

get_category_archive($limit = 10, $parent = 0, $getchildren=true)
  • $limit is the maximum number of posts to get for a category. 0, -1, or none will get all of the posts.
  • $parent is the id of the parent category to get.
  • $getchildren specifies whether the children of the categories should be displayed
get_limited_category_archive($categories, $limit = 10)
  • $categories is the list of categories to retrieve. This can be either an array of category ids, or it can be a comma seperated list (for example: 1,2,5,7)
  • $limit is the maximum number of posts to get for each category. 0, -1 or none will get all posts.

Output

css class = categoryarchive

css class = categoryarchivename
{the name of the category}
css class = categoryarchivedesc
{the description of the category, if set}
css class = categoryarchiveposts
{the most recent postings for this category. If there are more postings than the limit specified, a link is included to the category page.}

Download
The plugin lives at http://www.neato.co.nz/plugins/category_archive.txt