Broobles » SimpleTags WordPress Plugin  
 

SimpleTags - A WordPress Plugin for generating Technorati Tags
SimpleTags is a WordPress plugin that will allow you to easily generate Technorati tags at the bottom of your blog entries. There are several plugins already available for this purpose, but they all require you to use custom fields within WordPress. The SimpleTags plugin eliminates this need, so you can now easily generate tags with your preferred method of posting, be it by email, a blogging tool like w.bloggar or from WordPress itself.
History
  • Version 2.0 (03/01/2006) - SimpleTags now works with WYSIWYG editors. Tags have changed from <tags> to [tags]. If updating from an earlier version, you need to perform a simple update on the database. Please check db-update.txt in the zipped distribution for detailed instructions.
  • Version 1.2 (01/01/2006) - SimpleTags will now generate XHTML valid code when enclosed in <div>s. Contributed by Elias Schwerdtfeger.
  • Version 1.1 (16/07/2005) - Added in-post tagging functionality. Contributed by Artur Ortega.
  • Version 1.0 (09/07/2005) - Initial release
Usage
The main way of using SimpleTags is to add a comma separated list of words or phrases within the [tags] tags at the end of the post. For example:

[tags]Word Press, Technorati, SimpleTags[/tags]

That's it. Whenever someone is viewing the post, either on the web or via RSS/Atom, the words you marked will be expanded to Technorati tags.

However, SimpleTags also allow you to tag words within your post. To tag a word/phrase, enclose it within [tag] (note that this tag doesn't have an "s" at the end!). Words which are marked in this way will appear in the list of tags at the bottom of the post. You can also combine these two methods, by tagging some words in the post with [tag] and providing a list of additional tags at the end of the post with [tags].

If you have used versions 1.x of SimpleTags, please note that you should now use square brackets ([tags]) instead of angle brackets (<tags>).
Example
Here is an example which uses both in-post tags and a list of tags at the bottom of the post. This is how you would write it:


This post demonstrates how [tag]SimpleTags[/tag] work. All the words that are enclosed withing 'tags' will be added to the bottom list of [tag]Technorati[/tag] tags at the bottom of the post. We can also provide a list of additional words/phrases that we want tagged, like the one above.

[tags]WordPress, WordPress Plugin[/tags]



This post would look like this when viewed:


This post demonstrates how SimpleTags work. All the words that are enclosed withing 'tags' will be added to the list of Technorati tags at the bottom of the post. We can also provide a list of additional words/phrases that we want tagged, like the one below.

Technorati Tags: , , ,



For live examples, visit my blog.
Download
Download SimpleTags, Version 2.0, January 3rd 2006
To download an older version, check the History section below.
Installation
  1. Download the SimpleTags plugin
  2. Uncompress the archive and copy simpletags.php to your wp-content/plugins directory
  3. In the WordPress Admin Panel, activate the SimpleTags plugin on the Plugins tab
  4. (Optional) If you want to configure the way the tags are displayed, check the Configuration section below.
Upgrade from 1.x to 2.x
If upgrading from 1.x to 2.x please follow these instructions
  1. Download the SimpleTags plugin
  2. Uncompress the archive and copy simpletags.php to your wp-content/plugins directory
  3. Read the db-update.txt file and execute the four sql statements from phpMyAdmin on your webhost. This is required in order to convert the old angle bracket tag format into the new square bracket format.
  4. Note that you should now use [tags] instead of <tags> and [tag] instead of <tag>
Configuration
By default, the plugin will prepend the tags with "Technorati Tags:". If you don't like this, you can change it in the code by modifying the $pre_replacement and $post_replacement variables.

Due to changes in version 1.2, $pre_replacement and $post_replacement variables contain <p> tags in order to be backwards compatible with earlier SimpleTags versions and display the tags properly with the default installation of WordPress. You can experiment with these to suit the needs of your blog.

Personally, I use the following:

    $pre_replacement = '<p><small>Tags: ';
    $post_replacement = '</small></p>';


But you could also do something like this:

    $pre_replacement = '<div class="simpletags">Technorati Tags: ';
    $post_replacement = '</div>';


which would allow you to manage the look of generated tags from your stylesheet.
quicktags.js integration
If you like writing your posts from WordPress itself, you can modify the quicktags.js file (tutorial) to perform even simpler tagging by selecting a word in your post and clicking the tag button. You need to add the following line into this file:

edButtons[edButtons.length] = new edButton('lang_en','tag','[tag]','[/tag]');
Acknowledgments
  • SimpleTags was inspired by TechnoTag.
  • Artur Ortega contributed the in-post tagging functionality and the quicktags.js integration.
  • Elias Schwerdtfeger added an enhancement which ensures the tags are XHTML valid when enclosed in a div.

Thanks!
Feedback
For any bugs, comments or suggestions please use the forum or send an email to simpletags AT broobles DOT com
  Copyright © 2005-2008 Broobles