Jump to content

Extension:Realnames

From mediawiki.org
Revision as of 15:38, 11 March 2019 by Ofbeaton (talk | contribs) (new release)
MediaWiki extensions manual
Realnames
Release status: beta
Implementation Parser extension
Description Displays a user's real name everywhere
Author(s) ofbeatontalk
Latest version 0.6.2 (2019-03-11)
MediaWiki 1.7.0+
PHP 5.3+
Database changes No
License BSD 2-clause "Simplified" License
Download
Release notes
Quarterly downloads 24 (Ranked 110th)

This mediawiki extension attempts to add realname to all username links.

Modifies a page's html content right before display to keep the approach generic and simple. This means it works for most links and does not need special consideration with new hooks. Compatibility with other extensions should be very strong.

This means it works on:

While the focus is on realname display, it can customized to change the display of username links to anything desired (add an image? another class?). This can be incredibly powerful.

It was developed mainly for Enterprise/Corporate users of MediaWiki where realnames are much more important, and often make much more sense than the usual algorithmically chosen usernames.

The default configuration prioritises realnames first with the username in parenthesis. Since usernames are still needed for wiki links, wiki actions,  and realnames can sometimes collide; displaying both is recommended. This is optional, see the configuration options bellow.

There is currently no way to preserve User: prefixes on links or text.

Download instructions

You can download the extension directly from github:

You can consult the CHANGELOG for version history.

Installation

To install this extension, add the following to LocalSettings.php:

wfLoadExtension( 'Realnames' );
#add optional configuration parameters here

or before mediawiki 1.25 instead do:

include_once("$IP/extensions/Realnames/Realnames.php");
#add optional configuration parameters here

Configuration parameters

See AdvancedConfiguration for finer control, including custom styles.

Parameter Values Example Description
$wgRealnamesLinkStyle
  • "standard"
  • "append"
  • "replace"
  • "reverse"
  • "dash"
  • "dash-reverse"
  • "paren-append"
  • "paren-reverse"
mw305

mw305 [Martha Stewart]
Martha Stewart
Martha Stewart [mw305]
mw305 – Martha Stewart
Martha Stewart – mw305
mw305 (Martha Stewart)
Martha Stewart (mw305)

Provided for convenience, this is the default MediaWiki behavior







Default

Testing

  • MediaWiki 1.32.0, 1.31.1 (LTS), 1.18.0, 1.17.1, 1.16.5, 1.15.5,

See also

Alternative extensions