{"id":83,"date":"2007-12-16T03:46:27","date_gmt":"2007-12-16T07:46:27","guid":{"rendered":"http:\/\/scott.sherrillmix.com\/blog\/blogger\/wp_folksonomy\/"},"modified":"2008-09-22T00:10:17","modified_gmt":"2008-09-22T04:10:17","slug":"wp_folksonomy","status":"publish","type":"post","link":"http:\/\/scott.sherrillmix.com\/blog\/blogger\/wp_folksonomy\/","title":{"rendered":"WP_Folksonomy"},"content":{"rendered":"
Aziz of metaBLOG<\/a> suggests that the new tags in WordPress 2.3 can be used to create a “folksonomy”<\/a> on WordPress blogs. For those not in the know (including me until a couple days ago), a folksonomy is So since WordPress doesn’t currently have anything like a public “Add a Tag” and I haven’t coded a WordPress plugin recently (although I did upgrade WP_MonsterID<\/a> if anyone is using it), I thought I would code up a quick plugin to see how it works. So here is WP_Folksonomy<\/a>. It’s fairly basic at the moment but I’d like to get it out there to see if it’s useful and if anyone is interested in it.<\/p>\r\n Since it uses WordPress’s tagging features WP it’s only going to be compatible with WordPress 2.3 and up.<\/p>\r\n\r\n WP_Folksonomy v0.8<\/a><\/p>\r\n\r\n Unzip Sorry it’s not more automatic but if you’re having any trouble figuring out where to put it feel free to ask in the comments (make sure to tell me which theme you’re using). You can view and delete tags from the Folksonomy control panel in Settings or is the practice and method of collaboratively creating and managing tags to annotate and categorize content<\/q> according to Wikipedia<\/a><\/cite>. Basically it’s letting normal people (versus say artificial intelligence or an administrator) help describe things. For example, adding a tag on flickr or using del.icio.us.<\/p>\r\n
Features<\/h3>\r\n
\r\n
Current Version:<\/h3>
Installation instructions:<\/h3> \r\n
wp_folksonomy.zip<\/code>. Upload
wp_folksonomy.php<\/code> to
wp-content\/plugins\/<\/code> and activate in the Plugin Control Panel. Now the slightly difficult part. Unfortunately there is no automatic hook near the tags in WordPress so you’ll have to make a minor change to one of your theme files. We’re aiming create a tiny form to allow your users to add tags. Many themes will be using the wordpress
<?php the_tags('some','options');?><\/code> to list the tags. Try to find this function or a similar tag listing function. It’s often either in
wp-content\/themes\/CurrenTheme\/index.php<\/code> or
wp-content\/themes\/CurrenTheme\/single.php<\/code>. Once you find it add the following code
<?php if(function_exists('wp_folksonomy_add_form')) wp_folksonomy_add_form();?><\/code> immediately after it. For example in the default WordPress theme, it looks like:<\/p>\r\n
\r\n
<?php the_tags( '<p>Tags: ', ', ', '<\/p>'); ?>\r\n<?php if(function_exists('wp_folksonomy_add_form')) wp_folksonomy_add_form();?><\/code>\r\n<\/pre>\r\n
a little widget on the dashboard<\/del> an RSS feed.<\/p>\r\n\r\nChange Log:<\/h3>\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
$wpdb->prefix causing missing table<\/code><\/li>\r\n
\r\n
wp_head()<\/code><\/li>\r\n<\/ul>\r\n<\/li>\r\n
\r\n
\r\n