Wikka Wiki Folksonomy (Free-Tagging)

It’s not difficult to add a free-tagging folksonomy to Wikka Wiki, however there are several steps involved. I have tried to outline the steps here and provided source where possible.


To avoid confusion with WikkaWiki page names, which are also refered to as tags, the actions, source code, and documentation typically refer to folksonomy tags as ftags.

ftag = folksonomy tag

What It Does

The default implementation presented here uses space-separated tags, however Freetag is customizable and can be switched to comma separated.
Adds free-tagging folksonomy to Wikka Wiki! That should suffice to get your mouth watering, however here’s the rest anyhow. Adding folksonomy to Wikka Wiki utilizes Gordon Luk's Freetag for PHP4, Released under both BSD and GNU Lesser GPL library license.

We have included a folksonomy tag search action that provides a listing of all pages associated with an ftag. Folksonomy search can be used on a stand-alone page or linked from any page.

More importantly, we have implemented an action to provide an ftag cloud for the wiki.

Why It's Useful

It’s free-tagging! It’s simpler to use than Wikka Wikis builtin taxonomy system that utilizes categories and you get all the joy of ftagging.


Add-on actions and source by Marc Mayfield and Integrated Elf (IntElf) are released under GPL.

Gordon Luk’s Freetag released under BSD and GNU Lesser GPL library license.


Once properly installed, users will be able to add ftags to any page they can edit (ftag permissions are tied to page permissions). Ftags are entered directly beneath the main content edit area and above the change comments. Saving ftags and page changes operate under the same save button, however if only tags were added (no page changes), then only tags are saved. We do not unnecessarily create a new page revision.

How you utilize the ftag cloud is up to you. Here we present a stand-alone page as our cloud basis, however a cloud could be added to any page.



Adapted from the Freetag documentation. To install Freetag, download http://www.getluky.net/projects/freetag/freetag-latest.tar.gz to your home directory. Unzip the tar.gz file.

tar xzvf freetag-latest.tar.gz

There will be two files of major interest:

I recomend using your existing Wikka database to store the tag information. Import the table definitions by running the freetag.sql script file:

mysql -u username -p databasename < freetag.sql

Now copy the freetag.class.php file into your wikka directory and be sure the webserver has read access.

Actions for Wikka

Install New Actions

The installation tarball containing the add-on actions is a available on the downloads page under Wikka Wiki.

The download contains new necessary new actions as well as modified versions of any standard Wikka Wiki files that were changes, and a diff file showing the changes. If you have not made modifications to the default install, you may simply replace pre-existing files with the modified ones (provided your Wikka version is the same

To install, download and save the tar.gz file into the actions subdirectory of your Wikka Wiki installation, untar it, and set permissions to read-only. The following steps provide a walkthrough assuming your installation directory is /var/www/html/wikka. If your install path differs, steps one and two will require modification.

  1. Download wikka_folksonomy.tar.gz to /var/www/html/wikka/actions/
  1. cd /var/www/html/wikka/actions
  1. tar -xvzf wikka_folksonomy.tar.gz
  1. chmod 444 cloud.php
  1. chmod 444 tagsearch.php
  1. chown www-data:www-data cloud.php (or to your webserver user ID)
  1. chown www-data:www-data tagsearch.php (or to your webserver user ID)

Tag Cloud Action Page

Define the the ftag cloud page by creating a new page TagCloud with the following content.



Tag Search Action Page

Defing the ftag search page by creating a new page TagSearch with the following content.



Modifying Wikka Code

The download tarball includes modified versions of and diffs for the four Wikka source files that need modified. They are listed below and left for you to edit using the the diff file. Don’t fret, most changes are minor and occur in groups. The given paths assume you are in the root directory of your Wikka installation.

Known Bugs

  1. Folksonomy doesn’t work well with Sandbox page.
  1. If re-editing an old revision, ftags from the old revision are not picked up.
  1. Removing a page does not clean up its ftags resulting in tags with no pages.


That should wrap everything up and at this point you should have a functional Wikka Wiki installation that incorporates Freetag. Enjoy! =)


Tag Cloud

Tag Cloud Screenshot

Tag Search Result

Selecting a tag from the cloud displays a wiki page showing all other pages tagged with the selected tag.

Tag Search Result Screenshot

Tags On Page

Tags On Page Screenshot

There are 3 comments on this page. [Show comments]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki