Difference between revisions of "How to install and configure this wiki"

From Gender and Tech Resources

(Install a render server to generate PDF and ODF)
 
(40 intermediate revisions by 2 users not shown)
Line 9: Line 9:
 
  apt-get update
 
  apt-get update
 
  apt-get upgrade
 
  apt-get upgrade
  apt-get install php5 phpmyadmin mysql-server php5-intl php-patchwork-utf8 imagemagick git
+
  apt-get install php5 phpmyadmin mysql-server php5-intl php-patchwork-utf8 imagemagick git curl
  
 
== For e-mail ==
 
== For e-mail ==
Line 35: Line 35:
 
require_once "$IP/extensions/ImageMap/ImageMap.php";
 
require_once "$IP/extensions/ImageMap/ImageMap.php";
 
require_once "$IP/extensions/InputBox/InputBox.php";
 
require_once "$IP/extensions/InputBox/InputBox.php";
require_once "$IP/extensions/LocalisationUpdate/LocalisationUpdate.php";
 
 
require_once "$IP/extensions/Nuke/Nuke.php";
 
require_once "$IP/extensions/Nuke/Nuke.php";
 
require_once "$IP/extensions/ParserFunctions/ParserFunctions.php";
 
require_once "$IP/extensions/ParserFunctions/ParserFunctions.php";
Line 51: Line 50:
 
== Upload settings ==
 
== Upload settings ==
 
allow apache to write in the upload folder
 
allow apache to write in the upload folder
  chown -R www-data:www-data /var/www/html/wiki/images
+
  chown -R www-data:www-data /var/www/html/gtwiki/images
  
 
=== Modify the php.ini file ===
 
=== Modify the php.ini file ===
Line 63: Line 62:
  
 
== Modify the Localsettings.php file ==
 
== Modify the Localsettings.php file ==
 +
<source lang="php">
 +
#####################################################################
 +
# Increase Shell memory (default 100 MB)                            #
 +
#####################################################################
 +
 +
$wgMaxShellMemory = 512000;
 +
</source>
 
<source lang="php">
 
<source lang="php">
 
#####################################################################
 
#####################################################################
Line 69: Line 75:
 
# doc: http://www.mediawiki.org/wiki/Manual:User_rights_management
 
# doc: http://www.mediawiki.org/wiki/Manual:User_rights_management
 
# Sign up for a new account
 
# Sign up for a new account
$wgGroupPermissions['*']['createaccount']=true;
+
$wgGroupPermissions['*']['createaccount']=false;
 
# Edit once email is confirmed
 
# Edit once email is confirmed
 
$wgGroupPermissions['*']['edit']=false;
 
$wgGroupPermissions['*']['edit']=false;
Line 75: Line 81:
 
$wgGroupPermissions['*']['createtalk']=false;
 
$wgGroupPermissions['*']['createtalk']=false;
 
$wgGroupPermissions['emailconfirmed']['upload'] = true; // Allow regular users to upload files
 
$wgGroupPermissions['emailconfirmed']['upload'] = true; // Allow regular users to upload files
$wgGroupPermissions['emailconfirmed']['upload_by_url'] = true;
+
#$wgGroupPermissions['*']['upload_by_url'] = true;
 +
$wgGroupPermissions['autoconfirmed']['upload_by_url'] = true;
 
$wgGroupPermissions['emailconfirmed']['edit'] = true;
 
$wgGroupPermissions['emailconfirmed']['edit'] = true;
 +
require_once "$IP/extensions/ConfirmAccount/ConfirmAccount.php";
 +
$wgMakeUserPageFromBio = false;
 +
$wgAutoWelcomeNewUsers = false;
 +
$wgConfirmAccountRequestFormItems = array(
 +
      'UserName'        => array( 'enabled' => true ),
 +
      'RealName'        => array( 'enabled' => false ),
 +
      'Biography'      => array( 'enabled' => false, 'minWords' => 30 ),
 +
      'AreasOfInterest' => array( 'enabled' => false ),
 +
      'CV'              => array( 'enabled' => false ),
 +
      'Notes'          => array( 'enabled' => true ),
 +
      'Links'          => array( 'enabled' => false ),
 +
      'TermsOfService'  => array( 'enabled' => false ),
 +
);
 +
$wgConfirmAccountContact = 'alexandra@tacticaltech.org';
 +
$wgConfirmAccountContact = 'benjamin@labomedia.org';
 
</source>
 
</source>
  
Line 94: Line 116:
 
$wgVerifyMimeType = false;
 
$wgVerifyMimeType = false;
 
</source>
 
</source>
 
  
 
= Extensions =
 
= Extensions =
 +
go into the extension directory
 +
cd /var/www/html/gtwiki/extensions
 +
 
== MsUpload ==
 
== MsUpload ==
  wget https://extdist.wmflabs.org/dist/extensions/MsUpload-REL1_24-29e0f38.tar.gz
+
  git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/MsUpload.git
tar -xzf MsUpload-REL1_24-29e0f38.tar.gz -C /var/www/html/wiki/extensions
+
rm MsUpload-REL1_24-29e0f38.tar.gz
+
 
<source lang="php">
 
<source lang="php">
 
# MsUpload https://www.mediawiki.org/wiki/Extension:MsUpload
 
# MsUpload https://www.mediawiki.org/wiki/Extension:MsUpload
Line 112: Line 134:
  
 
== PdfHandler ==
 
== PdfHandler ==
  apt-get install poppler-utils
+
  git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/PdfHandler.git
wget https://extdist.wmflabs.org/dist/extensions/PdfHandler-REL1_24-0bc0148.tar.gz
+
tar -xzf PdfHandler-REL1_24-0bc0148.tar.gz -C /var/www/html/wiki/extensions
+
rm PdfHandler-REL1_24-0bc0148.tar.gz
+
 
<source lang="php">
 
<source lang="php">
 
# PdfHandler https://www.mediawiki.org/wiki/Extension:PdfHandler
 
# PdfHandler https://www.mediawiki.org/wiki/Extension:PdfHandler
Line 125: Line 144:
 
$wgPdftoText = '/usr/bin/pdftotext';
 
$wgPdftoText = '/usr/bin/pdftotext';
 
</source>
 
</source>
Ajouter "case 'pdf':" ligne 122 in extensions/MsUpload.js :
+
Add "case 'pdf':" ligne 122 in extensions/MsUpload.js :
 
<source lang="javascript">
 
<source lang="javascript">
 
         if ( $.inArray( file.extension, wgFileExtensions ) !== -1 ) {
 
         if ( $.inArray( file.extension, wgFileExtensions ) !== -1 ) {
Line 133: Line 152:
  
 
== ConfirmEdit ==
 
== ConfirmEdit ==
  wget https://extdist.wmflabs.org/dist/extensions/ConfirmEdit-REL1_24-3813252.tar.gz
+
  git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/ConfirmEdit.git
tar -xzf ConfirmEdit-REL1_24-3813252.tar.gz -C /var/www/html/wiki/extensions
+
rm ConfirmEdit-REL1_24-3813252.tar.gz
+
 
<source lang="bash">
 
<source lang="bash">
 
# ConfirmEdit https://www.mediawiki.org/wiki/Extension:ConfirmEdit
 
# ConfirmEdit https://www.mediawiki.org/wiki/Extension:ConfirmEdit
Line 150: Line 167:
  
 
== WikiEditor ==
 
== WikiEditor ==
 +
for mediawiki 1.24
 
  wget https://extdist.wmflabs.org/dist/extensions/WikiEditor-REL1_24-b13e25d.tar.gz
 
  wget https://extdist.wmflabs.org/dist/extensions/WikiEditor-REL1_24-b13e25d.tar.gz
  tar -xzf WikiEditor-REL1_24-b13e25d.tar.gz -C /var/www/html/wiki/extensions
+
  tar -xzf WikiEditor-REL1_24-b13e25d.tar.gz -C /var/www/html/wiki/extensions/
 
  rm WikiEditor-REL1_24-b13e25d.tar.gz
 
  rm WikiEditor-REL1_24-b13e25d.tar.gz
 +
 
<source lang="php">
 
<source lang="php">
 
# WikiEditor https://www.mediawiki.org/wiki/Extension:WikiEditor
 
# WikiEditor https://www.mediawiki.org/wiki/Extension:WikiEditor
Line 166: Line 185:
  
 
== AdminLinks ==
 
== AdminLinks ==
cd /var/www/html/wiki/extensions
 
 
  git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/AdminLinks.git
 
  git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/AdminLinks.git
 
<source lang="php">
 
<source lang="php">
Line 174: Line 192:
  
 
== Replace Text ==
 
== Replace Text ==
cd /var/www/html/wiki/extensions
 
 
  git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/ReplaceText.git
 
  git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/ReplaceText.git
 
<source lang="php">
 
<source lang="php">
Line 182: Line 199:
  
 
== EmbedVideo ==
 
== EmbedVideo ==
cd /var/www/html/wiki/extensions
 
 
  git clone https://github.com/Alexia/mediawiki-embedvideo.git
 
  git clone https://github.com/Alexia/mediawiki-embedvideo.git
 
  mv mediawiki-embedvideo/ /var/www/html/wiki/extensions/EmbedVideo
 
  mv mediawiki-embedvideo/ /var/www/html/wiki/extensions/EmbedVideo
Line 192: Line 208:
 
== NiceCategoryList ==
 
== NiceCategoryList ==
 
  cd /var/www/html/wiki/extensions/
 
  cd /var/www/html/wiki/extensions/
  mkdir NiceCategoryList
+
  mkdir NiceCategoryList2
 
  cd NiceCategoryList/
 
  cd NiceCategoryList/
 
  nano NiceCategoryList.php
 
  nano NiceCategoryList.php
Line 202: Line 218:
  
 
== DynamicPageList ==
 
== DynamicPageList ==
cd /var/www/html/wiki/extensions
 
 
  git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/intersection.git intersection
 
  git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/intersection.git intersection
 
<source lang="php">
 
<source lang="php">
Line 220: Line 235:
  
 
== SelectCategory ==
 
== SelectCategory ==
cd /var/www/html/wiki/extensions
 
 
  git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/SelectCategory.git
 
  git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/SelectCategory.git
 
<source lang="php">
 
<source lang="php">
 
# SelectCategory https://www.mediawiki.org/wiki/Extension:SelectCategory
 
# SelectCategory https://www.mediawiki.org/wiki/Extension:SelectCategory
 
require_once( 'extensions/SelectCategory/SelectCategory.php' );
 
require_once( 'extensions/SelectCategory/SelectCategory.php' );
</source>
 
 
== UniversalLanguageSelector ==
 
cd /var/www/html/wiki/extensions
 
git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/UniversalLanguageSelector.git
 
<source lang="php">
 
# UniversalLanguageSelector https://www.mediawiki.org/wiki/Extension:UniversalLanguageSelector
 
require_once "$IP/extensions/UniversalLanguageSelector/UniversalLanguageSelector.php";
 
 
</source>
 
</source>
  
 
== Collection to generate books and PDF ==
 
== Collection to generate books and PDF ==
 +
git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Collection.git
 +
or
 
  wget https://extdist.wmflabs.org/dist/extensions/Collection-REL1_24-f0686fd.tar.gz
 
  wget https://extdist.wmflabs.org/dist/extensions/Collection-REL1_24-f0686fd.tar.gz
 
  tar -xzf Collection-REL1_24-f0686fd.tar.gz -C /var/www/html/wiki/extensions/
 
  tar -xzf Collection-REL1_24-f0686fd.tar.gz -C /var/www/html/wiki/extensions/
Line 243: Line 251:
 
require_once "$IP/extensions/Collection/Collection.php";
 
require_once "$IP/extensions/Collection/Collection.php";
 
</source>
 
</source>
/!\ needs more config and test while the server is accessible from internet /!\
 
  
 +
=== Install a render server to generate PDF and ODF ===
 +
Collection + render server
 +
* http://mwlib.readthedocs.org/en/latest/collection.html
 +
Installation mwlib
 +
*  http://mwlib.readthedocs.org/en/latest/installation.html#mwlib-install
 +
apt-get install python-pip python-dev libxml2-dev libxslt-dev python-dev lib32z1-dev imagemagick
 +
pip install -i http://pypi.pediapress.com/simple/ mwlib
 +
pip install -i http://pypi.pediapress.com/simple/ mwlib.rl
 +
pip install -i http://pypi.pediapress.com/simple/ pyfribidi
 +
Tests
 +
mw-zip -c :en -o test.zip Acdc Number
 +
mw-render -c test.zip -o test.pdf -w rl
 +
mw-render --list-writers
 +
Fetching the content
 +
mw-zip -c https://gendersec.tacticaltech.org/wiki/ -o completemanual.zip 'Complete manual'
 +
Rendering
 +
  mw-render -c completemanual.zip -o completemanual.pdf -w rl
 +
http://mwlib.readthedocs.org/en/latest/commands.html
 +
Running a renderserver
 +
* http://mwlib.readthedocs.org/en/latest/renderserver.html#mwlib-renderserver
  
= Skins =
+
== Semantic MediaWiki ==
== Foreground ==
+
=== Install ===
  cd /var/www/html/wiki/skins
+
https://www.semantic-mediawiki.org/wiki/Help:Installation/Using_Composer_with_MediaWiki_1.22%2B
  git clone https://github.com/thingles/foreground.git
+
1. First, install composer :
 +
curl -sS https://getcomposer.org/installer | php
 +
mv composer.phar /usr/local/bin/composer
 +
2. Run the installation scriptfrom the base directory of your MediaWiki installation:
 +
  cd /var/www/html/gtwiki
 +
composer require mediawiki/semantic-media-wiki "~2.1"
 +
3. Run the setup script from the base directory of your MediaWiki installation:
 +
php maintenance/update.php
 +
4. Add a call to enableSemantics() to the end of the "LocalSettings.php" file. enableSemantics() takes in the domain name of the wiki; a wiki located at "example.org", for instance, should have the following call:
 +
  nano /var/www/html/gtwiki/LocalSettings.php
 +
enableSemantics( 'tacticaltech.org/gtwiki' );
 +
 
 +
=== Update ===
 +
Use these instructions to update an existing SMW installation.
 +
 
 +
# Backup your database and installation.
 +
# Run the update script from the base directory of your MediaWiki installation:
 +
#: <syntaxhighlight lang="text">php composer.phar update</syntaxhighlight>
 +
# See the page "Special:Version" on your wiki to verify that the extension was successfully updated.
 +
# Run the setup script from the base directory of your MediaWiki installation:
 +
#: <syntaxhighlight lang="text">php maintenance/update.php</syntaxhighlight>
 +
# Run the refresh database script from the base directory of your MediaWiki installation: This is an optional step to take to assure that the semantic store is valid and up to date.</ref>
 +
#: <syntaxhighlight lang="text">php extensions/SemanticMediaWiki/maintenance/SMW_refreshData.php -d 50 -v</syntaxhighlight>
 +
# Done!
 +
 
 +
== Semantic Drilldown ==
 +
 
<source lang="php">
 
<source lang="php">
# Foreground https://github.com/thingles/foreground
+
# Semantic Drilldown https://www.mediawiki.org/wiki/Extension:Semantic_Drilldown
require_once "$IP/skins/foreground/foreground.php";
+
include_once("$IP/extensions/SemanticDrilldown/SemanticDrilldown.php");
 
</source>
 
</source>
  
= Deprecated (for memory) =
+
== Semantic Forms ==
 
+
  git clone https://git.wikimedia.org/git/mediawiki/extensions/SemanticForms.git
== Semantic Bundle ==
+
<source lang="php">
* https://www.mediawiki.org/wiki/Semantic_Bundle
+
# Semantic Forms https://www.mediawiki.org/wiki/Extension:Semantic_Forms
apt-get install zip p7zip-full
+
include_once "$IP/extensions/SemanticForms/SemanticForms.php";
cd /var/www/html/wiki/extensions
+
</source>
  git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/SemanticBundle.git
+
make
+
cp SemanticBundle-20150409.tgz /var/www/html/wiki/extensions/
+
cd ..
+
tar xvf SemanticBundle-20150409.tgz
+
rm SemanticBundle-20150409.tgz
+
cd SemanticBundle/
+
cp SemanticBundleSettings.sample.php SemanticBundleSettings.php
+
Then, include SemanticBundleSettings.php and SemanticBundle.php within LocalSettings.php:
+
require_once( "$IP/extensions/SemanticBundle/SemanticBundleSettings.php" );
+
require_once( "$IP/extensions/SemanticBundle/SemanticBundle.php" );
+
  
The next step is to initialize Semantic MediaWiki. First, make sure that you are logged in as an administrator/sysop, such as the WikiSysop user. Then, go to Special:SMWAdmin, and click on the "Initialize or upgrade tables" button.
+
== Semantic Forms Inputs ==
  http://192.168.1.78/wiki/index.php/Special:SMWAdmin
+
  git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/SemanticFormsInputs.git
After successful initialization, open up SemanticBundleSettings.php and uncomment the extensions you would like to use. It looks like :
+
 
<source lang="php">
 
<source lang="php">
<?php
+
# Semantic Forms Inputs https://www.mediawiki.org/wiki/Extension:Semantic_Forms_Inputs
 +
require_once("$IP/extensions/SemanticFormsInputs/SemanticFormsInputs.php");
 +
</source>
  
/**
 
* SemanticBundle - A pre-packaged bundle of extensions meant to be used on wikis
 
* based around the Semantic MediaWiki extension.
 
*
 
* Sample of the settings file for the Semantic Bundle
 
*
 
* @link https://www.mediawiki.org/wiki/Extension:Semantic_Bundle Documentation
 
*
 
* @file SemanticBundleSettings.php
 
* @ingroup SemanticBundle
 
*/
 
  
if ( !defined( 'MEDIAWIKI' ) ) {
+
== Semantic Compound Queries ==
    echo "This file is not a valid entry point.";
+
git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/SemanticCompoundQueries.git
    exit( 1 );
+
<source lang="php">
}
+
# Semantic Compound Queries http://www.mediawiki.org/wiki/Extension:Semantic_Compound_Queries
 +
require_once( "$IP/extensions/SemanticCompoundQueries/SemanticCompoundQueries.php" );
 +
</source>
  
# Semantic MediaWiki basic installation.
+
== Data transfer ==
# More info: http://semantic-mediawiki.org/wiki/Help:Installation
+
git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/DataTransfer.git
 +
<source lang="php">
 +
# Data Transfer https://www.mediawiki.org/wiki/Extension:Data_Transfer
 +
include_once "$IP/extensions/DataTransfer/DataTransfer.php";
 +
</source>
  
# First, all of SMW's current dependencies.
+
== Maps ==
# This includes adding autoload calls for the classes that would normally
+
cd /var/www/html/wiki/
# be autoloaded by Composer.
+
composer require mediawiki/maps "*"
$classMap = require_once( "$IP/extensions/SemanticBundle/SB_AutoloadClassmap.php" );
+
it doesn't require any call in the LocalSettings.php as composer mecanism autoload it
foreach ( $classMap as $className => $fileName ) {
+
<source lang="php">
        $wgAutoloadClasses[$className] = $fileName;
+
# Maps http://www.mediawiki.org/wiki/Extension:Maps
}
+
# https://github.com/JeroenDeDauw/Maps/blob/master/docs/INSTALL.md
include_once( "$IP/extensions/SemanticBundle/param-processor/param-processor/src/ParamProcessor/Processor.php" );
+
</source>
include_once( "$IP/extensions/SemanticBundle/param-processor/param-processor/DefaultConfig.php" );
+
include_once( "$IP/extensions/Validator/Validator.php" );
+
  
include_once( "$IP/extensions/SemanticMediaWiki/SemanticMediaWiki.php" );
 
enableSemantics( parse_url( $wgServer, PHP_URL_HOST ) );
 
  
# Semantic Result Formats
+
== Semantic Maps ==
# More info: http://semantic-mediawiki.org/wiki/Help:Semantic_Result_Formats#Installation
+
cd /var/www/html/wiki/
#include_once( "$IP/extensions/SemanticResultFormats/SemanticResultFormats.php" );
+
composer require mediawiki/semantic-maps "*"
 +
it doesn't require any call in the LocalSettings.php as composer mecanism autoload it
 +
<source lang="php">
 +
# Semantic Maps https://www.mediawiki.org/wiki/Extension:Semantic_Maps
 +
# https://github.com/SemanticMediaWiki/SemanticMaps/blob/master/docs/INSTALL.md
 +
</source>
  
# Semantic Forms
+
== Language Bundle ==
# More info: https://www.mediawiki.org/wiki/Extension:Semantic_Forms
+
https://www.mediawiki.org/wiki/MediaWiki_Language_Extension_Bundle
include_once( "$IP/extensions/SemanticForms/SemanticForms.php" );
+
cd /var/www/html/wiki/extensions
 +
for ext in Babel cldr CleanChanges LocalisationUpdate Translate UniversalLanguageSelector
 +
do
 +
  if [ ! -d "$ext" ]
 +
  then
 +
    git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/$ext.git
 +
  fi
 +
  cd $ext; git fetch --tags; git checkout 2015.03; cd ..
 +
done
 +
Modify the LocalSettings.php
 +
<source lang="php">
 +
# Language Bundle https://www.mediawiki.org/wiki/MediaWiki_Language_Extension_Bundle
 +
require_once "$IP/extensions/Babel/Babel.php";
  
# Semantic Forms Inputs
+
require_once "$IP/extensions/cldr/cldr.php";
# More info: https://www.mediawiki.org/wiki/Extension:Semantic_Forms_Inputs
+
include_once( "$IP/extensions/SemanticFormsInputs/SemanticFormsInputs.php" );
+
  
# Semantic Compound Queries
+
require_once "$IP/extensions/CleanChanges/CleanChanges.php";
# More info: https://www.mediawiki.org/wiki/Extension:Semantic_Compound_Queries
+
$wgCCTrailerFilter = true;
#include_once( "$IP/extensions/SemanticCompoundQueries/SemanticCompoundQueries.php" );
+
$wgCCUserFilter = false;
 +
$wgDefaultUserOptions['usenewrc'] = 1;
  
# Semantic Drilldown
+
require_once "$IP/extensions/LocalisationUpdate/LocalisationUpdate.php";
# More info: https://www.mediawiki.org/wiki/Extension:Semantic_Drilldown#Installation
+
$wgLocalisationUpdateDirectory = "$IP/cache";
include_once( "$IP/extensions/SemanticDrilldown/SemanticDrilldown.php" );
+
  
# Maps and Semantic Maps
+
require_once "$IP/extensions/Translate/Translate.php";
include_once( "$IP/extensions/Maps/Maps.php" );
+
$wgGroupPermissions['emailconfirmed']['translate'] = true;
include_once( "$IP/extensions/SemanticMaps/SemanticMaps.php" );
+
$wgGroupPermissions['emailconfirmed']['translate-messagereview'] = true;
 +
$wgGroupPermissions['emailconfirmed']['translate-groupreview'] = true;
 +
$wgGroupPermissions['emailconfirmed']['translate-import'] = true;
 +
$wgGroupPermissions['sysop']['pagetranslation'] = true;
 +
$wgGroupPermissions['sysop']['translate-manage'] = true;
 +
$wgTranslateDocumentationLanguageCode = 'qqq';
 +
$wgExtraLanguageNames['qqq'] = 'Message documentation'; # No linguistic content. Used for documenting messages
  
# Semantic Extra Special Properties
+
require_once "$IP/extensions/UniversalLanguageSelector/UniversalLanguageSelector.php";
# More info: https://www.mediawiki.org/wiki/Extension:Semantic_Extra_Special_Properties
+
#include_once( "$IP/extensions/SemanticExtraSpecialProperties/SemanticExtraSpecialProperties.php" );
+
  
# Semantic Tasks
+
</source>
# More info: https://www.mediawiki.org/wiki/Extension:Semantic_Tasks#Installation
+
# include_once( "$IP/extensions/SemanticTasks/SemanticTasks.php" );
+
  
# Semantic Internal Objects
+
And then proceed to the following
# More info: https://www.mediawiki.org/wiki/Extension:Semantic_Internal_Objects
+
#include_once( "$IP/extensions/SemanticInternalObjects/SemanticInternalObjects.php" );
+
  
# Semantic Image Input
+
=== Update database tables ===
# More info: https://www.mediawiki.org/wiki/Extension:Semantic_Image_Input
+
==== Command line ====
#include_once( "$IP/extensions/SemanticImageInput/SemanticImageInput.php" );
+
In the directory where your LocalSettings.php is located, run the following command:
 +
php maintenance/update.php
  
# Admin Links
+
==== Web browser ====
# More info: https://www.mediawiki.org/wiki/Extension:Admin_Links#Installation
+
Go to example.com/mediawiki/mw-config/ by using your domain and path and rerun install.
include_once( "$IP/extensions/AdminLinks/AdminLinks.php" );
+
  
# Approved Revs
+
=== Configuring LocalisationUpdate ===
# More info: https://www.mediawiki.org/wiki/Extension:Approved_Revs#Installation
+
If you are on unix-like system, you should add LocalisationUpdate to crontab:
#include_once( "$IP/extensions/ApprovedRevs/ApprovedRevs.php" );
+
crontab -e
 +
# Add the following line
 +
@daily php /path/to/your/wiki/extensions/LocalisationUpdate/update.php --quiet
  
# Arrays
+
== VisualEditor ==
# More info: https://www.mediawiki.org/wiki/Extension:Arrays#Installation
+
=== Dependencies ===
include_once( "$IP/extensions/Arrays/Arrays.php" );
+
VisualEditor depends on the following extension:
 +
* UniversalLanguageSelector
 +
* Parsoid environment http://www.mediawiki.org/wiki/Parsoid/Setup
 +
To install it, do as root :
 +
gpg --keyserver keys.gnupg.net --recv-keys 5C927F7C
 +
gpg -a --export 5C927F7C | apt-key add -
 +
nano /etc/apt/sources.list file
 +
Add the parsoid repository to your /etc/apt/sources.list file
 +
deb [arch=amd64] http://parsoid.wmflabs.org:8080/deb wmf-production main
 +
To install,
 +
sudo apt-get update && sudo apt-get install parsoid
 +
nano /etc/mediawiki/parsoid/settings.js
 +
Open the config file in /etc/mediawiki/parsoid/settings.js and update it to reflect your API URL
 +
parsoidConfig.setInterwiki( 'localhost', 'http://localhost/gtwiki/api.php' );
  
# Data Transfer
+
=== Installation ===
# More info: https://www.mediawiki.org/wiki/Extension:Data_Transfer#Installation
+
the git version is for mediawiki 1.25
#include_once( "$IP/extensions/DataTransfer/DataTransfer.php" );
+
wget https://extdist.wmflabs.org/dist/extensions/VisualEditor-REL1_24-af11aa1.tar.gz
 +
tar -xzf VisualEditor-REL1_24-af11aa1.tar.gz -C /var/www/html/wiki/extensions
 +
rm VisualEditor-REL1_24-af11aa1.tar.gz
 +
Add the following lines to your wiki's LocalSettings.php after you have downloaded the extension:
 +
# VisualEditor http://www.mediawiki.org/wiki/Extension:VisualEditor
 +
require_once "$IP/extensions/VisualEditor/VisualEditor.php";
 +
// Enable by default for everybody
 +
$wgDefaultUserOptions['visualeditor-enable'] = 1;
 +
// Don't allow users to disable it
 +
$wgHiddenPrefs[] = 'visualeditor-enable';
 +
// OPTIONAL: Enable VisualEditor's experimental code features
 +
#$wgDefaultUserOptions['visualeditor-enable-experimental'] = 1;
 +
To get VisualEditor to talk to Parsoid, add the following code to your LocalSettings.php to specify your Parsoid instance:
 +
// URL to the Parsoid instance
 +
// MUST NOT end in a slash due to Parsoid bug
 +
// Use port 8142 if you use the Debian package
 +
$wgVisualEditorParsoidURL = 'http://localhost:8142';
 +
'''/!\ Restart Parsoid after install /!\'''
 +
/etc/init.d/parsoid restart
  
# External Data
+
== MwEmbed ==
# More info: https://www.mediawiki.org/wiki/Extension:External_Data#Installation
+
git clone https://github.com/kaltura/mwEmbed.git
#include_once( "$IP/extensions/ExternalData/ExternalData.php" );
+
mkdir cache
 +
chown www-data:www-data cache/
  
# Header Tabs
+
<source lang="php">
# More info: https://www.mediawiki.org/wiki/Extension:Header_Tabs#Installation
+
# MwEmbed https://github.com/kaltura/mwEmbed
include_once( "$IP/extensions/HeaderTabs/HeaderTabs.php" );
+
// Auth testing sets
 +
$wgKalturaAuthHTTPS = false;
 +
$wgKalturaAuthDomains = array( 'localhost', 'kgit.html5video.org', 'html5video.org', 'player.kaltura.com' );
 +
</source>
  
# Page Schemas
+
== MwEmbedSupport ==
# More info: https://www.mediawiki.org/wiki/Extension:Page_Schemas#Installation
+
git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/MwEmbedSupport.git
#require_once( "$IP/extensions/PageSchemas/PageSchemas.php" );
+
<source lang="php">
 +
# MwEmbedSupport https://www.mediawiki.org/wiki/Extension:MwEmbedSupport
 +
require_once "$IP/extensions/MwEmbedSupport/MwEmbedSupport.php";
 +
</source>
  
# Replace Text
 
# More info: https://www.mediawiki.org/wiki/Extension:Replace_Text#Installation
 
require_once( "$IP/extensions/ReplaceText/ReplaceText.php" );
 
  
# Widgets
+
== TimedMediaHandler ==
# Also need to do some permission setup: http://www.mediawiki.org/wiki/Extension:Widgets#Folder_permissions
+
apt-get install libav-tools ffmpeg2theora oggvideotools
# More info: https://www.mediawiki.org/wiki/Extension:Widgets#Installation
+
git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/TimedMediaHandler.git
require_once( "$IP/extensions/Widgets/Widgets.php" );
+
<source lang="php">
$wgGroupPermissions['sysop']['editwidgets'] = true;
+
# TimedMediaHandler https://www.mediawiki.org/wiki/Extension:TimedMediaHandler
 +
// TimedMediaHandler is dependent on mwEmbedSupport
 +
// TimedMediaHandler
 +
require_once( "$IP/extensions/TimedMediaHandler/TimedMediaHandler.php" );
 +
</source>
 +
This extension also requires schema changes, so run update.php after installing.
 +
cd /var/www/html/wiki
 +
php maintenance/update.php
  
note for myself : Semantic Tasks and Approved Revs seem to cause troubles (database)
+
= Skins =
 +
== Foreground ==
 +
cd /var/www/html/wiki/skins
 +
git clone https://github.com/thingles/foreground.git
 +
<source lang="php">
 +
# Foreground https://github.com/thingles/foreground
 +
require_once "$IP/skins/foreground/foreground.php";
 +
</source>
  
 +
===A quick modification to the css :===
 +
To allow the box of the different parts to behave as expected even if the contents of the boxes don't have the same length
 +
 +
https://gendersec.tacticaltech.org/wiki/index.php/MediaWiki:Common.css
 +
<source lang="php">
 +
.activities,
 +
.storytelling {
 +
clear:left;
 +
}
 
</source>
 
</source>

Latest revision as of 01:11, 20 April 2016

Installation of the wiki

Dependencies

From a freshly install debian testing 64 bits

[*] Web server
[*] SSH server
[*] Standard system utility
su
apt-get update
apt-get upgrade
apt-get install php5 phpmyadmin mysql-server php5-intl php-patchwork-utf8 imagemagick git curl

For e-mail

apt-get install php-pear
pear install mail
pear install Net_SMTP
dpkg-reconfigure exim4-config

/!\ have to check the mail config so as not to be considered as spam (headers, text of the mail ...)

Download mediawiki

wget http://releases.wikimedia.org/mediawiki/1.24/mediawiki-1.24.2.tar.gz
tar xvzf mediawiki-1.24.2.tar.gz -C /var/www/html/wiki
mv mediawiki-1.24.2 /var/www/html/wiki

Finish mediawiki configuration

open in a browser http://127.0.0.1/wiki/

and install threw this process the following extensions :

# Enabled Extensions. Most extensions are enabled by including the base extension file here
# but check specific extension documentation for more details
# The following extensions were automatically enabled:
require_once "$IP/extensions/Cite/Cite.php";
require_once "$IP/extensions/Gadgets/Gadgets.php";
require_once "$IP/extensions/ImageMap/ImageMap.php";
require_once "$IP/extensions/InputBox/InputBox.php";
require_once "$IP/extensions/Nuke/Nuke.php";
require_once "$IP/extensions/ParserFunctions/ParserFunctions.php";
require_once "$IP/extensions/Renameuser/Renameuser.php";
require_once "$IP/extensions/SpamBlacklist/SpamBlacklist.php";
require_once "$IP/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.php";
require_once "$IP/extensions/TitleBlacklist/TitleBlacklist.php";


# End of automatically generated settings.
# Add more configuration options below.

Configurations

Upload settings

allow apache to write in the upload folder

chown -R www-data:www-data /var/www/html/gtwiki/images

Modify the php.ini file

nano /etc/php5/apache2/php.ini

line 660

post_max_size = 100M

line 810

upload_max_filesize = 100M

line 1002

mail.log = syslog

Modify the Localsettings.php file

#####################################################################
# Increase Shell memory (default 100 MB)                            #
#####################################################################

$wgMaxShellMemory = 512000;
#####################################################################
# User configuration : only email confirmed users can edit & upload #
#####################################################################
# doc: http://www.mediawiki.org/wiki/Manual:User_rights_management
# Sign up for a new account
$wgGroupPermissions['*']['createaccount']=false;
# Edit once email is confirmed
$wgGroupPermissions['*']['edit']=false;
$wgGroupPermissions['*']['createpage']=false;
$wgGroupPermissions['*']['createtalk']=false;
$wgGroupPermissions['emailconfirmed']['upload'] = true; // Allow regular users to upload files
#$wgGroupPermissions['*']['upload_by_url'] = true;
$wgGroupPermissions['autoconfirmed']['upload_by_url'] = true;
$wgGroupPermissions['emailconfirmed']['edit'] = true;
require_once "$IP/extensions/ConfirmAccount/ConfirmAccount.php";
$wgMakeUserPageFromBio = false;
$wgAutoWelcomeNewUsers = false;
$wgConfirmAccountRequestFormItems = array(
       'UserName'        => array( 'enabled' => true ),
       'RealName'        => array( 'enabled' => false ),
       'Biography'       => array( 'enabled' => false, 'minWords' => 30 ),
       'AreasOfInterest' => array( 'enabled' => false ),
       'CV'              => array( 'enabled' => false ),
       'Notes'           => array( 'enabled' => true ),
       'Links'           => array( 'enabled' => false ),
       'TermsOfService'  => array( 'enabled' => false ),
);
$wgConfirmAccountContact = 'alexandra@tacticaltech.org';
$wgConfirmAccountContact = 'benjamin@labomedia.org';
#####################################################################
# Upload configuration : only some mime types are allowed           #
#####################################################################
# doc: https://www.mediawiki.org/wiki/Manual:Configuration_settings#Uploads
$wgEnableUploads = true;
$wgAllowCopyUploads = true;
$wgCopyUploadsFromSpecialUpload = true;
$wgUseImageMagick = true;
$wgImageMagickConvertCommand = "/usr/bin/convert";
$wgFileExtensions = array( 'bmp', 'doc', 'docx', 'flac', 'gif', 'ico', 'jpeg', 'jpg', 'mp3', 'mpp', 'odg', 'odp', 'ods', 'odt', 'ogg', 'pdf', 'epub', 'png', 'ppt', 'pptx', 'ps', 'rtf', 'svg$
$wgAllowJavaUploads = true; // Solves problem with Office 2007 and newer files (docx, xlsx, etc.)
$wgMimeDetectorCommand = "file -bi";
$wgVerifyMimeType = false;

Extensions

go into the extension directory

cd /var/www/html/gtwiki/extensions

MsUpload

git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/MsUpload.git
# MsUpload https://www.mediawiki.org/wiki/Extension:MsUpload
require_once "$IP/extensions/MsUpload/MsUpload.php";
$wgMSU_showAutoCat = true; // If true, files uploaded while editing a category will be added to that category
$wgMSU_checkAutoCat = true; // Whether the checkbox for the above mentioned case is checked by default
$wgMSU_imgParams = '400px'; // The default parameters for inserted images
$wgMSU_useDragDrop = true; // Should the drag & drop area be shown?
$wgMSU_useMsLinks = false; // Should we allow to insert links in the style of the Extension:MsLinks?

PdfHandler

git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/PdfHandler.git
# PdfHandler https://www.mediawiki.org/wiki/Extension:PdfHandler
require_once "$IP/extensions/PdfHandler/PdfHandler.php";
$wgPdfProcessor = '/usr/bin/gs'; 
$wgPdfPostProcessor = $wgImageMagickConvertCommand; // if defined via ImageMagick
// $wgPdfPostProcessor = '/usr/bin/convert';  // if not defined via ImageMagick
$wgPdfInfo = '/usr/bin/pdfinfo'; 
$wgPdftoText = '/usr/bin/pdftotext';

Add "case 'pdf':" ligne 122 in extensions/MsUpload.js :

        if ( $.inArray( file.extension, wgFileExtensions ) !== -1 ) {
                switch( file.extension ) {
                        case 'jpg': case 'jpeg': case 'png': case 'gif': case 'bmp': case 'tif': case 'tiff': case 'pdf': // pictures

ConfirmEdit

git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/ConfirmEdit.git
# ConfirmEdit https://www.mediawiki.org/wiki/Extension:ConfirmEdit
require_once "$IP/extensions/ConfirmEdit/ConfirmEdit.php";
require_once "$IP/extensions/ConfirmEdit/QuestyCaptcha.php";
$wgCaptchaClass = 'QuestyCaptcha';
$wgCaptchaQuestions[] = array(
  'question' => "What is the first word in the name of this wiki (lowercase) ?",
  'answer' => "gender");
$wgGroupPermissions['emailconfirmed']['skipcaptcha'] = true;
$ceAllowConfirmedEmail = true;
$wgEmailConfirmToEdit = true;

WikiEditor

for mediawiki 1.24

wget https://extdist.wmflabs.org/dist/extensions/WikiEditor-REL1_24-b13e25d.tar.gz
tar -xzf WikiEditor-REL1_24-b13e25d.tar.gz -C /var/www/html/wiki/extensions/
rm WikiEditor-REL1_24-b13e25d.tar.gz
# WikiEditor https://www.mediawiki.org/wiki/Extension:WikiEditor
require_once "$IP/extensions/WikiEditor/WikiEditor.php";
## Enables use of WikiEditor by default but still allow users to disable it in preferences
$wgDefaultUserOptions['usebetatoolbar'] = 1;
$wgDefaultUserOptions['usebetatoolbar-cgd'] = 1;
## Displays the Preview and Changes tabs
$wgDefaultUserOptions['wikieditor-preview'] = 1;
## Displays the Publish and Cancel buttons on the top right side
$wgDefaultUserOptions['wikieditor-publish'] = 1;

AdminLinks

git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/AdminLinks.git
# Admin links https://www.mediawiki.org/wiki/Extension:Admin_Links
require_once("$IP/extensions/AdminLinks/AdminLinks.php");

Replace Text

git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/ReplaceText.git
# Replace Text https://www.mediawiki.org/wiki/Extension:Replace_Text
require_once( "$IP/extensions/ReplaceText/ReplaceText.php" );

EmbedVideo

git clone https://github.com/Alexia/mediawiki-embedvideo.git
mv mediawiki-embedvideo/ /var/www/html/wiki/extensions/EmbedVideo
# EmbedVideo http://www.mediawiki.org/wiki/Extension:EmbedVideo
require_once "$IP/extensions/EmbedVideo/EmbedVideo.php";

NiceCategoryList

cd /var/www/html/wiki/extensions/
mkdir NiceCategoryList2
cd NiceCategoryList/
nano NiceCategoryList.php

paste in the file the content of : http://www.mediawiki.org/wiki/Extension:NiceCategoryList2/3.0 (! no git nor downloadable v3 file ...)

# NiceCategoryList http://www.mediawiki.org/wiki/Extension:NiceCategoryList2
include_once("$IP/extensions/NiceCategoryList/NiceCategoryList.php");

DynamicPageList

git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/intersection.git intersection
# Dynamic Page List https://www.mediawiki.org/wiki/Extension:DynamicPageList_%28Wikimedia%29
require_once("$IP/extensions/intersection/DynamicPageList.php");
# Configuration variables. Warning: These use DLP instead of DPL
# for historical reasons (pretend Dynamic list of pages)
$wgDLPmaxCategories = 6;                // Maximum number of categories to look for
$wgDLPMaxResultCount = 200;             // Maximum number of results to allow
$wgDLPAllowUnlimitedResults = false;    // Allow unlimited results
$wgDLPAllowUnlimitedCategories = false; // Allow unlimited categories
// How long to cache pages using DPL's in seconds. Default to 1 day. Set to
// false to use the normal amount of page caching (most efficient), Set to 0 to disable
// cache altogether (inefficient, but results will never be outdated)
$wgDLPMaxCacheTime = 60*60*24;          // How long to cache pages in seconds

SelectCategory

git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/SelectCategory.git
# SelectCategory https://www.mediawiki.org/wiki/Extension:SelectCategory
require_once( 'extensions/SelectCategory/SelectCategory.php' );

Collection to generate books and PDF

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

or

wget https://extdist.wmflabs.org/dist/extensions/Collection-REL1_24-f0686fd.tar.gz
tar -xzf Collection-REL1_24-f0686fd.tar.gz -C /var/www/html/wiki/extensions/
rm Collection-REL1_24-f0686fd.tar.gz
# Collection PDF https://www.mediawiki.org/wiki/Extension:Collection
require_once "$IP/extensions/Collection/Collection.php";

Install a render server to generate PDF and ODF

Collection + render server

Installation mwlib

apt-get install python-pip python-dev libxml2-dev libxslt-dev python-dev lib32z1-dev imagemagick
pip install -i http://pypi.pediapress.com/simple/ mwlib
pip install -i http://pypi.pediapress.com/simple/ mwlib.rl
pip install -i http://pypi.pediapress.com/simple/ pyfribidi

Tests

mw-zip -c :en -o test.zip Acdc Number
mw-render -c test.zip -o test.pdf -w rl
mw-render --list-writers

Fetching the content

mw-zip -c https://gendersec.tacticaltech.org/wiki/ -o completemanual.zip 'Complete manual'

Rendering

 mw-render -c completemanual.zip -o completemanual.pdf -w rl
http://mwlib.readthedocs.org/en/latest/commands.html

Running a renderserver

Semantic MediaWiki

Install

https://www.semantic-mediawiki.org/wiki/Help:Installation/Using_Composer_with_MediaWiki_1.22%2B 1. First, install composer :

curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer

2. Run the installation scriptfrom the base directory of your MediaWiki installation:

cd /var/www/html/gtwiki
composer require mediawiki/semantic-media-wiki "~2.1"

3. Run the setup script from the base directory of your MediaWiki installation:

php maintenance/update.php

4. Add a call to enableSemantics() to the end of the "LocalSettings.php" file. enableSemantics() takes in the domain name of the wiki; a wiki located at "example.org", for instance, should have the following call:

nano /var/www/html/gtwiki/LocalSettings.php
enableSemantics( 'tacticaltech.org/gtwiki' );

Update

Use these instructions to update an existing SMW installation.

  1. Backup your database and installation.
  2. Run the update script from the base directory of your MediaWiki installation:
    php composer.phar update
  3. See the page "Special:Version" on your wiki to verify that the extension was successfully updated.
  4. Run the setup script from the base directory of your MediaWiki installation:
    php maintenance/update.php
  5. Run the refresh database script from the base directory of your MediaWiki installation: This is an optional step to take to assure that the semantic store is valid and up to date.</ref>
    php extensions/SemanticMediaWiki/maintenance/SMW_refreshData.php -d 50 -v
  6. Done!

Semantic Drilldown

# Semantic Drilldown https://www.mediawiki.org/wiki/Extension:Semantic_Drilldown
include_once("$IP/extensions/SemanticDrilldown/SemanticDrilldown.php");

Semantic Forms

git clone https://git.wikimedia.org/git/mediawiki/extensions/SemanticForms.git
# Semantic Forms https://www.mediawiki.org/wiki/Extension:Semantic_Forms
include_once "$IP/extensions/SemanticForms/SemanticForms.php";

Semantic Forms Inputs

git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/SemanticFormsInputs.git
# Semantic Forms Inputs https://www.mediawiki.org/wiki/Extension:Semantic_Forms_Inputs
require_once("$IP/extensions/SemanticFormsInputs/SemanticFormsInputs.php");


Semantic Compound Queries

git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/SemanticCompoundQueries.git
# Semantic Compound Queries http://www.mediawiki.org/wiki/Extension:Semantic_Compound_Queries
require_once( "$IP/extensions/SemanticCompoundQueries/SemanticCompoundQueries.php" );

Data transfer

git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/DataTransfer.git
# Data Transfer https://www.mediawiki.org/wiki/Extension:Data_Transfer
include_once "$IP/extensions/DataTransfer/DataTransfer.php";

Maps

cd /var/www/html/wiki/
composer require mediawiki/maps "*"

it doesn't require any call in the LocalSettings.php as composer mecanism autoload it

# Maps http://www.mediawiki.org/wiki/Extension:Maps
# https://github.com/JeroenDeDauw/Maps/blob/master/docs/INSTALL.md


Semantic Maps

cd /var/www/html/wiki/
composer require mediawiki/semantic-maps "*"

it doesn't require any call in the LocalSettings.php as composer mecanism autoload it

# Semantic Maps https://www.mediawiki.org/wiki/Extension:Semantic_Maps
# https://github.com/SemanticMediaWiki/SemanticMaps/blob/master/docs/INSTALL.md

Language Bundle

https://www.mediawiki.org/wiki/MediaWiki_Language_Extension_Bundle

cd /var/www/html/wiki/extensions
for ext in Babel cldr CleanChanges LocalisationUpdate Translate UniversalLanguageSelector
do
  if [ ! -d "$ext" ]
  then
    git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/$ext.git
  fi
  cd $ext; git fetch --tags; git checkout 2015.03; cd ..
done

Modify the LocalSettings.php

# Language Bundle https://www.mediawiki.org/wiki/MediaWiki_Language_Extension_Bundle
require_once "$IP/extensions/Babel/Babel.php";

require_once "$IP/extensions/cldr/cldr.php";

require_once "$IP/extensions/CleanChanges/CleanChanges.php";
$wgCCTrailerFilter = true;
$wgCCUserFilter = false;
$wgDefaultUserOptions['usenewrc'] = 1;

require_once "$IP/extensions/LocalisationUpdate/LocalisationUpdate.php";
$wgLocalisationUpdateDirectory = "$IP/cache";

require_once "$IP/extensions/Translate/Translate.php";
$wgGroupPermissions['emailconfirmed']['translate'] = true;
$wgGroupPermissions['emailconfirmed']['translate-messagereview'] = true;
$wgGroupPermissions['emailconfirmed']['translate-groupreview'] = true;
$wgGroupPermissions['emailconfirmed']['translate-import'] = true;
$wgGroupPermissions['sysop']['pagetranslation'] = true;
$wgGroupPermissions['sysop']['translate-manage'] = true;
$wgTranslateDocumentationLanguageCode = 'qqq';
$wgExtraLanguageNames['qqq'] = 'Message documentation'; # No linguistic content. Used for documenting messages

require_once "$IP/extensions/UniversalLanguageSelector/UniversalLanguageSelector.php";

And then proceed to the following

Update database tables

Command line

In the directory where your LocalSettings.php is located, run the following command:

php maintenance/update.php

Web browser

Go to example.com/mediawiki/mw-config/ by using your domain and path and rerun install.

Configuring LocalisationUpdate

If you are on unix-like system, you should add LocalisationUpdate to crontab:

crontab -e
# Add the following line
@daily php /path/to/your/wiki/extensions/LocalisationUpdate/update.php --quiet

VisualEditor

Dependencies

VisualEditor depends on the following extension:

To install it, do as root :

gpg --keyserver keys.gnupg.net --recv-keys 5C927F7C
gpg -a --export 5C927F7C | apt-key add -
nano /etc/apt/sources.list file

Add the parsoid repository to your /etc/apt/sources.list file

deb [arch=amd64] http://parsoid.wmflabs.org:8080/deb wmf-production main

To install,

sudo apt-get update && sudo apt-get install parsoid
nano /etc/mediawiki/parsoid/settings.js

Open the config file in /etc/mediawiki/parsoid/settings.js and update it to reflect your API URL

parsoidConfig.setInterwiki( 'localhost', 'http://localhost/gtwiki/api.php' );

Installation

the git version is for mediawiki 1.25

wget https://extdist.wmflabs.org/dist/extensions/VisualEditor-REL1_24-af11aa1.tar.gz
tar -xzf VisualEditor-REL1_24-af11aa1.tar.gz -C /var/www/html/wiki/extensions
rm VisualEditor-REL1_24-af11aa1.tar.gz

Add the following lines to your wiki's LocalSettings.php after you have downloaded the extension:

# VisualEditor http://www.mediawiki.org/wiki/Extension:VisualEditor
require_once "$IP/extensions/VisualEditor/VisualEditor.php";
// Enable by default for everybody
$wgDefaultUserOptions['visualeditor-enable'] = 1;
// Don't allow users to disable it
$wgHiddenPrefs[] = 'visualeditor-enable';
// OPTIONAL: Enable VisualEditor's experimental code features
#$wgDefaultUserOptions['visualeditor-enable-experimental'] = 1;

To get VisualEditor to talk to Parsoid, add the following code to your LocalSettings.php to specify your Parsoid instance:

// URL to the Parsoid instance
// MUST NOT end in a slash due to Parsoid bug
// Use port 8142 if you use the Debian package
$wgVisualEditorParsoidURL = 'http://localhost:8142';

/!\ Restart Parsoid after install /!\

/etc/init.d/parsoid restart

MwEmbed

git clone https://github.com/kaltura/mwEmbed.git
mkdir cache
chown www-data:www-data cache/
# MwEmbed https://github.com/kaltura/mwEmbed
// Auth testing sets
$wgKalturaAuthHTTPS = false;
$wgKalturaAuthDomains = array( 'localhost', 'kgit.html5video.org', 'html5video.org', 'player.kaltura.com' );

MwEmbedSupport

git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/MwEmbedSupport.git
# MwEmbedSupport https://www.mediawiki.org/wiki/Extension:MwEmbedSupport
require_once "$IP/extensions/MwEmbedSupport/MwEmbedSupport.php";


TimedMediaHandler

apt-get install libav-tools ffmpeg2theora oggvideotools
git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/TimedMediaHandler.git
# TimedMediaHandler https://www.mediawiki.org/wiki/Extension:TimedMediaHandler
// TimedMediaHandler is dependent on mwEmbedSupport 
// TimedMediaHandler
require_once( "$IP/extensions/TimedMediaHandler/TimedMediaHandler.php" );

This extension also requires schema changes, so run update.php after installing.

cd /var/www/html/wiki
php maintenance/update.php

Skins

Foreground

cd /var/www/html/wiki/skins
git clone https://github.com/thingles/foreground.git
# Foreground https://github.com/thingles/foreground
require_once "$IP/skins/foreground/foreground.php";

A quick modification to the css :

To allow the box of the different parts to behave as expected even if the contents of the boxes don't have the same length

https://gendersec.tacticaltech.org/wiki/index.php/MediaWiki:Common.css

.activities,
.storytelling {
	clear:left;
}