Extension:ArticleFeedbackv5

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manual
Crystal Clear action run.png
Article Feedback v5

Release status: unmaintained

AFT5-Feedback-Form-Option-1-Launch-Screenshot.png
Implementation Special page
Description Encourage users to contribute to Wikipedia by allowing them to verbally assess an article.
Author(s) (Mlitntalk)
Latest version 5.1.0
MediaWiki 1.21+
Database changes yes
License GPLv2
Download
Added rights

aft-reader, aft-member, aft-editor, aft-monitor, aft-administrator, aft-oversighter

Hooks used
LoadExtensionSchemaUpdates

BeforePageDisplay
ResourceLoaderGetConfigVars
MakeGlobalVariablesScript
GetPreferences
EditPage::showEditForm:fields
EditPage::attemptSave
ArticleSaveComplete
ContribsPager::reallyDoQuery
ContributionsLineEnding
ProtectionForm::buildForm
ProtectionForm::save
ProtectionForm::showLogExtract
UserLoginComplete
UserGetReservedNames

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

Check usage and version matrix; code metrics
Bugs: list open list all report
See Article feedback/Version 5 for more information.

The Article Feedback Tool, Version 5 was a Wikimedia Foundation project designed to engage Wikimedia readers in the assessment of article quality, one of the five priorities defined in the strategic plan.

Reusers of the extension should be aware of bug 54197 and bug 58956.

Download[edit | edit source]

You can download the extension directly from the MediaWiki source code repository (browse code). You can get:

One of the extension's tags

Not all extensions have tags. Some extensions have tags for each release, in which case those tags have the same stability as the release. To download a tag

  • Go to the tags list
  • Click the name of the tag you want to download
  • Click "snapshot"
The latest version of one of the extension's branches

Each extension has a master branch containing the latest code (might be unstable). Extensions may have further branches as well.

  • Go to the branches list
  • Click the branch name
  • Click "snapshot"
A snapshot made during the release of a MediaWiki version.

This might be unstable and is not guaranteed to work with the associated MediaWiki version.

After you've got the code, save it into the extensions/ArticleFeedbackv5 directory of your wiki.

If you are familiar with git and have shell access to your server, you can obtain the extension, with all its tags and branches, as follows:

cd extensions
git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/ArticleFeedbackv5.git

Installation[edit | edit source]

  • Download and extract the file(s) in a directory called ArticleFeedbackv5 in your extensions/ folder. If you're a developer and this extension is in a Git repository, then instead you should clone the repository.
  • Add the following code at the bottom of your LocalSettings.php:
require_once "$IP/extensions/ArticleFeedbackv5/ArticleFeedbackv5.php";
  • Run the update script which will automatically create the necessary database tables that this extension needs.
  • Done! Navigate to "Special:Version" on your wiki to verify that the extension is successfully installed.
  • If your wiki has a lot of traffic, Extension:AbuseFilter is recommended, to manage abusive feedback.

Configuration[edit | edit source]

$wgArticleFeedbackv5Categories[edit | edit source]

An array of category titles (using '_'s instead of spaces). Pages in any of these categories will have the rating widget shown (regardless of the $wgArticleFeedbackv5LotteryOdds described elsewhere). If empty (the default), the extension is effectively disabled. e.g.:

$wgArticleFeedbackv5Categories = array( 'Foo_bar', 'Baz' );

$wgArticleFeedbackv5BlacklistCategories[edit | edit source]

Which categories the pages must not belong to have the widget added (with _ in text). e.g.:

$wgArticleFeedbackv5BlacklistCategories = array( 'Baz' );

$wgArticleFeedbackv5Namespaces[edit | edit source]

Only enable the widget in these namespaces (regardless of the category of the page). Defaults to $wgContentNamespaces (defaults to array( NS_MAIN ) ). e.g.:

$wgArticleFeedbackv5Namespaces = array( NS_MAIN, NS_HELP, NS_PROJECT );

$wgArticleFeedbackv5LotteryOdds[edit | edit source]

Percentage of article AFT should be enabled on. Note that even when a lottery is set for a certain namespace, AFT will not show up unless that namespace is also added to $wgArticleFeedbackv5Namespaces. This can be set either as integer as a site-wide percentage, or as a key-value array for a per-namespace percentage. e.g.:

// enable site-wide on 100% on all namespaces defined in $wgArticleFeedbackv5Namespaces
$wgArticleFeedbackv5LotteryOdds = 100;

// enable 100% on main namespace & 50% on help namespace (assuming both are also defined in $wgArticleFeedbackv5Namespaces)
$wgArticleFeedbackv5LotteryOdds = array( NS_MAIN => 100, NS_HELP => 50 );

Technical: all articles with an ID ending on (1000 - (odds * 10)) and above, will get AFT enabled. E.g. when setting odds at 15%, all articles whose ID ends in 850-999 will have AFT enabled.

$wgArticleFeedbackv5TalkPageLink[edit | edit source]

Defines whether or not there should be a link to the corresponding feedback on the page's talk page. e.g.:

$wgArticleFeedbackv5TalkPageLink = true;

$wgArticleFeedbackv5WatchlistLink[edit | edit source]

Defines whether or not there should be a link to the watchlisted feedback on the watchlist page. e.g.:

$wgArticleFeedbackv5WatchlistLink = true;

Note: the watchlist feature does not scale well. You may want to disable this feature on large wikis.

$wgArticleFeedbackv5DisplayBuckets[edit | edit source]

This defines which form should be displayed and at what percentage. Note that support for some forms (2, 3, 5) has been discontinued completely, as they no longer fit the technical architecture the rest was built upon.

$wgArticleFeedbackv5DisplayBuckets = array(
        'buckets' => array(
                '0' => 0, // display nothing
                '1' => 0, // display 1-step feedback form
//              '2' => 0, // abandoned
//              '3' => 0, // abandoned
                '4' => 0, // display encouragement to edit page
//              '5' => 0, // abandoned
                '6' => 100, // display 2-step feedback form
        ),
        'version' => 6,
        'expires' => 30,
);

$wgArticleFeedbackv5LinkBuckets[edit | edit source]

This defines which links should be displayed and at what percentage.

$wgArticleFeedbackv5LinkBuckets = array(
        'buckets' => array(
                'X' => 100,
                'A' => 0,
                'B' => 0,
                'C' => 0,
                'D' => 0,
                'E' => 0,
                'F' => 0,
                'G' => 0,
                'H' => 0,
        ),
        'version' => 5,
        'expires' => 30,
);

$wgArticleFeedbackv5CTABuckets[edit | edit source]

This defines which CTAs should be displayed and at what percentage.

$wgArticleFeedbackv5CTABuckets = array(
        'buckets' => array(
                '0' => 0, // display nothing
                '1' => 40, // display "Enticement to edit"
                '2' => 10, // display "Learn more"
                '3' => 0, // display "Take a survey"
                '4' => 20, // display "Sign up or login"
                '5' => 20, // display "View feedback"
                '6' => 10, // display "Visit Teahouse"
        ),
        'version' => 4,
        'expires' => 0,
);

$wgArticleFeedbackv5MaxCommentLength[edit | edit source]

Restrict comment length to an arbitrary number of characters. Defaults to zero for no check. e.g.:

$wgArticleFeedbackv5MaxCommentLength = 400;

Permissions[edit | edit source]

AFTv5 introduces a new set of permissions to define users' access roles. These are mapped to the following already existing groups by default, so make sure these are configured on your setup (or bind the AFT-permissions to the appropriate groups in your setup):

  • aft-reader: *, user, confirmed, autoconfirmed, rollbacker, reviewer, sysop, oversight
  • aft-member: user, confirmed, autoconfirmed, rollbacker, reviewer, sysop, oversight
  • aft-editor: confirmed, autoconfirmed, rollbacker, reviewer, sysop, oversight
  • aft-monitor: rollbacker, reviewer, sysop, oversight
  • aft-administrator: sysop, oversight
  • aft-oversighter: oversight

Feedback[edit | edit source]

Open tickets in Wikimedia's Bugzilla under the "ArticleFeedbackv5" component in the "MediaWiki extensions" product.

See also[edit | edit source]