Installation

From Fancyclopedia 3
Revision as of 10:39, 29 October 2019 by John (talk | contribs) (Created page with "Visit https://www.mediawiki.org/wiki/Download and download latest version tar xzf mediawiki-1.33.1.tar.gz mv mediawiki-1.33.1 wiki2.fancy-test.com cd wiki2.fancy-test.com...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Visit https://www.mediawiki.org/wiki/Download and download latest version

tar xzf mediawiki-1.33.1.tar.gz
mv mediawiki-1.33.1 wiki2.fancy-test.com
cd wiki2.fancy-test.com

Login to Dreamhost, visit Domains/Manage Domains/Add Hosting to Domain/Subdomain

add new subdomain of fancy-test.com called wiki2.fancy-test.com Select remove WWW Use user johnbray Directory /home/johnbray/wiki2.fancy-test.com Default other options

Wait a few hours for DNS propagation, until dns lookup works

login as johnbray@elgin.dreamhost.com

rm -rf wiki2.fancy-test.com
tar xzf mediawiki-1.33.1.tar.gz
mv mediawiki-1.33.1 wiki2.fancy-test.com

Visit More/MySQL databases, add new hostname mysql (under dropdown wiki2.fancy-test.com), create database fancytestwiki2, using hostname mysql.wiki2.fancy-test.com, first user fancytestwiki2 password wiki2!!!

Edit database from https://west1-phpmyadmin.dreamhost.com/?hostname=mysql.wiki2.fancy-test.com


Visit http://wiki2.fancy-test.com/ and click on 'set up wiki'. English language, Continue,

database type: Mysql
database host: mysql.wiki2.fancy-test.com
database name: fancytestwiki2
table prefix: <none>
user name: fancytestwiki2
password: wiki2!!!

Continue

Storage engine: InnoDB

Continue

Name of wiki: Fancyclopedia 3
Project Namespace: same
user: mlo
password: <any 10 chars>
Email: mlo@baskerville.org
Share: No
I'm bored

Continue Continue Continue Save LocalSettings.php, scp it to dreamhost in~johnbray/wiki2.fancy-test.com/LocalSettings.php


vi LocalSettings.php

add after php line

# JRB debugging
# error_reporting( -1 );
# ini_set( 'display_errors', 1 );

After line $wgScriptPath = ""; add

# JRB URL shortening advice from https://shorturls.redwerks.org
$wgScriptExtension = ".php";
$wgArticlePath = "/$1";
$wgUsePathInfo = true;

Change Logo, using a logo designed according to https://www.mediawiki.org/wiki/Manual:$wgLogo, and placed in wiki2.fancy-test.com

$wgLogo = "$wgResourceBasePath/fancyclopedia_logo.jpg";

add after 'Add more configuration options below.'


####################################################################

# Require that a user be registered before they can edit.
$wgGroupPermissions['*']['edit'] = false;

# allow users to define their own css and js
$wgAllowUserCss  = true;
$wgAllowUserJs  = true;

# Allow image uploads
$wgEnableUploads = true;

# Allow external images
$wgAllowExternalImages = true;

wfLoadExtension( 'WikiCategoryTagCloud' );

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

wfLoadExtension( 'CategoryTagSorter' );

wfLoadExtension( 'ParserFunctions' );

wfLoadExtension( 'Iframe' );
$wgIframe['server']['fanac'] = [ 'scheme' => 'http', 'domain' => 'fanac.fancy-test.com' ];
$wgIframe['delay'] = -1;

# WYSISYG editor
#Default user options:
$wgDefaultUserOptions['riched_disable']               = false;
$wgDefaultUserOptions['riched_start_disabled']        = false;
$wgDefaultUserOptions['riched_use_toggle']            = true;
$wgDefaultUserOptions['riched_use_popup']             = false;
$wgDefaultUserOptions['riched_toggle_remember_state'] = true;
$wgDefaultUserOptions['riched_link_paste_text']       = true;

//MW>=1.25 and versions of WYSIWYG >= "1.5.6_0 [B551+02.07.2016]" has dependency
//to module of WikiEditor so it must be enabled too (or otherwise file
//extension.json has to be edited manually to remove dependency)
wfLoadExtension( 'WikiEditor' );

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

# Allow any display title for {{DISPLAYTITLE:new title}}
$wgRestrictDisplayTitle = false;

# Citation footnotes
wfLoadExtension( 'Cite' );

# Fix double redirects after page move
$wgFixDoubleRedirects = true;

# List unused redirects
wfLoadExtension( 'UnusedRedirects' );

# Interwiki table editing
require_once "$IP/extensions/Interwiki/Interwiki.php";
$wgGroupPermissions['sysop']['interwiki'] = true;

wfLoadExtension( 'DisplayTitle' );

# Allow for string parser functions
$wgPFEnableStringFunctions = true;

# Allow CategoryFunctions - locks up site so disable
#require_once "$IP/extensions/CategoryFunctions/CategoryFunctions.php";

wfLoadExtension( 'PageInCat' );

# Prevent new user registrations except by sysops
$wgGroupPermissions['*']['createaccount'] = false;

# 404 page handler
#require_once "$IP/extensions/Special404/Special404.php";

# Missed pages stats
wfLoadExtension( 'MissedPages' );

# Debugging

#$wgShowSQLErrors = true;
#$wgShowDBErrorBacktrace = true;
#$wgDebugDumpSql = true;
#$wgShowExceptionDetails=true;
#$wgDebugToolbar=true;
#$wgShowDebug =true;
#$wgDevelopmentWarnings=true;


cd extensions
tar xzf CategoryTagSorter-REL1_31-fc510d6.tar.gz
tar xzf DisplayTitle-REL1_31-b216925.tar.gz 
tar xzf DynamicPageList-REL1_32-c9a720e.tar.gz
tar xzf PageInCat-REL1_32-dcdb4ec.tar.gz
tar xzf MissedPages-master-5eba5e4.tar.gz
tar xzf Special404-REL1_33-7ba246d.tar.gz
tar xzf UnusedRedirects-REL1_31-1e1cb99.tar.gz
tar xzf WikiCategoryTagCloud-REL1_31-8bc4678.tar.gz
svn co https://github.com/sigbertklinke/Iframe.git/trunk Iframe
mkdir SimpleTable
vi SimpleTable/SimpleTable.php and add content from
https://www.mediawiki.org/wiki/Extension:SimpleTable/1.2a
vi SimpleTable/SimpleTable.php
add to private $separators
'barbar' => '/\|\|`/',
Change public function hooktab to have
$sep = 'barbar';


vi Special404/i18n/en.json
and change 

"special404-body": "The URL you requested was not found. Perhaps because you are using a Wikidot URL that is not valid with mediawiki. Try replacing - with spaces, and putting capitals on second and subsequent words. More advice on The main page"

vi DisplayTitle/includes/DisplayTitleHooks.php
and edit private static function getDisplayTitle to have
               if ( !is_null( $redirectTarget ) ) {
                       $redirect = true;
                       /* JRB we don't want this for redirects
                       $title = $redirectTarget;
                       */