Jump to content

Extension:Wikistories

From mediawiki.org
MediaWiki extensions manual
Wikistories
Release status: experimental
Implementation ContentHandler , Hook
Description Supports the creation, curation and distribution of visual stories based on wiki content.
Author(s) Wikimedia Foundation
Compatibility policy Snapshots releases along with MediaWiki. Master is not backward compatible.
MediaWiki >= 1.43
License MIT License
Download
  • $wgWikistoriesRestDomain
  • $wgWikistoriesCommonsDomain
  • $wgWikistoriesCCBYSAUrl
  • $wgWikistoriesMinFrames
  • $wgWikistoriesDiscoveryMode
  • $wgWikistoriesGFDLUrl
  • $wgWikistoriesTermsOfUseUrl
  • $wgWikistoriesNotifyAboutStoryMaintenance
  • $wgWikistoriesMaxFrames
  • $wgWikistoriesMaxTextLength
  • $wgWikistoriesUnmodifiedTextThreshold
  • edit-story
Quarterly downloads 12 (Ranked 125th)
Translate the Wikistories extension if it is available at translatewiki.net
Issues Open tasks · Report a bug

The Wikistories extension support the creation, curation and distribution of visual stories based on wiki content.

Install

[edit]
  • Download and move the extracted Wikistories folder to your extensions/ directory.
    Developers and code contributors should install the extension from Git instead, using:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Wikistories
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'Wikistories' );
    
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Running locally

[edit]

Once downloaded and installed successfully from steps above, follow the steps below to run locally:

  • Clone the dependency extensions and skin. You can run these from your root Mediawiki directory.
    git clone "https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue" skins/MinervaNeue
    git clone "https://gerrit.wikimedia.org/r/mediawiki/extensions/EventLogging" extensions/EventLogging
    git clone "https://gerrit.wikimedia.org/r/mediawiki/extensions/MobileFrontend" extensions/MobileFrontend
    
  • Add the following code at the bottom of your LocalSettings.php file.
    wfLoadSkin( 'MinervaNeue' );
    wfLoadExtension( 'EventLogging' );
    wfLoadExtension( 'MobileFrontend' );
    $wgWikistoriesDiscoveryMode = 'public';
    $wgWikistoriesRestDomain = 'wikipedia.org';
    $wgUseInstantCommons = true;
    
  • Run npm install from the extensions/Wikistories directory.

Now if you refresh your browser and go to some article page in your local set up, you should see Wikistories at the top of the article. Make sure you are in mobile view in your browser as Wikistories is only enabled for mobile usage.

Configuration options

[edit]

The Wikistories extension has support for some basic configuration that allows you to run it in different ways.

Running the extension as a Beta Feature

[edit]

Wikistories has support to run it as a Beta Feature. We can do this with the wgWikistoriesDiscoveryMode we set in LocalSettings.php. This defines how is the discovery module activated, and it can be set to 'beta' (which means it is a beta feature) or 'public' (which means it is available by default to everyone, including anons). Any other value means the discovery feature is disabled.


Therefore to run as a Beta Feature you first need to install the Beta Feature extension:

git clone "https://gerrit.wikimedia.org/r/mediawiki/extensions/BetaFeatures" extensions/BetaFeatures

And then update your LocalSettings.php with:

wfLoadExtension( 'BetaFeatures' );
$wgWikistoriesDiscoveryMode = 'beta';

After this you should be able to go to the Beta Features tab in your user preferences and check the Wikistories checkbox to manually activate it.

Sending notifications to story watchers when story needs to be updated

[edit]

If a user running Wikistories locally adds a story to their watchlist, then they should be sent a notification when the story needs to be updated. This requires cloning and installing the Echo extension from your root Mediawiki directory.

git clone "https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo.git" extensions/Echo

And then update your LocalSettings.php with:

wfLoadExtension( 'Echo' );
$wgWikistoriesNotifyAboutStoryMaintenance = true;
$wgJobRunRate = 10;

Then you will get an echo notification when a story you are watching needs updated.

Configuring API domains

[edit]

There are two config for API domains:

  • $wgWikistoriesCommonsDomain: Sets the Commons API domain. Defaults to production value 'commons.wikimedia.org', and you can use 'commons.wikimedia.beta.wmflabs.org' for beta cluster.
  • $wgWikistoriesRestDomain: Sets the REST API domain. Defaults to null, in which case the domain of the current site will be used. Otherwise use 'wikipedia.org' for full article text when running locally

Other configuration options

[edit]
  • $wgWikistoriesMinFrames: Minimum number of frames a story needs to have to be valid.
  • $wgWikistoriesMaxFrames: Maximum number of frames a story needs to have to be valid.
  • $wgWikistoriesMaxTextLength: Maximum number of characters a story frame can have.
  • $wgWikistoriesUnmodifiedTextThreshold: Percentage threshold of unmodified text allowed before showing final edit warning

Code stewardship

[edit]

Maintained by the Language and Product Localization team

See also

[edit]