MediaWiki customization

From Chris Aldrich Commonplace Wiki
Jump to navigation Jump to search


This page documents the customizations made to this MediaWiki installation.

Extensions

Added

  • CategoryTree - https://www.mediawiki.org/wiki/Extension:CategoryTree (pre-installed; enabled 2020-03-17)
  • Cite - allows for <ref> tags (pre-installed; enabled 2020-03-17)
  • AllowAnchorTags - allows inserting <a> anchor tags into wikitext (installed; enabled 2020-03-17)
    • The AllowAnchorTags extension adds <anchor>...</anchor> tags and parses them to <a href=""></a> tags.
    • The URL must be specified in the following format: <anchor url='http://someurl.com' target='_blank'>Some Text</anchor>
  • RelWebmention - add webmention endpoint to wiki pages

To add

  • raw - lets you embed raw HTML into wiki pages using raw


Enable Extensions

Add these to LocalSettings.php

wfLoadExtension('CategoryTree');
wfLoadExtension('Cite');

require_once('extensions/IndieWeb/raw.php');
require_once('extensions/IndieWeb/AllowAnchorTags.php');
require_once('extensions/IndieWeb/RelWebmention.php');

Extension Configuration

Mofify these and add to LocalSettings.php

$wgPingbackEndpoint = 'https://webmention.io/indiewebcamp/xmlrpc';
$wgWebmentionEndpoint = 'https://webmention.io/indiewebcamp/webmention';

Editable Customizations

See MediaWiki:Common.css for custom CSS used on this wiki.


Copyright

$wgEnableCreativeCommonsRdf = true;
$wgRightsPage = "Wiki:Copyright"; # Set to the title of a wiki page that describes your license/copyright
$wgRightsUrl = "http://creativecommons.org/licenses/by-nc-sa/4.0/";
$wgRightsText = "Attribution-NonCommercial-ShareAlike 4.0 International";
$wgRightsIcon = "https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png";


File uploads

$wgEnableUploads = true;
$wgFileExtensions[] = 'pdf';
$wgFileExtensions[] = 'txt';
$wgFileExtensions[] = 'svg';


Others

$wgAllowImageTag = true;
$wgNoFollowLinks = false;
$wgAllowExternalImages = true;


To Do

Some potential pieces to include for Microformats:

skin

We use the default Vector skin for the wiki, with some minor customization to add Microformats markup to pages.

In skins/Vector/VectorTemplate.php, make the changes described on https://aaronparecki.com/2018/01/14/3/


See Also