Thanks Brion, Agreed about a wiki not knowing the structure of another wiki, however I was thinking more about a interwiki descriptor pointing to the wiki's own structure. I am focused more on $wgLocalInterwiki thanks to you, but am wondering if Wikimedia developers can see the value of expanding that facility in the direction I'm suggesting? To me, an immediate use is for the attachment of an ACL to the interwiki descriptor. This is where a change to the MW core would be involved, because any pages created with that descriptor, would need to store that descriptor. Such a page is by definition "invisible" to all unqualified requests for pages in its namespace, for instance, because those requests would not / do not specify any interwiki descrptor. Adding and filtering for a given ACL would then be trivial and performance-savvy. In effect, this approach establishes logical databases within the wiki's own physical database; might be a major step towards a federated-wiki world, with its benefits. There are alternatives of course, but they impose performance costs across the system (cf Halo ACL). -----Original Message----- From: brion.vibber@gmail.com [mailto:brion.vibber@gmail.com]On Behalf Of Brion Vibber Sent: Monday, May 16, 2011 11:50 PM To: jmcclure@hypergrove.com; Wikimedia developers Subject: Re: [Wikitech-l] Interwikis
On Mon, May 16, 2011 at 9:35 PM, John McClure jmcclure@hypergrove.com wrote:
I am wondering if interwikis can be be more powerfully leveraged.
For instance, I'd like much to say ZZZ:my_ns:my_page to indicate a page in a particular subset of pages within a namespace in my wiki. Ultiimately an ACL can be associated with each interwiki descriptor.
Interwiki links don't know the namespace structure of a foreign site's pages, so all the system knows is the interwiki prefix (eg 'wb:') and the rest (eg 'fr:Discussion:Foobar'). The target site then has the responsibility for resolving the link target (which as above might actually be yet another interwiki link pointing to a wiki in another language, which *then* resolves the actual namespace and title).
And although I haven't tested this, does anyone know if a 'local' interwiki link (one mapped to the local wiki) is *supposed to* resolve to the local wiki?
By definition yes, but you need to tell the system that by setting $wgLocalInterwiki to that prefix, or it'll still act, format, etc as a foreign interwiki link and can't detect a self-reference. (If you have multiple aliases, right now I think you can only pick one as the local form.)
-- brion