Extension:SelectCategoryTagCloud

The SelectCategoryTagCloud extension provides five functions:
 * It shows a tag cloud of all categories (unless limited by minimum count or by a custom root category)
 * It strips all categories linked within a page upon editing and inserts them in a category input box.
 * It adds categories selected from the tag cloud to the input box and removes them if already there.
 * It suggests existing categories that match the user input in the input box from the database via AJAX
 * It saves the categories from the input box to the text body of the page on saving.

For an overview of the extension also see the author's blog post on Open Spaces.

To see the extension in action, see MIKE2.0.

RELATED EXTENSIONS
Please see the below pages for further documentation:
 * See CategorySuggest extension - a simplified version of this extension without the tag cloud
 * See SelectCategory extension
 * See Wiki Category Tag Cloud extension (this site is intended to be replaced with a Forge site, but this was provided by Google Cache)

Installation
Copy the SelectCategoryTagCloud directory into the extensions folder of your MediaWiki installation. Then add the following line to your LocalSettings.php file (near the end):

require_once( 'extensions/SelectCategoryTagCloud/SelectCategoryTagCloud.php' );

SelectCategoryTagCloud.body.php
The tag cloud parameters are configured at the top of SelectCategoryTagCloudFunctions.php. (These are going to be moved to LocalSettings.php in a future release.)

SelectCategoryTagCloudSuggest.php
Configure the database details for the AJAX server page at the top of SelectCategoryTagCloudSuggest.php. Because this is a basically a standalone webpage that is not included in any MediaWiki php pages, it doesn't have access to the configuration details in LocalSettings.php (which would include the database details).
 * This functionality has been replaced with the Mediawiki built-in AJAX framework.
 * --Lindele 17:27, 1 April 2008 (UTC)

$wgSelectCategoryNamespaces
This is in the SelectCategoryTagCloud.php file

Defines in which namespaces the Extension should be active.

All namespaces are already predefined in the array. Set a specific namespace to true to enable or to false to disable the extension.

Active per default are: Media, Main, Project, Image, Help, Category.


 * Example:


 * Or:

$wgSelectCategoryRoot
Set a specific root category depending the namespace. Only categories within this root will be displayed when editing a page in a certain namespace.

Useful on big wiki sites to keep the database load down.

If not set (default) the extension searches for all root categories and displays them including all children.

$wgSelectCategoryEnableSubpages
Defines if the extension should be active when editing subpages.

To Do

 * Move SelectCategoryTagCloudSuggest.php configuration for database access into Mediawiki framework to simplify configuration --Completed, Lindele 17:27, 1 April 2008 (UTC)
 * Move configuration of tag cloud parameters from SelectCategoryTagCloudFunctions.php into LocalSettings.php
 * Test i18n features
 * Fix a bug : Adds a line break before each  tag for each time the page is edited,

Version 1.2

 * Modified SelectCategoryTagCloudSuggest.php to remove extra } at end of file
 * Modified SELECT statement to ignore case of search terms
 * Changed trim function (4x) to rtrim in SelectCategoryTagCloudFunctions.php to allow for leading spaces to create sections on the page

Version 1.3

 * Removed SelectCategoryTagCloudSuggest.php file and moved functionality to Mediawiki AJAX framework
 * Improved typeahead display
 * Fixed bug "not recognising categories with a . (dot) in the name"
 * Clicking outside the suggest div removes the div that is displaying the suggestions and frees up the view on the tag cloud
 * Categories are not lost on "Preview" anymore, but stay in the input box

Version 1.4

 * Minor bug fixes
 * Moved to omCollab (SVN)

Version 1.4.2

 * Small fix to enable PHP 5.3.x

Document issues on http://www.mediawiki.org/wiki/Extension_talk:SelectCategoryTagCloud. Alternatively, you can reach me at - Andreas Rindler:

Bugs on related extensions
See Extension SelectCategory bugs

Feature Requests

 * the extension automatically detects which categories are already associated with this article and inputs them into the Category field.
 * the extension automatically detects which categories are already associated with articles linked to this article and inputs them into the Category field.
 * Allow Exclusion of subcategories. So for example, if we wanted to exclude all countries within Asia (i.e. sub-categories of Asia) from the Tag Cloud, we simply specify the top-level category Asia as the exclusion starting point (all categories 1 level below are left out of the tag cloud).
 * add support for sqlite databases (current implementation is hardcoded for mysql)
 * add support for PostgreSQL or use a suitable Database Abstraction Layer