Extension:Categorize

From MediaWiki.org
Jump to: navigation, search

Other languages:
English • ‎日本語
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.png
Categorize

Release status:Extension status beta

ImplementationTemplate:Extension#type Page action, Ajax, API
DescriptionTemplate:Extension#description An easy way to categorize an article, just by clicking on labels.
Author(s)Template:Extension#username Thomas Fauré (Faure.thomastalk)
Latest versionTemplate:Extension#version 0.1.2 (2011-05-12)
MediaWikiTemplate:Extension#mediawiki 1.16+
PHPTemplate:Extension#php 5
LicenseTemplate:Extension#license GNU General Public License 3.0
Download Template:WikimediaDownload/svn
Hooks usedTemplate:Extension#hook
EditPage::showEditForm:initialManual:Hooks/EditPage::showEditForm:initial
UploadForm:initialManual:Hooks/UploadForm:initial
EditPage::attemptSaveManual:Hooks/EditPage::attemptSave
UploadForm:BeforeProcessingManual:Hooks/UploadForm:BeforeProcessing
OutputPageParserOutputManual:Hooks/OutputPageParserOutput

Translate the Categorize extension if it is available at translatewiki.net

Check usage and version matrix.

This extension is derived from the CategorySuggestExtension:CategorySuggest extension and proposes to the user a sorted labels matrix which are main categories. It is supposed to help the user to categorize an article. Here is an example of implementation:

Categorize.png

Usage[edit]

Download instructions[edit]

Download a snapshot on: Special:ExtensionDistributor/Categorize

Currently available on 1.16.x and trunk (under dev).

and extract it in $IP/extensions/.

$IP stands for the Installation Path (or "directory") of your MediaWiki installation, the same directory that holds LocalSettings.php, index.php etc..

It will create a $IP/extensions/Categorize/ directory.

Installation and configuration[edit]

  • Download and place the file(s) in a directory called Categorize in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    require_once "$IP/extensions/Categorize/Categorize.php";
    $wgCategorizeLabels = array(
    	'Master_Category1' => array('Category11','Category12','Category13','Category14'),
    	'Master_Category2' => array('Category21','Category22','Category23','Category24'),
    	'separator1' => array(),
    	'Master_Category3' => array('Category31','Category32','Category33','Category34'),
    	'Master_Category4' => array('Category41','Category42','Category43','Category44'),
    	'separator2' => array(),
    	'Master_Category5' => array('Category51','Category52','Category53','Category54'),
    );
    
  • The $labelsStructure defines the categories to "labelized" in the interface. Each array element is a line into the final graphic table. "separator*" will draw a line. Be careful, write the complete names for categories with "_" characters.
  • YesY Done - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Translation[edit]

You can modify Categorize.i18.php in order to customize the printed sentences.