Extension:GettingStarted

From MediaWiki.org
Jump to navigation Jump to search
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.svg
GettingStarted

Release status:Extension status stable

ImplementationTemplate:Extension#type User interface, API
DescriptionTemplate:Extension#description Delivers task suggestions to new editors and shows editors how to complete those tasks
Author(s)Template:Extension#username
  • Munaf Assaf,
  • Matthew Flaschen,
  • Pau Giner,
  • Kaity Hammerstein,
  • Ori Livneh,
  • Rob Moen,
  • S Page,
  • Sam Smith,
  • Moiz Syed
Latest versionTemplate:Extension#version Continuous updates
MediaWikiTemplate:Extension#mediawiki 1.25+
Database changesTemplate:Extension#needs-updatephp No
LicenseTemplate:Extension#license GNU General Public License 2.0 or later
Download
ParametersTemplate:Extension#parameters
  • $wgGettingStartedTasks
  • $wgGettingStartedCategoriesForTaskTypes
  • $wgGettingStartedExcludedCategories
  • $wgGettingStartedRedis
  • $wgGettingStartedRedisSlave
  • $wgGettingStartedRedisOptions
  • $wgGettingStartedRunTest
  • $wgvTaskRecommendationsExperimentV1StartDate
  • $wgTaskRecommendationsExperimentV1EndDate
Hooks usedTemplate:Extension#hook
BeforePageDisplayManual:Hooks/BeforePageDisplay
CategoryAfterPageAddedManual:Hooks/CategoryAfterPageAdded
CategoryAfterPageRemovedManual:Hooks/CategoryAfterPageRemoved
ArticleDeleteCompleteManual:Hooks/ArticleDeleteComplete
MakeGlobalVariablesScriptManual:Hooks/MakeGlobalVariablesScript
ResourceLoaderGetConfigVarsManual:Hooks/ResourceLoaderGetConfigVars
ResourceLoaderRegisterModulesManual:Hooks/ResourceLoaderRegisterModules
CentralAuthPostLoginRedirect
PostLoginRedirectManual:Hooks/PostLoginRedirect
GetPreferencesManual:Hooks/GetPreferences
UserLogoutCompleteManual:Hooks/UserLogoutComplete
PersonalUrlsManual:Hooks/PersonalUrls

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

Check usage and version matrix.

IssuesPhabricator

Open tasks · Report a bug

The GettingStarted extension provides an onboarding process for new editors of Wikipedia.

Features[edit]

UX/UI described in more detail at Onboarding new Wikipedians

GettingStarted provides several interfaces for suggesting introductory tasks to newly-registered editors, and it uses guided tours to show them how to complete their first edits.

If CentralAuth is installed, GettingStarted users are redirected back to their internal referrer (or the main page, if there was no referrer) post-registration. After users are sent back, they are provided with an invitation to either edit the current page or take a suggestion of something easy to edit.

Without CentralAuth, the above is the same, but the standard core interstitial page letting you change your preferences (or click a link to return) shows. The link to their internal referrer is modified to include a GettingStarted parameter (triggering the above-mentioned invitation).

Installation[edit]

  • Install the required dependencies:
  • Download and place the file(s) in a directory called GettingStarted in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    wfLoadExtension( 'GettingStarted' );
    
  • Configure as required
  • YesY Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

To users running MediaWiki 1.27 or earlier:

The instructions above describe the new way of installing this extension using wfLoadExtension() If you need to install this extension on these earlier versions (MediaWiki 1.27 and earlier), instead of wfLoadExtension( 'GettingStarted' );, you need to use:

require_once "$IP/extensions/GettingStarted/GettingStarted.php";
CentralAuth is supported but not required.

Configuration[edit]

The following configuration parameters are provided:

  • $wgGettingStartedTasks
  • $wgGettingStartedCategoriesForTaskTypes
  • $wgGettingStartedExcludedCategories
  • $wgGettingStartedRedis
  • $wgGettingStartedRedisSlave
  • $wgGettingStartedRedisOptions
  • $wgGettingStartedRunTest
  • $wgvTaskRecommendationsExperimentV1StartDate
  • $wgTaskRecommendationsExperimentV1EndDate

API[edit]

The extension implements a MediaWiki API query list submodule "gettingstartedgetpages" that supplies

  • suggested pages to work on
  • or simply related pages.

"Related pages" relies on the morelike: prefix search feature of the Cirrus Search extension.

Suggested pages are optional for the GettingStarted new user experience and they only appear if the wiki has appropriate task categories set. GettingStarted stores lists of articles in Redis, populating them from on-wiki categories such as English Wikipedia's All articles needing copy edit according to the configuration in $wgGettingStartedCategoriesForTaskTypes. You may also exclude certain categories via $wgGettingStartedExcludedCategories. On the Wikimedia cluster, configuration settings in InitialiseSettings.php determine their value.

View the generated API documentation for the gettingstartedgetpages API module on English Wikipedia. The following are examples of types of pages you request from the API:

  • Get 10 random pages, related to Earth
  • Get a single random page that needs copy-editing.
  • Get three random pages needing copy-editing, in XML.

Developer Notes[edit]

Setting up the environment for automated browser testing

The extension's automated browser tests require that:

  1. The $wgGettingStartedCategoriesForTaskTypes variable has been configured in InitialiseSettings.php; and
  2. The populate_categories.php maintenance script has been run.

For example, if and when the extension's nightly build starts failing because there aren't any suggestions (see https://phabricator.wikimedia.org/diffusion/EGST/browse/master/tests/browser/features/modal_on_editable_returnto.feature$10), then run the populate_categories.php maintenance script on the Beta Cluster, i.e.

ssh deployment-tin.deployment-prep.eqiad.wmflabs
foreachwikiindblist gettingstarted-with-category-suggestions.dblist extensions/GettingStarted/maintenance/populate_categories.php

See also[edit]