Extension:Realnames/AdvancedConfiguration

From MediaWiki.org
Jump to navigation Jump to search

Control[edit]

Parameter Values Example Description
$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.
$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

Style[edit]

Parameter Values Example Description
$wgRealnamesBareStyle
  • false
  • "standard"
  • "append"
  • "replace"
  • "reverse"
  • "dash"
  • "dash-reverse"
  • "paren-append"
  • "paren-reverse"
N/A

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

Uses same style name as $wgRealnamesLinkStyle

Provided for convenience, this is the standard MediaWiki behavior






Default

$wgRealnamesBlank
  • true
  • false
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.
$wgRealnamesLinkStyleBareName same as $wgRealnamesLinkStyle The style to use on links when realname is blank, as long as $wgRealnamesBlank === FALSE. Default is standard.
$wgRealnamesBareStyleBareName same as $wgRealnamesBareStyle The style to use on text when realname is blank, as long as $wgRealnamesBlank === FALSE. Default is false.
$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:
  • $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.

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