Thread:Project:Support desk/Segregated external links/reply (6)

I'm not going to pretend to understand all of what you did here yet, but if you don't mind, let me offer what I believe happened and maybe I can build from there.

First, you declare the variable $wgExternalLinkTarget and assign it a string value of '_blank'. I'm assuming this is a global variable used to default any external urls into a page of their own.

Next, whenever an external link is selected, the LinkerMakeExternalLink hook calls the function wfMakeSomeLinksNewWindow and tests the link to see if it begins with the string 'http://theantiquegique.com'. If it does, the target attribute of the link is assigned the value '_self'. If it returns false, the function is void and the external link opens in it's own window (the default).

Am I even close?