Wiki source for FreeTaggingFolksonomy
======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 [[http://www.getluky.net/freetag/ 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 [[http://www.gnu.org/copyleft/gpl.html 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:
~- freetag.class.php - The class file, which includes the freetag api.
~- freetag.sql - A SQL script file to use to create your freetag tables in a MySQL database.
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 [[http://code.google.com/p/wikkawiki-plugin-actions/ 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) [[http://code.google.com/p/wikkawiki-plugin-actions/ 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.
%%
{{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.
~- wikka.php
~- css/wikka.css
~- handlers/page/edit.php
~- handlers/page/show.php
=====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.
=====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====
{{image alt="Tag Cloud Screenshot" url="http://farm3.static.flickr.com/2232/1715920194_e292e6833f.jpg?v=0" link="http://www.flickr.com/photos/intelf/1715920194/"}}
====Tag Search Result====
Selecting a tag from the cloud displays a wiki page showing all other pages tagged with the selected tag.
{{image alt="Tag Search Result Screenshot" url="http://farm3.static.flickr.com/2344/1715920208_997bb293d3.jpg?v=0" link="http://www.flickr.com/photos/intelf/1715920208/"}}
====Tags On Page====
{{image alt="Tags On Page Screenshot" url="http://farm3.static.flickr.com/2248/1715920216_eb57c08426.jpg?v=0" link="http://www.flickr.com/photos/intelf/1715920216/"}}
CategoryUserContributions
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 [[http://www.getluky.net/freetag/ 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 [[http://www.gnu.org/copyleft/gpl.html 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:
~- freetag.class.php - The class file, which includes the freetag api.
~- freetag.sql - A SQL script file to use to create your freetag tables in a MySQL database.
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 [[http://code.google.com/p/wikkawiki-plugin-actions/ 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) [[http://code.google.com/p/wikkawiki-plugin-actions/ 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.
%%
{{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.
~- wikka.php
~- css/wikka.css
~- handlers/page/edit.php
~- handlers/page/show.php
=====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.
=====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====
{{image alt="Tag Cloud Screenshot" url="http://farm3.static.flickr.com/2232/1715920194_e292e6833f.jpg?v=0" link="http://www.flickr.com/photos/intelf/1715920194/"}}
====Tag Search Result====
Selecting a tag from the cloud displays a wiki page showing all other pages tagged with the selected tag.
{{image alt="Tag Search Result Screenshot" url="http://farm3.static.flickr.com/2344/1715920208_997bb293d3.jpg?v=0" link="http://www.flickr.com/photos/intelf/1715920208/"}}
====Tags On Page====
{{image alt="Tags On Page Screenshot" url="http://farm3.static.flickr.com/2248/1715920216_eb57c08426.jpg?v=0" link="http://www.flickr.com/photos/intelf/1715920216/"}}
CategoryUserContributions