I'm not very familar with this, but wouldn't this need a bigger change in LinksUpdate? Or the question: how would a wiki know, if a page get's created after it was linked and mark it blue instead of red?
Gesendet mit meinem HTC
----- Nachricht beantworten ----- Von: "Alex Monk" krenair@gmail.com An: "Wikimedia developers" wikitech-l@lists.wikimedia.org Betreff: [Wikitech-l] Ifexists across wikis Datum: So., Dez. 6, 2015 18:04
I don't think there is a way to get a database name from an interwiki prefix.
Also, whether a page is known or not does not just depend on a simple database lookup. Extensions can add arbitrary rules about which titles should be considered known or not. EducationProgram, GlobalUserPage, and WikimediaIncubator all do this.
On 6 December 2015 at 16:26, Lars Aronsson lars@aronsson.se wrote:
If I write a [[link]] it will be blue if the page exists and red otherwise. But if I write [[:sw:link]] that will be an external or cross-wiki link, that is never red, as if it were impossible to know whether that page existed in Swahili Wikipedia.
But determining the existence of a page is just a quick database table lookup, and all databases run on WMF's servers, so it shouldn't be more expensive to look up a cross-wiki link, as long as it is one of WMF's wikis.
In Wiktionary, it is common to link to entries in foreign languages both on the local wiki and to the native wiki for that language. For example, in English Wikitionary the entry for "blue" links to the Swahili word "bluu" both on en.wiktionary and on sw.wiktionary, using the template {{t+|sw|bluu}}.
https://en.wiktionary.org/wiki/blue#Translations
But since the Afrikaans translation "blou" doesn't have an entry on the Afrikaans Wiktionary, another template is used: {{t|af|blou}}. And it is a pain to know which one of these two templates to use. If it was possible in {{#ifexists}} to determine the existence of a page in another wiki, only one template would be needed, and the bot job to change to the right template would not be needed.
#ifexist already works across namespaces (well, of course), so is there any good reason it shouldn't work across wikis?
Oddly, the documentation says #ifexist is an "expensive" parser function. That doesn't make much sense to me. It's as if red/blue links were expensive, and most of our list pages should be banned. https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions#.23ifexist
-- Lars Aronsson (lars@aronsson.se) Aronsson Datateknik - http://aronsson.se
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
_______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l