Media Wiki Install Details
Jump to navigation
Jump to search
Configuring pretty urls
By Default the links look like
http://ejpdocs.cuforrent.com/index.php?title=Install_Windows_Multipoint
But they would read better as:
http://ejpdocs.cuforrent.com/wiki/Install_Windows_Multipoint
So I did (in what file(s)?)
.htaccess:
RewriteEngine On
RewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/index.php [L]
LocalSettings.php: $wgScriptPath = ""; $wgArticlePath = "/wiki/$1"; $wgUsePathInfo = true;
Enabling image uploads
# Enable uploads $wgEnableUploads = true; # Allow users to supply URL of file to import $wgAllowCopyUploads = true. # allow any file type, user may get a warning $wgStrictFileExtensions = false;
Problem with thumbnail conversions
# convert is running fine, and debug output even shows the # BLOB that gets inserted into the database, but still not working. # Switch to using PHP built-in for thumbnailing. May limt file formats $wgUseImageMagick = false;
# Add Debug block in html output #$wgDebugComments = true;
Installing Collections Extension
cd extensions git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Collection.git
LocalSettings.php:
require_once("$IP/extensions/Collection/Collection.php");
$wgCollectionFormats = array(
'rl' => 'PDF', # enabled by default
'odf' => 'ODT',
'docbook' => 'DocBook XML',
'epub' => 'e-book (EPUB)',
'zim' => 'Kiwix (OpenZIM)',
);
#Bug in Collctions when wiki is at root of site:
[~/ejpdocs.cuforrent.com/extensions/Collection]
cuforrent@henry [48] $ git diff
diff --git a/Collection.body.php b/Collection.body.php
index db6b037..56e078a 100644
--- a/Collection.body.php
+++ b/Collection.body.php
@@ -1062,7 +1062,7 @@ class SpecialCollection extends SpecialPage {
$response = self::mwServeCommand( 'render', array(
'metabook' => $this->buildJSONCollection( $collection ),
- 'base_url' => wfExpandUrl( $wgScriptPath, PROTO_CURRENT ),
+ 'base_url' => "http://ejpdocs.cuforrent.com/",#wfExpandUrl( $wgScriptPath, PROTO_CURRENT ),
'script_extension' => $wgScriptExtension,
'template_blacklist' => $this->msg( 'coll-template_blacklist_title' )->inContentLanguage()->plain(),
'template_exclusion_category' => $this->msg( 'coll-exclusion_category_title' )->inContentLanguage()->plain(),
@@ -1097,7 +1097,7 @@ class SpecialCollection extends SpecialPage {
$response = self::mwServeCommand( 'render', array(
'collection_id' => $collectionID,
- 'base_url' => wfExpandUrl( $wgScriptPath, PROTO_CURRENT ),
+ 'base_url' => "http://ejpdocs.cuforrent.com/",#wfExpandUrl( $wgScriptPath, PROTO_CURRENT ),
'script_extension' => $wgScriptExtension,
'template_blacklist' => $this->msg( 'coll-template_blacklist_title' )->inContentLanguage()->plain(),
'template_exclusion_category' => $this->msg( 'coll-exclusion_category_title' )->inContentLanguage()->plain(),
@@ -1289,7 +1289,7 @@ class SpecialCollection extends SpecialPage {
$response = self::mwServeCommand( 'zip_post', array(
'metabook' => $this->buildJSONCollection( $collection ),
- 'base_url' => wfExpandUrl( $wgScriptPath, PROTO_CURRENT ),
+ 'base_url' => "http://ejpdocs.cuforrent.com/",#wfExpandUrl( $wgScriptPath, PROTO_CURRENT ),
'script_extension' => $wgScriptExtension,
'template_blacklist' => $this->msg( 'coll-template_blacklist_title' )->inContentLanguage()->plain(),
'template_exclusion_category' => $this->msg( 'coll-exclusion_category_title' )->inContentLanguage()->plain(),
Installing multiplte upload plugin
http://www.mediawiki.org/wiki/Extension:MsUpload#Installation
This extensions makes it easier t upload and insert multiple images at a time. You can just drag and drop them on the the edit page, which is a much faster workflow than the traditional approach.
$ cd extensions # 9.2 becuase we are using mediawiki 1.19 $ wget http://www.ratin.de/wiki_ext/MsUpload_9.2.zip $ uznip MsUpload_9.2.zip
Then edit LocalSettings to include it:
vim ../LocalSettings.php
##Start --------------------------------------- MsUpload
$wgMSU_ShowAutoKat = false; #autocategorisation
$wgMSU_CheckedAutoKat = false; #checkbox: checked = true/false
$wgMSU_debug = false;
$wgMSU_ImgParams = '400px'; //default max-size for image insert
require_once("$IP/extensions/MsUpload/msupload.php");
##End --------------------------------------- MsUpload
Cite plugin
The Cite Plugin[1] is what lets you put footnotes in wikipedia.
$ cd extensions $ curl https://nodeload.github.com/wikimedia/mediawiki-extensions-Cite/legacy.tar.gz/REL1_19 -o cite_mw1_19.tar.gz $ tar -xzvf cite_mw1_19.tar.gz $ mv wikimedia-mediawiki-extensions-Cite-ab01085/ Cite $ vim ../LocalSettings.php
require_once("$IP/extensions/Cite/Cite.php");