Christine of neato.co.nz

⇩ More

Ultimate Tag Warrior 2

A brief introduction…
Ultimate Tag Warrior (UTW) is a tagging plugin for wordpress. It allows storing a set of keywords (or as current slang dictates, tags) against posts that behave like categories – the tags can be displayed on a post, you can go to the archive page for a tag, and there are RSS/atom feeds available. Unlike categories, you can also view archive pages and feeds for sets of tags such as the posts which are tagged with both “photograph” and “food”, for example.

Beyond the category-like behaviour; UTW also provides ways of getting an overview of your tags through tag clouds, a long tail graph, and a weighted bar arrangement. UTW can also be coaxed into linking to other tag-savvy websites such as del.icio.us, Flickr and Technorati.

One of the more splendid things that it can do, is use the Yahoo! content analysis bits and pieces to look at the text of the current post, and make suggestions for the tags.

New! Exciting!: I’ve created a forum over here for Q&A type stuff.. so if you have a question, that’s a better place to ask it than here (:

Table of contents

  1. This page
  2. Downloading
  3. Installing
  4. Tagging
  5. Customising
  6. FAQ’s
  7. Previous versions and downloads

This page
This page is a work in progress (: As was pointed out, the old page that lived here wasn’t too helpful for new users; so I’ve scooted that off to its own page, and this will become more of a getting the plugin going sort of a page.

Downloading
Wordpress 1.5 and WordPress 2.0 diverge enough that I need to make two versions of the plugin. Use the first one with WordPress 2.0 RC1 and up, and the second one with WordPress 1.5 and up (but less than 2)
Ultimate Tag Warrior 2.9.2.1, for WordPress 2.0 | Ultimate Tag Warrior 2.9.2.1, for WordPress 1.5
An example theme can be downloaded from here.

Installing
For version 1.5 of wordpress
Wordpress 1.5 doesn’t like plugins in subfolders, so there’s an extra little step needed to get it working.

  1. Copy the Ultimate Tag Warrior plugin files into your plugin directory
  2. Change in $install_directory value in ultimate-tag-warrior-actions.php to “/” (it’s on about the fifth line)
  3. Enable the plugin

For version 1.5.1+ of wordpress (Including 1.6 alpha)

  1. Copy the Ultimate Tag Warrior plugin files into a folder named “UltimateTagWarrior” in your plugin directory
  2. Enable the plugin

Tagging
On the post editing screen, below the main content editing space, there are two new boxes – one labelled Tags, and another labelled Tag Suggestions.

The text field in the Tags box is where all of the tags associated with the post go. Under the tags box there’s a list of clickable links to the tags that are already in use. Clicking on these tags will add them to the tags box. It’s possible to change the existing tags bit to change to a dropdown list through the Manage>Tags page (or to not display at all) if you find it gets unwieldy as you have more tags in use.

The Tag Suggestions box, has a “Get Keyword Suggestions” button, that when clicked, takes the body of your post, sends it to the tagyu.com webservice that guesses at the important keywords in the text; and those keywords will display in the Tag Suggestions box, along with any tags that UTW finds that are related to those keywords.

Customising

There are two sets of tags that can be included at the end of pages (or indeed, not included). The style of the tags can be selected on the Options>Tags page.

Displaying an HTML list of tags for a post
Include <ul><?php UTW_ShowTagsForCurrentPost("htmllist") ?></ul> inside the wordpress loop.

Displaying a tag cloud
Include <?php UTW_ShowWeightedTagSetAlphabetical("coloredsizedtagcloud") ?> outside the wordpress loop (Could go in your header, footer, sidebar or archive)

FAQ’s

I’m getting no such table SQL errors!
In wordpress admin, go to Manage, then Tags; and click the “Force Reinstall” button. Sometimes the plugin gets all tied up in knots and doesn’t add tables when it’s supposed to and doing a force reinstall usually sorts it out. (Let me know if it gets into a state where a force reinstall doesn’t sort it out!)
I clicked the “Update Permalinks” button; but my .htaccess file hasn’t updated
This is probably caused by a wordpress bug: the .htaccess file will only be updated if there’s a permalink structure specified. If the permalink structure is empty, then nothing happens. If you add a permalink structure, then click “Update Permalinks” again, then your .htaccess ought to update. (Please let me know if this is still a problem, though!)

Previous versions and downloads
Information about previous versions is located here.

Posted in | 522 Comments

522 Responses to Ultimate Tag Warrior 2

  1. Hi Christine,

    What a great plugin! Its fantasticness is proven once again by the fact that I, a total CSS/PHP/XHTML newb was able to install it and have it running.

    I do have a question for you or anyone else more experienced with CSS, PHP and WP themes.

    I’m using the popular Almost Spring theme for my fun learn-to-do-this blog, located here. I’ve decided to activate the tag cloud feature.

    If you look closely, the Archives & Categories are slightly indented, while the Tag Cloud is unindentend. Not a major thing, but… I get the feeling that what is going on here is that the php command which fetches the elements of Categories, for example, , is applying styles from the CSS stylesheet governing behavior of text elements in the sidebar. The command, on the other hand, is not applying the CSS styles.

    So… the question is… is there a way to have the CSS apply its styles to the elements in my Tagcloud? I want basically to indent it slightly for now, but I could see wanting at some point to use the CSS to apply different formatting to the tagcloud.

    Any suggestions/teaching a newbie?

    Thank you,

    -TS

  2. Sophisty One:

    Try this…

    Try this:

    <ul>
    <li>
    <?php UTW_ShowWeightedTiddlyPomHowYouHaveItNowButNotReallyIMeanHonestlyJustLeaveThisAloneAndAddTheULsAndLIs() ?>
    </li>
    </ul>

  3. Thanks Christine.

    That gives me a nice ordered list in a column, which is nice, but it isn’t the tagcloud I was hoping for… just indented. :)

    -TS

  4. Maybe…

    <div style=”margin-left:1.2em”>(tags)</div>

  5. Hmm, that appeared to do nothing at all.

    I syntaxed this way:

    -TS

  6. (Arrgh! The thinger that cleans stuff up ate what was in your code block. If you like, you can email me instead of having a comment-conversation – christine at neato dot co dot nz)

  7. Pingback: Tagging advanced at rikman

  8. Pingback: Basic Thinking Blog » Wordpress: Gesamt und Plugin-Performance

  9. Pingback: Adding little tag icon for UTW at House of K2

  10. I am using UTW for some time now and I am really happy with it. My new K2-based self-created theme WP-Binary-Blue-K2ed fully supports it out of the box if it finds an installed and enabled UTW plugin in the WP installation.

  11. Pingback: Wordpress Theme Blue Binary | 4null4.de - Blog around the world

  12. Pingback: Finding direction » Blog Archive » What’s a Technorati tag??

  13. I use the tag warrior – great plugin! I would like to add the word “tags:” in front of the tags in the RSS feed and also have a after it.

    How can I do this?

    Thnak you for any support.

    Tom

  14. Argh! The comment thingamajigger ate the thing you want after your tags!

    You’d need to do a little hack to the plugin code (although, having a tags label is probably a good thing; if you could let me know what you wanted after the tags, if it makes sense for the masses I’ll include the change in the next version of the plugin, so you won’t need to re-hack it if you upgrade)

    In ultimate-tag-warrior-actions.php on around about line 602, replace

    $thecontent = $thecontent . $utw->FormatTags($tags, $utw->GetFormatForType(‘commalist’));

    with

    $thecontent = $thecontent . $utw->FormatTags($tags, $utw->GetFormat(‘commalistwithtaglabel’, array(‘post’=>’whateveryouwantedafterthetags’)));

    (Of course, you should replace whateveryouwantedafterthetags with the HTML or text or whatever you wanted to display after the tags (: )

  15. Hi Christine,
    first of all, thanks for that great Plug-in!

    I installed and used it successfully, however, i am looking for a way to let the readers tag the articles by their own. I searched for such a feature but couldn’t find, am i too stupid?! ;-)
    Maybe you can help me and give me a hint. If there is no feature like this and you think it’s not meaningful to implement it inside the normal developing branch, could you give me a hint which functions to use best, so i try to code it by myself.

    Thanks in advance!
    BR, Jesus Villar

  16. Hi all,

    this is a very cool plugin. I tried to install it and everything worked fine till I tried to view the post. On my frontpage (using wp 2.0) there was only this

    Warning: main() [function.main]: open_basedir restriction in effect. File(../ultimate-tag-warrior-core.php) is not within the allowed path(s): (/www/htdocs/adesigna/) in /www/htdocs/adesigna/wp-content/plugins/UltimateTagWarrior/ultimate-tag-warrior.php on line 12

    Warning: main(ultimate-tag-warrior-core.php) [function.main]: failed to create stream: Operation not permitted in /www/htdocs/adesigna/wp-content/plugins/UltimateTagWarrior/ultimate-tag-warrior.php on line 12

    Warning: main() [function.main]: Failed opening ‘ultimate-tag-warrior-core.php’ for inclusion (include_path=’.:/usr/share/php:..:.’) in /www/htdocs/adesigna/wp-content/plugins/UltimateTagWarrior/ultimate-tag-warrior.php on line 12

    Warning: main() [function.main]: open_basedir restriction in effect. File(../ultimate-tag-warrior-actions.php) is not within the allowed path(s): (/www/htdocs/adesigna/) in /www/htdocs/adesigna/wp-content/plugins/UltimateTagWarrior/ultimate-tag-warrior.php on line 13

    Warning: main(ultimate-tag-warrior-actions.php) [function.main]: failed to create stream: Operation not permitted in /www/htdocs/adesigna/wp-content/plugins/UltimateTagWarrior/ultimate-tag-warrior.php on line 13

    Warning: main() [function.main]: Failed opening ‘ultimate-tag-warrior-actions.php’ for inclusion (include_path=’.:/usr/share/php:..:.’) in /www/htdocs/adesigna/wp-content/plugins/UltimateTagWarrior/ultimate-tag-warrior.php on line 13

    Fatal error: Cannot instantiate non-existent class: ultimatetagwarriorcore in /www/htdocs/adesigna/wp-content/plugins/UltimateTagWarrior/ultimate-tag-warrior.php on line 16

    Any suggestions?

  17. Some tags are not displayed on the archive page (tag cloud) — in what is the trouble? Please help! Also sometime when I use tags in Russian, they are changed by others tags when the post is saved — why?

  18. since I upgraded to 2.8.9, all the tags beneath each post is showing up twice. Do you have any idea why this is so?

  19. My tag.php isn’t getting the tag values for some reason. If I hit http://mysite/tag/whatever

    my UTW_ShowCurrenTagSet() is empty and is_tag() returns false.

    I’ve hit “update” on the permalinks page, for whatever that’s supposed to do.

  20. Hello,
    it’s me again. The version 2.6.8 now works fine with my blog. I’ve got only one big problem. UTW produces a whole lot of queries. Up to 800, 900 and that is too much. Without UTW, the query count is absolutely okay. I tried the newest version, but it is even worse: 1900 Queries. I have no clue, but may be you could suggest me what to do.
    Jona

  21. I’ve been having some problems with case-sensitivity. I tagged several entries on my site as “Chinese”. For some reason, SOME of the posts have come out as “chinese” with a small “c”, while others are correct.

    I’ve tried both editing the posts, and using the tag manager. Either way, when I correct a capitalization error, the tag is unchanged when I check the page.

  22. is there a possibility to serach with the tag in der german wikipedia http://de.wikipedia.org/wiki/Hauptseite instead in the entlisch version of wikipedia?

  23. Hi
    Do not prompt how to adjust a font of the messages?

  24. I found the solution to my problem – thanks.

  25. I found a very, very minor bug. One of the formatting options allowed is %rssurl% … it doesn’t work in the newest version 2.9.2.1 for WordPress 2.0 (might work in other versions, never checked). In any case, all one needs to add is this line just after the str_replace lines concerning url’s (line 1046 in my case):

    $format = str_replace (‘%rssurl%’, $rssurl, $format);

    Great plugin. Many thanks.

  26. Pingback: estonova

  27. I want to display the tag set in the TITLE of the page, how can I get the list without the links generated? I just need the text of the tags (I still have to check for the encoding poblem)

  28. Hello,

    I’ve installed the plugin, and I’m facing trouble naming tags in french. The accents é è à are translated into %E9 etc…

    So, a tag named “littérature” will lead to /litt%E9rature and will open the tag page /littrature (without the é)

    How can I use french letters with this plugin ?

    Cheers

  29. Try using the entities instead, like á etc

  30. I have a quick question. I want to display a htmlist but I want to be able to format the bullets. How would I do this, seeing (as far as I can tell) that there is no

  31. Excellent Extension… Upgraded to 2.x and noticed in the admin that the tag entry text box spans over into the right hand post options. Have not dug into yet, but thought you would like to know.

  32. thx really a nice addon and works great :)

  33. hey ive been using UTW and it was working fine, but when i make a post, in the tag space theres in there. it causes problems with my layout if i forget to remove it. any ideas what thats about?

  34. Does anyone know if it’s possible to use wp_query() with tags? I’d like to pull post data into an array, much like you can with categories. I suppose I could always write my own function, but I’d rather not reinvent the wheel here.

  35. Hello,
    UTW 2.9.2.1 seems don’t write anything in .htaccess file. In fact, after updating to WordPress 2.0 on my sites, I ‘ve update UTW from 2.6.2 on one of these sites. In that site when I enable the option “Use url rewriting for local tag urls” and I go to this local tag url, WP give me an error (not found). It seems to be a rewrite problem but if adding the row “RewriteRule ^tag/?(.*) /boliboop/index.php?tag=$1 [QSA,L]” nothing seems to change. Because another site of mine work with UTW 2.6.2 with (pre WP 2.0 update) and without (post WP 2.0 update) that rewrite rule, I think that the only problem is in your plugin, but, as you can see, I don’t have a clear idea of the situation. Can you help me, please? Thank you very much,
    Davide.

  36. Christine,

    How would I have the tags appear on the main and archive pages in the exact same format as they do (by default) on the individual post page?

    That is, the “tag” icon, followed by “Tags: <comma-separated tags here>”

  37. Thanks for it …was looking for a similar plugin ! :)

  38. I’m also having problems with using rewriting, they don’t seem to want to work that way, do I need to manually include rules in my .htaccess file?

  39. To anyone else who’s having the silly problem I had, the reason turning on the tag rewriting was breaking was that I had not manually gone to the permalinks page and told it to update the structure. Once I’d done that, everything worked just fine, so FYI, turning on the option in the plugin doesn’t complete the set up, you have to click the “Update Permalink Structure” button on the Options–>Permalinks page.

  40. Hi,
    Your plugin is activated. What is the code I have to include in the sidebard.php file?
    Thanks ;-)

  41. Hi Christine!
    I love this plugin! I just upgraded to 2.9.2.1 yesterday and am having a problem in Admin. The list of tags displays correctly, but when I hover over and/or click on one, I see %tagjsescaped% instead of the actual tag name. I can type the tag name in and everything works fine. This only started yesterday. Do you have any ideas about what might be wrong?

    Thanks!

  42. The ampersand symbol isn’t converted to an entity, and breaks feeds and kills HTML validation.

  43. Hi,
    I use WP2. Everything seems to be ok but when i use “UTW_ShowTagsForCurrentPost(“htmllist”)” or UTW_ShowWeightedTagSetAlphabetical(“coloredsizedtagcloud”), i’m getting the “Call to undefined function: utw_showweightedtagsetalphabetical()” error.

    Can anyone help, please ?

    JB

  44. I have got 3,000+ plus posts in my blog. Is there any way to generate the tags automatically cause doing it manually for each post is going to kill me :(

  45. Bugger! The above doesn’t make sense with the angle bracket contents missing. Removed. Feel free to edit. Sorry!

    I’ve spend the day trying to tweak UTW with limited success; all I want is a visible list of tags with an RSS icon/ link for each, and an invisible list of the same tags for Technorati purposes i.e.

    Tags: alpha [RSS], beta [RSS]
    { Technorati Tags: alpha, beta }

    The second requirement is no problem; I just styled out [?php UTW_ShowTagsForCurrentPost("technoraticommalist") ?] in theloop.php (K2 theme). I’m using WP 2.0.1, UTW 2.9.2, ecto for Mac 2.4.1).

    There are five persisting problems:

    (1) Robin Lu’s hack (http://www.robinlu.com/blog/archives/57) to make ecto work with WP doesn’t seem to work for WP 2.0.1. Shame.

    (2) Every time you “Send Edit” from ecto, it wipes out any UTW tags you may have entered via the web GUI. This is a major bummer :-(

    (3) Using the fantastic Tiger Style Administration plugin (http://orderedlist.com/wordpress-plugins/wp-tiger-administration/), the Save button in Options; Tags; Configuration is not visible, so you can’t save your options! At least disabling TSA fixes this.

    (4) I can’t use this in theloop.php:

    [small class="metadata"]
    [span class="tagdata"]Tags + RSS: [?php UTW_ShowTagsForCurrentPost("commalisticons") ?].[/span]
    [/small]

    … because no RSS icons will show without using Options; Tags; Configuration (Is there a hack to overcome this?).

    As a work-around, I tried to paste HTML into Options; Tags; Configuration like this:

    Prefix for primary tag links: [small class="metadata"][span class="tagdata"]Tags + RSS: 

    Suffix for primary tag links: .[/span][/small]

    …but end up with this:

    Prefix for primary tag links: [small class=\\

    Suffix for primary tag links: .[/span][/small]

    i.e. it corrupts every time I go back to Configuration. Annoying.

    (5) Minor, but the UTW tag entry field seems to screw up the layout of “Write Post” in the web GUI whether the TSA plugin is active or not. The field is simply too wide?

  46. Pingback: 4null4.de - Blog around the world

  47. I just installed and set up the UTW Plugin for my WP2.0 Blog but I can’t get it running.

    I want to get all entries related to a tag with calling up “blog.foo.com/tag/bar”.

    But if i do so i’m getting an “Internal Server Error”. My apache error log says:

    [Fri Feb 03 04:47:01 2006] [error] [client 84.56.103.67] FastCGI: comm with server “/system/php” aborted: error parsing headers: duplicate header ‘Status’, referer: blog.foo.com

    Any ideas how I can fix this problem?!

  48. I am using your tag plugin, and it works great. I just have one problem and that is if I access a tag I don’t get a sidebar:

    Check this:
    http://www.quantumbiocommunication.com/index.php?tag=health

    I guess there is a easy solution to this.

    Thomas

  49. Re using UTW + ecto + WP 2.0.1

    Update for info: Robin Lu’s hack to get ecto semi-working with UTW does actually work with WP 2.0.1. Maybe I put the hack on the wrong line? With reference to Robin’s page , be aware that:

    $post_more = $content_struct['mt_text_more']; appears on line 544 AND on line 634

    $catnames = $content_struct['categories']; appears on line 571 AND on line 623

    Robin has since clarified:

    “I only added the line into two places. Line 545 and line 625. The trick is you set $_POST after $content_struct is initialized and
    before wp_insert_post or wp_edit_post is called in both mw_newPost and mw_editPost.”

    With this in place I confirmed that if you check some tags and do a ‘Send Edit’ in ecto it will upload the tags, but they will be unchecked again after the upload (checked tags persist if using the factory settings to upload Technorati tags). I also confirmed that if you do some more editing to that post in ecto and ‘Send Edit’ again, this will wipe out any UTW tags you have already attached to the post – with the exception of tags added via UTW’s ‘Automatically add categories as tags’.

    Again, Robin explains:

    “… the tags are wiped off because after ecto publishes, it then get the content from server. You need to hack mw_getPost and mw_getRecentPost to add a key ‘mt_keywords’ to indicate what tags the post is having. Even so, ecto does not recognize ‘mt_keywords’ as far as I tested, which makes this part of hack fail. I wish I have the source code of ecto so I can fix this problem by applying patch to both side.”

    Maybe Adriaan from ecto can address this???