A Dirty Hack to Fix the Disappearing Tags Problem in Ultimate Tag Warrior

Ultimate Tag Warrior is a great Wordpress plugin that lets you add tagging to your blog and build your own folksonomy. You can use it to show related posts or a nifty tag cloud.

As of version 2.3, though, Worpdress has tagging built right in. That means that development on UTW has stopped, leaving us with a very nasty bug in the final version. After someone comments on a post (and the comment is approved), all the non-category tags are deleted.

This is a known bug in UTW 3.1415926. I’m not quite ready to take the plunge into Wordpress 2.3, digging up new plugins to add the features I want and changing our theme. So in the mean time, I found an ugly hack to stop our tags from vanshing into thin air.

  1. Go to your ultimate-tag-warrior-core.php file.
  2. Find the SaveTags function.
  3. Comment out the code that removes tags that are no longer associated with the post.

The end of the SaveTags function should look like this:

// Remove any tags that are no longer associated with the post.
/*
if ($taglist == “”) {
// since “not in ()” doesn’t play nice.
$q = “delete from $tablepost2tag where post_id = $postID”;
} else {
// lop off the trailing space+comma
$taglist = substr($taglist, 0 ,-2);

$q = “delete from $tablepost2tag where post_id = $postID and tag_id not in ($taglist)”;
}
$wpdb->query($q);
*/
$this->ClearTagPostMeta($postID);
}

Please note that this is an ugly hack.  It makes it much more difficult to remove tags from a post when you want to.  I find that we get comments on posts way more often than we ever want to remove tags, so it’s a god tradeoff for the time being.

Got a better solution?  Post it in the comment below.

Put Related Tags in Category Pages with Ultimate Tag Warrior

Blogs are an integral part of whole “web 2.0″ business, so it’s not too surprising that bloggers like adding tags to their posts. If you are using Wordpress, one of the best ways to add tagging functionality to your site is with a plugin called the Ultimate Tag Warrior.

This article won’t go into all the great features included with Ultimate Tag Warrior (UTW). If you are new to the plugin, I suggest reading this great article by Lorelle. You can use it to show related posts, tags related to a particular post, and a bunch of other stuff. But there’s no easy way to show tags related to a particular tag or category.

If you take a look at one of our category page, for example the Environment category page, you notice a list of related tags. Here’s how I did it.

(more…)

Fighting Spam on a Diet - How to fix Akismet Performance Problems

Running into strange WordPress performance problems and database errors?  Akismet could be the culprit, but we’re in luck, it’s an easy fix.

Earlier I wrote a bit about our encounter with vicious, robotic Chinese comment spammers.  Since then we’ve had a few further issues, and I think I’ve found the culprit - Akismet, the plugin we’ve been using to fight the spam.

(more…)

Comment Spam Deluge - Did our Captcha get Hacked?

Have you been having trouble reading Unsought Input lately? You’re in good company – I’ve been having trouble writing for it.

We’ve been having issues with MySQL to the point of hanging connections and pleasant, but not very helpful WordPress error messages. It’s nice that user-friendly errors are built-in to WordPress, since you never want to give users cryptic, blue-screen-of-death style errors. But I needed to get to the root of the problem.

(more…)

Wordpress Tutorial: Using WP-Cache on Windows / IIS

Is your blog starting to bog down? Getting nasty emails from your ISP about overloading the database server? Since most blogs are read far more often than they are updated, caching your pages can result in a real performance improvement.

Wordpress has some very basic object caching, but you really need to be able to cache whole pages to see a big benefit. Luckily there is a very good page-caching plugin, WP-Cache.

If you are on a Linux or Unix host, installation is pretty straightforward.

Now, what if you are on a Windows/ IIS host and using ‘date and name based’, almost-pretty permalinks? No sweat. Okay, a little bit of sweat.

(more…)