Installing AFTv5

From SubSurfWiki
< User:Matt
MattInstalling AFTv5
Jump to navigation Jump to search

How to install the ArticleFeedbackToolv5 extension.

To install, first backup the database. Then do this to download:

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

Add to LocalSettings.php:

# Article Feedback Tool on every article
require_once( "$IP/extensions/ArticleFeedbackv5/ArticleFeedbackv5.php" );
$wgArticleFeedbackv5LotteryOdds = 100;
$wgArticleFeedbackv5CTABuckets = array(
        'buckets' => array(
                '0' => 0, // display nothing
                '1' => 100, // display "Enticement to edit"
                '2' => 0, // display "Learn more"
                '3' => 0, // display "Take a survey"
                '4' => 0, // display "Sign up or login"
                '5' => 0, // display "View feedback"
                '6' => 0, // display "Visit Teahouse"
        ),
        'version' => 4,
        'expires' => 0,
);
$wgArticleFeedbackv5BlacklistCategories = array( 'No_AFT' );

Then run the update script. From the same directory as LocalSettings.php do this:

sudo php maintenance/update.php

You can do this 'live' or in downtime. This isn't a busy wiki so I tend to do everything live; if you have a backup done, you can always recover. One trick is to put the database in read-only mode for a while, with something like this in LocalSettings.php:

$wgReadOnly = 'Back soon! Upgrading the wiki software.';