Re: [Wikitech-l] Ifexists across wikis

2015-12-07 Thread Stas Malyshev
Hi! > I don't think there is a way to get a database name from an interwiki > prefix. Not a good/easy way, AFAIK. I've looked into it recently and the way current code does it is with a lot of ad-hoc stuff, external configs, hard-coded configs and special cases. I think this ticket:

Re: [Wikitech-l] Ifexists across wikis

2015-12-07 Thread MZMcBride
Bartosz Dziewoński wrote: >It's also why #ifexist is expensive: it needs a separate database query >for each time it's used, to check for a single page, because it's >impossible to determine the list of pages to check in advance. I'm not sure I understand the impossibility here. When the

Re: [Wikitech-l] Ifexists across wikis

2015-12-07 Thread Federico Leva (Nemo)
Italian projects would also like such a feature, especially for (semi)automatic creation of interproject links. https://it.wikipedia.org/wiki/Discussioni_template:Interprogetto#Interprogetto_a_wikt:_quando_metterlo.3F (By the way, the lack of Wiktionary on Wikidata even for interwiki links is

[Wikitech-l] Ifexists across wikis

2015-12-06 Thread Lars Aronsson
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

Re: [Wikitech-l] Ifexists across wikis

2015-12-06 Thread Alex Monk
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

Re: [Wikitech-l] Ifexists across wikis

2015-12-06 Thread Florian Schmidt
uot; <kren...@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

Re: [Wikitech-l] Ifexists across wikis

2015-12-06 Thread Bartosz Dziewoński
On 2015-12-06 17:26, Lars Aronsson 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

Re: [Wikitech-l] Ifexists across wikis

2015-12-06 Thread Purodha Blissenbach
How about using the API on the targe side? Purodha On 06.12.2015 18:04, Alex Monk wrote: 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

Re: [Wikitech-l] Ifexists across wikis

2015-12-06 Thread John Erling Blad
Use Q-ids and get the links from Wikidata. On Sun, Dec 6, 2015 at 10:49 PM, Purodha Blissenbach < puro...@blissenbach.org> wrote: > How about using the API on the targe side? > Purodha > > > On 06.12.2015 18:04, Alex Monk wrote: > >> I don't think there is a way to get a database name from an

Re: [Wikitech-l] Ifexists across wikis

2015-12-06 Thread Tim Starling
On 07/12/15 06:29, Bartosz Dziewoński wrote: > To add to what Alex and Florian said, the simple database lookup to > check page existence is not actually that simple. When parsing a page, > the query to determine link color (and to mark links to non-existent, > redirect or disambig pages) is done