Extension:Realnames
|
Realnames Release status: beta |
|||
|---|---|---|---|
| Implementation | Parser extension | ||
| Description | Displays a user's real name everywhere | ||
| Author(s) | Olivier BeatonTalk | ||
| Last version | 0.3.1 (2011-12-25) | ||
| MediaWiki | 1.7.0 | ||
| License | BSD-2-clause, pay what you want | ||
| Download | Extension website Release notes |
||
|
|||
|
|||
|
Check usage (experimental) |
|||
Contents |
[edit] What can this extension do?
Attempts to replace any username links into realname links. This extension differs from other approaches in that it searches the page for links and replaces them, and does not rely on page hooks so should work in many more places. Compatibility with other extensions should also be very strong.
This means it works on:
- Special:ListUsers
- old and new Special:RecentChanges
- Special:Search of the User: space
- History of page
- Revisions list of page
- Revision view of page
- Revision Compare
- Page header + html title (limited)
- and any page where user links are found
While the focus of the extension is for realname display, it can be co-oped to change the display of username links to anything desired (add an image? another class?). This makes it 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 algorithmically chosen usernames.
While the defaults do a wholesale replacement of usernames with realnames, the extension can easily be configured to append realnames (or display realnames and append usernames). See the configuration options bellow.
Currently there is no way to preserve User: prefixes on links or text.
[edit] Usage
[edit] Download instructions
You can download the extension from the author's website:
You can consult the CHANGELOG for version history.
[edit] Installation
To install this extension, add the following to LocalSettings.php:
require_once("$IP/extensions/Realnames/Realnames.php"); #add configuration parameters here
[edit] Configuration parameters
For your convenience, we also support Extension:Configure for settings these from within your wiki. See the talk page FAQ for further details.
| Parameter | Values | Example | Description |
|---|---|---|---|
| $wgRealnamesLinkStyle |
|
mw305 mw305 [Martha Stewart] |
Provided for convenience, this is the default MediaWiki behavior
|
| $wgRealnamesBareStyle |
|
N/A mw305 |
Uses same style name as $wgRealnamesLinkStyle Provided for convenience, this is the standard MediaWiki behavior |
| $wgRealnamesBlank |
|
mw305 [] |
Do you want to show blank real names? This can make sense for append style but looks silly in reverse. The default false which shows a standard link instead. |
| $wgRealnamesStyles | array | ['mystyle'] = '<span class="custom">$1$3$4</span>' | Allows for the custom creation of style types that can then be assigned for link and bare' styles. Usually to add custom text. You get 4 variables in your style:
Ensure to use ' quotes around your style string instead of " quotes, so that the $x do not get evaluated. |
| $wgRealnamesReplacements | array | ['title'] = TRUE
['subtitle'] = TRUE ['personnal'] = TRUE ['body'] = TRUE |
Allows you to turn off replacement in specific sections. |
| $wgRealnamesSmart | array | ['same'] = TRUE | Allows you to turn off specific smart features
same — does not replace if username=realname |
| $wgRealnamesNamespaces | array | [] = 'CustomUserBasedNamespace'; | Allows you to add more namespaces for it to search for. Use this only if the article name is the username in a given namespace. Do not include the :, and keep it mind this is a regular expression string, you can use regexp modifiers, but as well may need to escape some characters. |
[edit] Support
It's hoped that you will enjoy the extension, and if you do, consider purchasing it as a pay-what-you-want scheme on the author's website.
If you find a bug or wish to make a feature request, you can add to or start a topic on the talk page or contact the author.
[edit] Testing
It has been tested with:
- MediaWiki svn trunk 2011-12-25, 1.18.0, 1.17.1, 1.16.5, 1.15.5
[edit] See also
- Extension:LDAP_Authentication popular import username/realnames from LDAP/AD
- Extension:Windows_NTLM_LDAP_Auto_Auth import username/realnames from LDAP/AD
[edit] Alternatives
- Extension:ShowRealUsernames appends realnames on the Special:ListUsers page only
- Extension:PageHistoryRealnames appends realnames on page history only (not revisions or compares)
- Extension:SearchRealnames appends realnames to User: namespace searches on Special:Search only