It’s here, finally! A Mediawiki extension that combines a tag cloud and Google Suggest like features to categories. It’s called SelectCategoryTagCloud and version 1.0 is available on http://www.mediawiki.org/wiki/Extension:SelectCategoryTagCloud.
Let me explain how and why we did this. A couple of weeks ago Jeremy wrote about how taxonomies and folksonomies are complimentary. In a simplified view of Mediawiki and Enterprise 2.0, categories are as close to a taxonomy as you can get. You can pre-define categories, nest them to create a hierarchy or automatically include them in templates that you force on certain pages (and therefore the page itself becomes a member of the category). However, categories also allow users to create horizontal or lateral views on content that is otherwise stored in a hierarchical or sequential manner. In wikis you create a link from a top page or home page to a sub page to a sub page and so on. You can then link from one sub page to another one, but if you want to see what pages deal with the same topic, you have to navigate through them one by one (either hierarchically or in sequence). Categories allow you to group pages that share a common topic into categories by simply ‘tagging’ the page with a category name. Here is a screenshot of an article with 4 categories applied to it:
If you want to see all pages in that category, you just need to click on the category name and Mediawiki displays all pages that are part of the category. The following screenshot show all pages in the category MIKE2 Activities:
A couple of extensions to Mediawiki exist that have attempted to solve the problem of suggesting categories to users, visualising what categories are popular and applying the style of Web 2.0 applications to categories. But none of them have achieved to provide the usability and simplicity of applying tags to bookmarks as Deli.cio.us and Digg have done.
My first step was to review existing extensions to see how much code reuse is possible. As a professor of mine at university used to tell me, copying code gets you expelled from school, but awards in the corporate world . I found two extensions that were particularly useful (SelectCategory and WikiCategoryTagCloud). Credits to the developers of these extensions, because their code was to become the basis of my new extension which I named ‘SelectCategoryTagCloud’ in their honor.
The first step was to refactor the Wiki Tag cloud to be displayed on the edit page (and then further on the upload file page) of a Mediawiki article. Users are now able to see what categories are popular on the site and what categories are already assigned to the article. Take note of the simple visual marki-up of the existing categories.
The second step was to extend the functionality by adding an input box that would list all categories that are already assigned to the article. So instead of having to type the category command [[Category:CategoryName]] into the regular edit field or having to hunt down where the original user had put the command, users now have one single place where all categories are managed. Users can click on any of the categories in the tag cloud which adds it to the list of categories. Clicking on a category that already exists in the list removes it.
Finally, I needed to solve the problem that a tag cloud can only display so many categories as feasible to show on screen. Wikipedia has something like 150,000 categories, can you imagine how their category tag cloud would look like?! In my extension the number of displayed categories can be limited by setting a minimum count number for articles that are part of the category.
But how about all the other categories that don’t fit into the tag cloud but which we still want to encourage the users to reuse?!! So I added a category suggestion feature, similar to Google Suggest. When the user starts typing the initial characters of existing categories, the extension will display suggestions of existing categories right below the category input box. This not only encourages reuse of existing categories, but also reduces the amount of categories with similar names and typos. Check out this screenshot to see suggestions on the initial characters ‘Bu’:
The user is presented with 3 suggestions (Business Activity Monitoring, Business Intelligence Offering Group, Business Solution Offerings) and can select any of them with a simple mouse click. And because it’s all AJAX based, the lookup and suggest feature is kicked off in the background and doesn’t interfere with the user’s typing.
So what’s the next steps? Well, this is a first stab at applying some of the Web 2.0 features like tag clouds and suggestion to Wikis. Next I would like to apply a more formal approach to social bookmarks to complete the circle of taxonomies and folksonomies. Specifically, I will work on how to apply categories created in Mediawiki to Scuttle, an open source bookmarking software. This great software hasn’t really received any development support over the last year or so, but we have been using it internally and we believe that this will be another piece in our work to glue Web 2.0 technologies together to provide a solid, open source Enterprise 2.0 offering for collaboration.