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 SelectCategory extension
 * See YetAnotherTagCloud 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' );

SelectCategoryTagCloudFunctions.php
The tag cloud paramters 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).

$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
 * Move configuration of tag cloud parameters from SelectCategoryTagCloudFunctions.php into LocalSettings.php
 * Test i18n features

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

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