Jump to content

Extension talk:ReplaceRedLinks

Add topic
From mediawiki.org
Latest comment: 11 years ago by BartłomiejB in topic It works

It doesn't work on 1.16

That's why the extension information says: MediaWiki: 1.15.3. It is incompatible with 1.16, only compatible with 1.15.3 - TBloemink 20:14, 15 August 2011 (UTC)Reply

Extension does work on 1.16, look at the example, it's under 1.16, I tried on 1.15.3, it doesn't work as well, the developer probably made an error in the tag or something else.

It works

[edit]

It still works (I tested it with MediaWiki 1.20.4). The possible problem is, however, the regexp for replacing links. For example, if your installation of MediaWiki is accessed via eg. http://localhost/~username/w/index.php/Article_name then you should replace the line in regexp for preg_replace_callback:

(\"\/index\.php\?title\=)       # start of link

with

(\"\/~username\/w\/index\.php\?title\=)       # start of link

I would also recommend adding "s" after "http" in URL in line

return '"http://'.$this->lang.'.wikipedia.org/wiki/'.$s.'" title="'.$tt.' (Wikipedia)"';

Hope that helps. BartłomiejB (talk) 20:39, 28 April 2013 (UTC)Reply