protected $code = null;
protected $level = 2;
protected $doLinks = false;
+ protected $linksPrefix = '';
protected $wikiCode = 'en';
protected $checkAll = false;
protected $output = 'plain';
$this->includeExif = !isset( $options['noexif'] );
$this->checkAll = isset( $options['all'] );
+ if ( isset( $options['prefix'] ) ) {
+ $this->linksPrefix = $options['prefix'];
+ }
+
if ( isset( $options['wikilang'] ) ) {
$this->wikiCode = $options['wikilang'];
}
* help: Show this help.
* level: Show the following display level (default: 2).
* links: Link the message values (default off).
+ * prefix: prefix to add to links.
* wikilang: For the links, what is the content language of the wiki to display the output in (default en).
* whitelist: Do only the following checks (form: code,code).
* blacklist: Don't do the following checks (form: code,code).
if ( $this->doLinks ) {
$displayKey = ucfirst( $key );
if ( $code == $this->wikiCode ) {
- return "[[MediaWiki:$displayKey|$key]]";
+ return "[[{$this->linksPrefix}MediaWiki:$displayKey|$key]]";
} else {
- return "[[MediaWiki:$displayKey/$code|$key]]";
+ return "[[{$this->linksPrefix}MediaWiki:$displayKey/$code|$key]]";
}
} else {
return $key;