Extension:Purple MediaWiki

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manual - list
Crystal Clear action run.png
Purple MediaWiki

Release status: beta

Implementation Hook
Description Purple MediaWiki allows users to add Purple Numbers to their MediaWiki installation.
Author(s) Tejas Parikh, Viral Gupta, Peter Yim, Jonathan Cheyer, Kenneth Baclawski, Sumit Purohit
Latest version 1.6.02 (2012-03-20)
MediaWiki 1.16.0 or later
License GNU General Public License 2.0
Download Download latest release here.
ReleaseNotes
Example Project Wiki
Hooks used
OutputPageBeforeHTML

Translate the Purple MediaWiki extension if possible

Check usage and version matrix; code metrics

What can this extension do?[edit | edit source]

Purple MediaWiki (PMWX), an extension to be integrated into MediaWiki that allows fine-grained addressability to the content of wiki pages. PMWX achieves its goal of fine-grained addressability by adding identifiers called “purple numbers” at the end of content sections on each wiki page. Unlike other web pages, content on a wiki is the result of a collaboration among the users of the wiki. As a result, the content on a wiki changes more frequently than most web pages. As more and more people add content to a web page and then refer to that content, it becomes important to pinpoint the location of the data for future reference or to provide a reference to someone else. Users generally do this by bookmarking a page for future reference or by sending a link to the article. The bookmarking option in a web browser allows one to bookmark the URL, but if this URL is the page as a whole it may be difficult for a user to locate the intended content when the amount of content on the page is large.

HTML allows one to create anchors to specific points in a web document. Using these links one can link to a particular point within a web document. The idea of directly accessing the information within a web document is an important hallmark of a knowledge management system. To build a system which empowers the user to access information precisely either the web site administrator or the author of the web document must manually create appropriate anchors within every web document. PMWX was developed to eliminate the need for web page authors to create these anchors. This allows a content developer to focus on developing the content; links to different parts of the document will be created and added automatically.


Usage of Purple Numbers[edit | edit source]

The purpose of Purple Numbers is simple: to produce HTML documents that can be addressed with high resolution (also called "fine granularity"). It does this by automatically creating name anchors with hierarchical (hid's) addresses at the beginning of each node, and by displaying these addresses as links at the end of each node. With Purple Numbers in place, all one needs to do is to mouse-over a Purple number, right-mouse-click and COPY that hyperlink. One can then PASTE this hyperlink to an e-mail message, to your instant message, or to a document s/he is composing. That link will now take its reader back to exactly the same paragraph the author wanted to refer his/her reader(s) to.

System Requirements[edit | edit source]

  • MediaWiki versions:
    • 1.11.0+
    • 1.13.2+
    • 1.14.0+
    • 1.16.0
    • 1.16.5
    • 1.17.0
  • PHP version 5 (5.1 recommended)
  • A relational database server. MySQL 5.0 is recommended
    • So far PMWX has only been tested with MySQL version 4.1 , 5.0,5.1 but it should work with any version 4.0 or later.


Notes

  • PMWX is (currently) incompatible with PostgreSQL

Installation[edit | edit source]

  • Download the PMWX code and extract it into the extensions directory of wiki
  • Rename the folder as 'pmwx'
  • Add following lines in LocalSettings.php :
require_once ("$IP/extensions/pmwx/PurpleMediaWiki.php");
enablePurpleMediaWiki();

Testing your Installation[edit | edit source]

To test whether the extension was installed properly, simply open up any page on the wiki and you should see the purple numbers.

If you don't get these results, check the steps in the Installation section, then contact us (see the Contact section).

Uninstalling[edit | edit source]

  • Comment following lines in LocalSettings.php :
require_once ("$IP/extensions/pmwx/PurpleMediaWiki.php");
enablePurpleMediaWiki();
  • Remove pmwx from extensions directory.

Configuration parameters[edit | edit source]

  • Purple MediaWiki can be customized by a number of settings. To do so, open the file $WIKI/extension/pmwx/PMWX_Global.php and change the value for the variables below to suit your needs.
/**
*Flag to enable HID
*/
$pmwxEnableHID = true;
/**
* Color setting for HID and transclusion 
*/
$pmwxHidColor = '#C9A0DC'; // Wisteria
/**
 * Tags allowed in transcluded node
 */
$allowableTags = '<a><b><i><tt><math><nowiki><small><big><s><u><del><sub><sup><pre>';
/**
*Enable NLS numbering scheme for HID's
*/
$pmwxEnableNls = TRUE;
/**
 * Flag to enable transclusion
 * set to TRUE or FALSE
 */
$pmwxEnableTransclusion = TRUE;
/**
 * Global PMWX CSS style
 */  
$pmwxCSSstyle = '<style type="text/css"> .HIDStyle {
    text-decoration: none;
    font-family: Verdana, Trebuchet, Arial, Helvetica;
    font-style: normal;
    font-weight: bold;
    font-size: x-small;
}
 
.TransclusionErrorStyle {
    font-style:italics;
    font-family: Verdana, Trebuchet, Arial, Helvetica;
    font-color:red;
    font-weight: bold;
    font-size: x-small;
}
 
</style>';
/**
 * Enable logging
 */ 
$pmwxIsLoggingEnabled = FALSE;
/**
 * Log file directory
 */
$pmwxLogFile = '/tmp/pmwx.log';
/**
 * Disabled HID and Transclusion error message
 */
 $disabledErrorMsg = "Either HID or/and Transclusion has been disabled by wiki admin. Please contact your wiki admin for more information.";

Notes on Upgrading[edit | edit source]

  • Upgrading from an older version should be a simple process. Simply replace the whole "pmwx" folder with the new one. You may want to backup the PMWX_Global.php to save previous settings.

Questions & Remarks on Purple MediaWiki (PMWX) Extension?[edit | edit source]

Please subscribe to the [pmwx-forum] list:

See also[edit | edit source]