Extension:ArticleStatus

From MediaWiki.org
Jump to: navigation, search
Screenshot of extension ArticleRatings, that is a similar extension.

ArticleStatus is an extension that enables assigning the article status into database instead of a template. This extension is meant to replace "good" (used in 18,712 articles) and "featured" (used in 4,085 articles + 2,524 lists) status templates used in wikicode. The extension should have customizable statuses (the number of statuses + the local names in a project) and assigning statuses (rating) should be available to administrators and assignable to specific users. The code is based on Extension:ArticleRatings and Extension:FlaggedRevs. Preferably, the extension would have some internal categorization method, so that the extension could generate lists that are separated into different topics. An article can be assigned only one status -- thus, only one status can be chosen at a time.

Settings[edit | edit source]

First, the statuses of the project have to be set. The higher the number, the higher the status is considered.

$wgArticleStatusTags = array(
	'good' => 1,
	'featured' => 2,
);

In this example, if the article is not 'good' or 'featured', it is considered to have no status.

There can be for example 1-4 statuses (the amount is not limited, but the lowest is a single status).

$wgArticleStatusTags = array(
	'okay' => 1,
	'good' => 2,
        'excellent' => 3,
        'featured' => 4,
);

In this example, if the article is not any of those four, it is considered to have no status.

Configuration[edit | edit source]

User rights and user groups[edit | edit source]

By default, nobody can rate anything, so the first step is to set up user rights.

User rights[edit | edit source]

ArticleStatus creates the following new user right:

  • rate – user can rate articles

How to assign user rights[edit | edit source]

User rights can be assigned in two ways:

  • Assigning rights to user groups
Assign these user rights to existing user groups in LocalSettings.php:
$wgGroupPermissions['sysop']['rate'] = true; //allow administrators to rate articles
  • Assigning rights to specific users
Manually add user accounts to the appropriate groups via Special:UserRights.