From 7296773a50efd58a17e9b7874ffcf86550dc5ac6 Mon Sep 17 00:00:00 2001 From: conradschulz Date: Thu, 6 May 2021 12:41:03 +0200 Subject: [PATCH] Updated wiki with some cool extensions as Math formulas Music Notes and Maps but maps does not work jet. Music has some issues too. --- dockerfile | 7 +++++ example.LocalSettings.php | 58 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 64 insertions(+), 1 deletion(-) diff --git a/dockerfile b/dockerfile index 940943e..8a2422a 100644 --- a/dockerfile +++ b/dockerfile @@ -14,5 +14,12 @@ RUN apt install -y imagemagick RUN apt install -y ffmpeg +# Install Dependencies for Maps support + +#RUN curl https://getcomposer.org/composer-2.phar > composer.phar && mv composer.phar /usr/local/bin/composer && chmod +x /usr/local/bin/composer +#RUN cd /var/www/html && COMPOSER=composer.local.json composer require --no-update mediawiki/maps:~8.0 +#RUN composer update +#RUN cd /var/www/html && composer update mediawiki/maps --no-dev -o -n + # Start from the webserver neccessary or not? Test from 23.04.2021 -> not needed #CMD ["apache2-foreground"] \ No newline at end of file diff --git a/example.LocalSettings.php b/example.LocalSettings.php index 85f83bc..149b196 100644 --- a/example.LocalSettings.php +++ b/example.LocalSettings.php @@ -268,4 +268,60 @@ $wgCategoryTreeSidebarRoot = 'Category:Hauptseite'; $wgCategoryTreeForceHeaders = true; # Depth of tree per TreeMode $wgCategoryTreeMaxDepth = [10 => 5, 20 => 5, 0 => 5, 100 => 5]; -$wgCategoryTreeDefaultMode = 10; \ No newline at end of file +$wgCategoryTreeDefaultMode = 10; + +# Math Formula extensions +########################## +wfLoadExtension( 'Math' ); + +# Install instructions +# run this command from wiki root maintanence e.g. /var/www/html/maintenance +# php update.php +# to update databes tables + +# Using Mathoid as a service from external Sources +# It is possible to host the server by myself but it is a way more complex installation an still in beta state as of May 2021 +// Set MathML as default rendering option +$wgDefaultUserOptions['math'] = 'mathml'; +$wgMathFullRestbaseURL = 'https://en.wikipedia.org/api/rest_'; +$wgMathMathMLUrl = 'https://mathoid-beta.wmflabs.org/'; + +# Json Extension needed for Graph extension +########################################### +wfLoadExtension( 'JsonConfig' ); + +# Adding Graph extension +######################### +wfLoadExtension( 'Graph' ); +# https://www.mediawiki.org/wiki/Extension:Graph +# My be some files are missing and Modules need to be added unter Additional config setup +# but i dont know how atm + +# Adding Maps Support +###################### +# Uncomment after installing + # Istalling with: all in wiki root html + # curl https://getcomposer.org/composer-2.phar > composer.phar + # mv composer.phar /usr/local/bin/composer + # chmod +x /usr/local/bin/composer + # COMPOSER=composer.local.json composer require --no-update mediawiki/maps:~8.0 + # composer update + # composer update mediawiki/maps --no-dev -o + # inside the wiki shell +#wfLoadExtension( 'Maps' ); +#$egMapsDefaultService = 'leaflet'; +#$egMapsDefaultGeoService = 'google'; + +# Adding Musical notation with score Notation +############################################# +wfLoadExtension( 'Score' ); +########################################## +# Some security risks check for updates +# User could execute code through it if users are trustworthy there shouldnt be a problem +########################################## + +$wgScoreTrim = true; +#$wgImageMagickConvertCommand = '/usr/bin/convert'; # already set for image upload +$wgShellRestrictionMethod = 'firejail'; +# For shell memory errors increase +#$wgMaxShellMemory = xxxx; \ No newline at end of file