proga:LMW - Managing: Difference between revisions

From Lojban
Jump to navigation Jump to search
Line 14: Line 14:
#:<code>chgrp -R apache /home/gleki/public_html/mediawiki-1.19.2/ ; chmod -R g+rwX /home/gleki/public_html/mediawiki-1.19.2/</code>
#:<code>chgrp -R apache /home/gleki/public_html/mediawiki-1.19.2/ ; chmod -R g+rwX /home/gleki/public_html/mediawiki-1.19.2/</code>
#:replacing the paths acording to where you are moving LMW to.
#:replacing the paths acording to where you are moving LMW to.
===Make LMW faster===
*http://techwelkin.com/slow-mediawiki-enhance-apache-webservers-performance
=== Update extensions ===
=== Update extensions ===
once in a while. Ensure you are in /extensions folder of the root of your MediaWiki deployment directory.
once in a while. Ensure you are in /extensions folder of the root of your MediaWiki deployment directory.

Revision as of 13:54, 13 October 2014

Managing LMW. What extensions to patch

If you are in charge of LMW you should do the following:

  1. Open LMW once in a while to see if there are new requests from users for being registered. ConfirmAccount extension might be installed requiring every new user to fill in a short bio about them. So you have to manually let users in. Don't disable this feature otherwise spambots or vandals might come in. Don't use captcha as it has been cracked by vicarious.com.
  2. Update LMW once in a while by running in the root of LMW folder
    cd extensions
    and then:
    cd .. ; git checkout master ; git pull ; cd extensions
    and
    php ../maintenance/update.php
    to update all mysql tables.
    In case of fresh install run
    cd .. ; git clone https://gerrit.wikimedia.org/r/p/mediawiki/core.git ; cd extensions
    and then
    chgrp -R apache /home/gleki/public_html/mediawiki-1.19.2/ ; chmod -R g+rwX /home/gleki/public_html/mediawiki-1.19.2/
    replacing the paths acording to where you are moving LMW to.

Make LMW faster

Update extensions

once in a while. Ensure you are in /extensions folder of the root of your MediaWiki deployment directory.

Note that some of extensions require manual patches.

rm -rf Babel ; rm -rf cldr ; rm -rf CleanChanges ; rm -rf LocalisationUpdate ; rm -rf Translate ; rm -rf UniversalLanguageSelector

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 2014.09; cd ..
 done
cd VisualEditor
git pull
git submodule update --init
cd ..

Scribunto

For it to work you might need to run

chmod a+x /home/gleki/public_html/mediawiki-1.19.2/extensions/Scribunto/engines/LuaStandalone/binaries/*/lua

chcon -t httpd_user_script_exec_t /home/gleki/public_html/mediawiki-1.19.2/extensions/Scribunto/engines/LuaStandalone/binaries/*/lua

Wikiforum

needs the following patch:

vim WikiForum/WikiForum.php

Then comment out the following line:

//$wgHooks['SkinTemplateToolboxEnd'][] = 'WikiForumHooks::addNavigationLinkToToolbox';

SimpleTable

As of Mediawiki 1.24alpha only SimpleTable version 1.2a (not later!) works.

http://www.mediawiki.org/wiki/Extension:SimpleTable

SocialProfile

If a user SomeName doesn't exist and when I create a page User:SomeName I can't edit it's code when SocialProfile is enabled. VisualEditor works okay, though.

But what you should do after each update of this extension is to comment out lines 133-135 of SocialProfile/UserProfile/UserProfile.php. After that, you should be able to edit the namespace like normal, and still have the ability for user profiles to appear on the user page.

Also run chmod -R 775 /home/gleki/public_html/mediawiki-1.19.2/images

UniversalLanguageSelector

This patch might damage LMW, you may apply this patch to ULS extension until it is included into the MediaWiki core. https://gerrit.wikimedia.org/r/#/c/120475/

If not done users after being registered and logged in will fall back to Lojban interface of LMW which is confusing.

Just run

cd .. ; git fetch https://gerrit.wikimedia.org/r/mediawiki/core refs/changes/75/120475/5 && git checkout FETCH_HEAD ; cd extensions

ConfirmAccount

Since the author hasn't updated the extension yet we have to use the following patch in extensions/ConfirmAccount/business/AccountRequestSubmission.php:

# Check if biography is long enough
$bioWordCount = preg_match_all("/\\p{L}[\\p{L}\\p{Mn}\\p{Pd}'\\x{2019}]*/u", $this->bio, $matches);
if ($bioWordCount < $wgAccountRequestMinWords) {