Extension:ArticleToCategory2

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manual - list
Crystal Clear action run.png
Article To Category 2

Release status: stable

px
Implementation Page action
Description Adds an inputbox to each category page. The content of new page will contain "[[category:]]" automatically. See doc. for optional features.
Author(s) (MikaelLindmarktalk)
Latest version 1.0 (2011-03-15)
MediaWiki 1.13+
Database changes No
License GNU General Public License 3.0
Download Template:WikimediaDownload/svn
Parameters
  • $wgarticletocategory2ConfigBlacklist
Added rights
  • ArticleToCategory2
  • ArticleToCategory2AddCat
Hooks used
CategoryPageView

EditFormPreloadText
User

Translate the ArticleToCategory2 extension if possible

Check usage and version matrix; code metrics

The Article To Category 2 extension is based on the Add Article to Category extension by BiGreat (Liang Chen). It adds an inputbox to each category page. The content of new page will contain "[[Category:]]" automatically.[1] See section Configuration parameters for optional behavior. Suggested changes and additions (exclude categories, i18n localisation, adding category, etc) by Julien Devincre and Cynthia Mattingly on the Extension talk:Add Article to Category is included.

Installation instructions[edit | edit source]

Create a subdirectory in your extensions directory:

cd /your/wiki/extensions
mkdir ArticleToCategory2

Download the extension and its dependencies using subversion (or use the info box on the right side of this page):

cd /your/wiki/extensions/ArticleToCategory2
svn checkout http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/ArticleToCategory2/ArticleToCategory2.php
svn checkout http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/ArticleToCategory2/ArticleToCategory2.i18n.php

Add the following to LocalSettings.php:

require_once("$IP/extensions/ArticleToCategory2/ArticleToCategory2.php");
$wgarticletocategory2ConfigBlacklist=false;
$wgGroupPermissions['*']['ArticleToCategory2'] = true;
$wgGroupPermissions['*']['ArticleToCategory2AddCat'] = false;

Configuration parameters[edit | edit source]

$wgGroupPermissions['*']['ArticleToCategory2AddCat'][edit | edit source]

Set this flag to true and a second input box will be added, where the users may add categories into categories.

$wgarticletocategory2ConfigBlacklist[edit | edit source]

Set this flag to true to enable the category blacklist in "MediaWiki:Add Article to Category 2 excluded categories" page (you need to create this page first). Usage (example):

== Excluded Categories from Add To Article 2 Extension ==

;My Excluded category 1
;My Excluded category 2

;Another one

If you don't like the name of this page, you can replace it by changing the following line in the GetExcludedCategories() function :

     $specialcatpage='Add Article to Category 2 excluded categories';


See also[edit | edit source]

Notes[edit | edit source]

  1. The text (i.e "Category" in English) depends on what language the Mediwiki is using.