Skip to content

Latest commit

 

History

History
111 lines (75 loc) · 3.2 KB

AdvancedConfiguration.md

File metadata and controls

111 lines (75 loc) · 3.2 KB

Back to README.md...

Control

$wgRealnamesNamespaces [>=0.2]

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 in mind this is a regular expression string, you can use regexp modifiers, but as well may need to escape some characters.

Value:

array

Example:

$wgRealnamesNamespaces[] = 'CustomUserBasedNamespace';

$wgRealnamesReplacements [>=0.1]

Allows you to turn off replacement in specific sections.

Value:

array

Example:

$wgRealnamesReplacements['title'] = TRUE;
$wgRealnamesReplacements['subtitle'] = TRUE;
$wgRealnamesReplacements['personnal'] = TRUE;
$wgRealnamesReplacements['body'] = TRUE;

$wgRealnamesSmart [>=0.3]

Allows you to turn off specific smart features

Value:

array

Example:

Key Description
$wgRealnamesSmart['same'] = TRUE; same — does not replace if username=realname

Styles

$wgRealnamesBareStyle [>=0.1]

Values Example Description
false N/A Uses same style name as $wgRealnamesLinkStyle
Default extension behaviour
"standard" mw305 Provided for convenience, this is the standard MediaWiki behavior
"replace" Martha Stewart
"append" mw305 [Martha Stewart]
"reverse" Martha Stewart [mw305]
"dash" mw305 – Martha Stewart
"dash-reverse" Martha Stewart – mw305
"paren-append" mw305 (Martha Stewart)
"paren-reverse" Martha Stewart (mw305)

$wgRealnamesBlank [>=0.1]

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.

Values:

  • TRUE
  • FALSE (default)

Output:

  • mw305 []
  • mw305

$wgRealnamesLinkStyleBlankName [>0.6]

The style to use on links when realname is blank, as long as $wgRealnamesBlank === FALSE. Default is standard.

Same value options as described for $wgRealnamesLinkStyle.

$wgRealnamesBareStyleBlankName [>0.6]

The style to use on text when username=realname, as long as $wgRealnamesBlank === FALSE. Default is false.

Same value options as described for $wgRealnamesBareStyle.

$wgRealnamesLinkStyleSameName [>0.6]

The style to use on links when username=realname, as long as $wgRealnamesSmart['same'] === TRUE. Default is standard.

Same value options as described for $wgRealnamesLinkStyle.

$wgRealnamesBareStyleSameName [>0.6]

The style to use on text when username=realname, as long as $wgRealnamesSmart['same'] === TRUE. Default is false.

Same value options as described for $wgRealnamesBareStyle.

$wgRealnamesStyles [>=0.1]

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:

  • $1 link start
  • $2 username
  • $3 real name
  • $4 link end
    Ensure to use ' quotes around your style string instead of " quotes, so that the $x do not get evaluated.

Value:

array

Example:

$wgRealnamesStyles['mystyle'] = '<span class="custom">$1$3$4</span>';

Note: HTML does not work in Bare style.

Back to README.md...