Wiki Configuration Notes

From OSIS Open Source Identity Systems
Jump to: navigation, search

Extensions

CategoryTree

Source: http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/CategoryTree

LocalSettings Changes: (note, add the 1st line and then refresh a page & add the 2nd, otherwise the + - doesn't work properly)

$wgUseAjax = true;
require_once( "{$IP}/extensions/CategoryTree/CategoryTree.php" );

Parser Functions

Source: http://meta.wikimedia.org/wiki/ParserFunctions#Installation Pre-requisites: DPL Catlist template requires Simple Forms Extension (listed below)

VariablesExtension Extension

Source: http://www.mediawiki.org/wiki/Extension:VariablesExtension

  • this appears to be a prerequisite for DocTypes in DPL

StringFunctions Extension

Source: http://www.mediawiki.org/wiki/Extension:StringFunctions

  • this also appears to be a prerequisite for DocTypes in DPL (#replace: function is used in some template inherited in DT Article Header)

Dynamic Page Lists

Source: http://www.mediawiki.org/wiki/Extension:DynamicPageList

  1. Exported DocType pages from the DPL Website
    (explained here: http://semeb.com/dpldemo/index.php?title=Category:DocTypeScript)
  2. Looks like there is a css page too, not sure where to put it yet, see link above for instructions on getting the css code.
  3. DPL Installation instructions:
    http://semeb.com/dpldemo/index.php?title=DPL:Installation
  4. DocTypeScripts: Category:DocTypeScript
  5. CSS additions
    Put the following into Mediawiki:Common.css
/* color settings for article types */

#n-Manual { background-color: #ffddaa; }
#n-Source { background-color: #ccccff; }
#n-Test { background-color: #ccffcc; }
#n-Type { background-color: #dedede; }

/* Demo for a special DPL table which can be assigned via rowcolformat */

table.dpl3columns td {
  background: #f2f2f2;
  padding: 0.5em;
  border:3px;
  width:33%;
}

/* Demo for a special DPL table which is used by dplmatrix */

table.dplmatrix {
  margin: 1em 1em 1em 0;
  background: #f9f9f9;
  border: 1px #aaaaaa solid;
  border-collapse: collapse;
}
table.dplmatrix th {
  background: #f2f2f2;
  border: 1px #aaaaaa solid;
  padding: 0.5em;
  font-size: 80%;
}
table.dplmatrix td {
  text-align: center;
  border: 1px #aaaaaa solid;
  padding: 0.5em;
}


/* wikitable, sortable, and prettytable class definitions
** based on meta.wikimedia.org MediaWiki:Common.css 
*/

table.wikitable, table.sortable, table.prettytable {
  margin: 1em 1em 1em 0;
  background: #f9f9f9;
  border: 1px #aaaaaa solid;
  border-collapse: collapse;
}

table.wikitable td, table.sortable td, table.prettytable td {
  border: 1px #aaaaaa solid;
  padding: 0.2em;
}

table.wikitable th, table.sortable th, table.prettytable th {
  background: #E6E6FA; /* lavender; wikimedia: #f2f2f2 */
  border: 1px #aaaaaa solid;
  text-align: center;
}

table.wikitable caption, table.sortable caption, table.prettytable caption {
  margin-left: inherit;
  margin-right: inherit;
}

Pages on Demand

Source: http://www.mediawiki.org/wiki/Extension:PagesOnDemand

ReCAPTCHA

Source: http://recaptcha.net/plugins/mediawiki Note: this plugin requires public & private keys generated per domain by ReCAPTCHA.

OpenID

Extension Download: http://www.mediawiki.org/wiki/Extension:OpenID OpenID Library Download: http://www.openidenabled.com/php-openid/

  • Extract the OpenID plugin into extensions/OpenID
  • Create the user_openid table from the .sql file included in the OpenID directory:
mysql <dbname> -u <username> -h <hostname> -p < openid_table.sql
  • Create an includes directory within the extensions subdirectory (this is where I put it - if you want it somewhere else, just make sure that it is a place that won’t be overwritten or deleted during upgrades, and alter the path in step 6 accordingly).
mkdir extensions/includes
  • Extract php-openid-1.2.3 into the includes directory
  • Put the following lines in LocalSettings.php:
#
# — OpenID Extension
#
$path = “$IP/extensions/includes/php-openid-1.2.3″;
set_include_path(get_include_path() . PATH_SEPARATOR . $path);
# — uncomment the following line if you have no big integer math support!
define(”Auth_OpenID_NO_MATH_SUPPORT”, true);
require_once(”$IP/extensions/OpenID/OpenID.php”);

LoopFunctions

LoopFunctions allow me too loop through interops Extension: http://www.mediawiki.org/wiki/Extension:LoopFunctions require_once ( 'extensions/LoopFunctions/LoopFunctions.php' );

NukeDPL

NukeDPL allows mass deletion of queried pages Extension Download: http://www.mediawiki.org/wiki/Extension:NukeDPL require_once(”$IP/extensions/NukeDPL/NukeDPL.php”);

Templates

<categorytree mode=pages>Interop templates</categorytree>

Customizations

Short URLs

Source: http://wiki.dreamhost.com/Mediawiki#If_your_wiki_is_install_under_a_.22www..22_subdomain

Removing Main Page Title

Added Code to MediaWiki:Common.js as per the instructions at the bottom of this page: http://www.mediawiki.org/wiki/Extension:NoTitle
(Note that this extension is broken for MW 1.11, but there is a workaround listed just for the main page)

NameSpace Configuration

Currently Figured:

  • Namespace I3
  • Alias Current (points to I3)

Base Configuration

Note: $wgUploadFiles was changed to "true" and $wgHashedUploadDirectory was uncommented (and therefore set to false)

# -- Custom Namespaces
#    - add to the first array to define a new interop namespace
#    - alter the 2nd array to change the "current" interop
$wgExtraNamespaces = array(
                100 => "I3",
                101 => "I3_Discussion",
        );
$wgNamespaceAliases = array(
                'Current' => 100,
        );
$wgNamespacesToBeSearchedDefault += array(
                100               => 1,
                101               => 1
        );    
$wgFileExtensions[] += 'doc';
$wgFileExtensions[] += 'pdf';  
$wgGroupPermissions['*']['edit'] = false;

Data Import

Features are formated into template format with a set of python scripts by Dale Olds. Template files are imported using the wiki_import.sh script - each file becomes a wiki page, with the name of the file becoming the name of the page, which can be downloaded at http://xpt.sourceforge.net/tools/wiki_import/.

$ php maintenance/createAndPromote.php auto_import p
<change directory to wiki import directory>
<make sure to edit wiki_import.ini file>
osistest: Creating and promoting User:auto_import...done.
$ echo ./I3:Information_Card_Identity_Provider_Features.txt | ./wiki_import.sh -s "not used"
-- Importing txt file: './I3:Information_Card_Identity_Provider_Features.txt'...
Import Text File
<change back to mediawiki main directory>
$ php maintenance/refreshLinks.php
Refreshing links table.
Starting from page_id 1 of 2178.
100
200
300
400
...
2000
2100

Notice: Undefined index:  globals in /home/.mick/osistest/osisweb/w/maintenance/refreshLinks.php on line 27
$