VirtualMV/Digital Learning Technologies/Extending wikis and blogs/MediaWiki

Overview
Media wiki can be extended in several ways


 * 1) Client-Side JavaScript
 * 2) Templates
 * 3) Extensions
 * 4) Widgets
 * 5) Miscellaneous Tools

The MediaWiki codebase contains various "hooks" using callback functions to add additional code in an extensible way. This allows developers to write extensions without modifying the core or having to submit their code for review. Installing an extension typically consists of adding a line to the configuration file, though in some cases additional changes such as database updates are required. Wikipedia:MediaWiki(2009)

JavaScript
Media wiki allows a special page MediaWiki:Common.js that is loaded every time a page is displayed. It is not editible by users and is created by the system admin.

JavaScript inpage
In here I'd love to include a basic javascript that demonstrates how it can be included on a web page, something like..



Reference: wikibooks:MediaWiki Developer's Handbook/Add JavaScript (2009) - really cryptic and really no help at all yet :)

However Media wiki describes an extension (Extension:Javascript, 2009, June 27) which I must try (I want to add a text size JavaScript element).

Extensions
Extensions are added by the system administrator and the functionality is then added to the wiki. As at March 2012 there were approximately 2,000 extensions and documentation for Mediawiki includes an Extension Matrix and a table describing the extensions.

Adding an extension
To add an extension usually requires that you This is then activated by adding the following into the wiki
 * Find the extension you want, (e.g. Geshi - a Syntax highlight text snippets, whole pages or whole files).
 * Read the Installation instructions which usually follows
 * Download the code (usually in a compressed archive) and decompress if necessary. This will be in a folder (e.g. SyntaxHighlight_GeSHi )
 * Upload (FTP) this folder to the Extensions Folder on your web server.
 * Add the hook into the LocalSettings.php file in the wiki folder, ( e.g. require_once( "$IP/extensions/geshi/geshi.php" ); )

Depending on the browser, the code appears in a very small font (I have modified this using a template for vMVwiki to add a box border around as well.

The cite extension
The cite extension creates a linked page that produces a variety of referencing styles for your page. An extra option is added to the toolbox (in the left panel) called cite this page. If you click on this link a page showing a variety of referencing styles is displayed for the page.

In the wiki you can have the reference appear at the bottom of the page using the tag. There is an example of implementing an APA style citation/Reference at DLT Overview, Teaching.

Templates
In wiki syntax, a template is identified by a page surrounded by curly brackets. There is a template language that allows you to build a page which you can pass variable to. Examples of template pages are:  and call it at the bottom of a wiki page using 
 * a box template to create the pedagogical boxes (called instructional Devices (iDevices) in WikiEducator ) - like activities
 * a Footer template which also generates an APA style reference is shown below:

The allows you to pass a parameter to the template, in this case "Me" (parameters are separated by a | )

Which will produce  Me (2024). . Retrieved August 28, 2024, from