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.

Important

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

Note
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.

License

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.

Usage

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.

Installation

Freetag

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 1.1.6.1).

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/
  2. cd /var/www/html/wikka/actions
  3. tar -xvzf wikka_folksonomy.tar.gz
  4. chmod 444 cloud.php
  5. chmod 444 tagsearch.php
  6. chown www-data:www-data cloud.php (or to your webserver user ID)
  7. 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.

{{cloud}}{{nocomments}}

----
CategoryWiki


Tag Search Action Page

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

{{tagsearch}}{{nocomments}}

----
CategoryWiki


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.
  2. If re-editing an old revision, ftags from the old revision are not picked up.
  3. Removing a page does not clean up its ftags resulting in tags with no pages.

Summary

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

Screenshots

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




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