The Wikistories extension support the creation, curation and distribution of visual stories based on wiki content.
- Download and move the extracted
Wikistoriesfolder to your
Developers and code contributors should install the extension from Git instead, using:
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Wikistories
- Add the following code at the bottom of your LocalSettings.php file:
wfLoadExtension( 'Wikistories' );
- Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
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;
npm installfrom the
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.
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
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
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
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
$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
Maintained by the Inuka team
|This extension is being used on one or more Wikimedia projects. This probably means that the extension is stable and works well enough to be used by such high-traffic websites. Look for this extension's name in Wikimedia's CommonSettings.php and InitialiseSettings.php configuration files to see where it's installed. A full list of the extensions installed on a particular wiki can be seen on the wiki's Special:Version page.|