Extension talk:InterwikiMap

From mediawiki.org
Latest comment: 11 years ago by Leucosticte in topic Comments on v1.0.4

Name[edit]

-Prefixes is quite redundant and doesn't clarify how this differs from Extension:Interwiki. Maybe InterwikiMap (as m:IWM)? Or StandardInterwiki(Map)?. Just ideas, Nemo 22:44, 16 November 2012 (UTC)Reply

InterwikiMap sounds pretty good. Leucosticte (talk) 23:23, 16 November 2012 (UTC)Reply

TODO[edit]

  • Address the problem of new interwiki links covering existing articles (e.g. Commandos: interwiki link covering the article Commandos: Behind Enemy Lines).
  • Address the problem of caches not being cleared when interwiki links are added, modified, etc.
  • Create an API module ApiQuerySiteinfoEnhanced, inheriting ApiQuerySiteinfo, that has an siprop=interwikimapenhanced option that can provide more info than the regular siprop=interwikimap. iw_wikiname and iw_wikistatus should be added to the interwiki table, and that info should be provided by that module. Also, InterwikiMap should be enhanced so that it can filter by status, e.g. by excluding spammed or needslove wikis.
  • What about other fields, such as wikifactor, page edits, number of pages, number of content pages, etc.? If there's going to be all that stuff, maybe it's just as well to create a new table.
  • Yes Done Don't allow an interwiki link to be added that conflicts with a namespace.
  • Add an enhanced siprop=general module that provides data on wikinode and so on. Question: Where to store this data? Maybe in another MediaWiki page. Perhaps it's time to store data in a more flexible format, such as name=..., url=..., which will lend itself more to expansion, revision, etc. Sort of like the template format.
  • Will it be necessary at some point to use an iwm-continue? Most API modules limit the user to 500 or 5000 items. But this will have 20,000+ items.
  • What about limitations on page size? A 20,000-wiki list exceeds the limits of Manual:$wgMaxArticleSize.

FIXME[edit]

  • Fixed: Forwarding and transclusion need to be added to the whitelist.
  • Fixed: Forwarding and transclusion need to be added to the MediaWiki:InterwikiMapBackup, or else that data will be lost when items are deleted from the interwiki table (aside from the fact that it'll still be in the Special:Log/interwiki).
  • Fixed: The whitelist should not add -: or }: to the interwiki table.
  • Fixed: The whitelist should not add anything to the interwiki table that doesn't have an associated URL.

Extension:InterwikiMap/Data[edit]

I have created Extension:InterwikiMap/Data to brainstorm ideas on what other wiki data should be propagated and retrieved by this extension. Leucosticte (talk) 18:18, 20 November 2012 (UTC)Reply

Rookie needs guidance[edit]

Having a couple issues

1). In localsettings.php config's replaced:

$wgInterwikiMapRemoteWikiUrls = array (
        'https://meta.wikipedia.org/w/api.php',
        'http://meta.inclumedia.org/w/api.php'
);

to my projects two main wiki's (can live with just the first one)

$wgInterwikiMapRemoteWikiUrls = array (
        'http://www.everythingfoodanddrink.org/w/api.php',
        'http://mywiki.everythingfoodanddrink.org/w/api.php',
);

Interwiki table was updated to (default) http://meta.wikimedia.org/wiki/Special:Interwiki, so I suspect my URL's are incorrect.

2). Also have this set in localsettings.php

$wgRestrictionLevels = array( '', 'autoconfirmed', 'sysop', 'interwikiwriters', 'bureaucrat' );
$wgGroupPermissions['interwikiwriters']['interwikiwriters']   = true;
$wgGroupPermissions['bureaucrat']['interwikiwriters']         = true;

in an attempt to protect MediaWiki:InterwikiMapBackup but no protect option on that page, again I suspect I'm missing something obvious to non-rookies.

Thank you in advance for any help. Mlpearc (powwow) 05:18, 22 November 2012 (UTC)Reply

Did you put the $wgInterwikiMapRemoteWikiUrls configuration setting after the require_once line? There was a mistake in the documentation; apparently you can't change page protection on MediaWiki: pages because the software already won't let anyone but sysops edit them. So, you can either leave it in the MediaWiki: namespace and allow sysops to edit it (which you can deter using an edit notice) or you can change its location to somewhere outside MediaWiki: space and then protect it at whatever level you wish.
FYI, this extension is still under development so will probably be going through some major revisions in coming days and weeks. Leucosticte (talk) 06:27, 22 November 2012 (UTC)Reply
Thank you Leucosticte, I will make the necessary changes to my localsettings.php file. Yes I realize the status of the extension, I look forward to any updates and changes also. I have Extension:InterwikiMap/Data on my watch and I plan to configure this through out my project (once I get a couple things nailed down). Thank you again for your help it is greatly appreciated. Mlpearc (powwow) 04:22, 23 November 2012 (UTC)Reply

A 20,000-wiki list[edit]

This extension works okay when you're dealing with a 700-wiki list like meta's, but what about when you have a 20,000-wiki list? Then it's too large for one wiki page (e.g. MediaWiki:Interwiki-whitelist]] or MediaWiki:MediaWiki:InterwikiMapBackup‎. Also, 20,000 items is a lot to retrieve by one API query; usually the API is limited to 500 or 5,000 items, to avoid timeouts. Solutions:

  • Split the whitelist and backup pages by letter of the alphabet, e.g. MediaWiki:Interwiki-whitelist/A for all wikis whose prefixes start with A. So, there would be 27 subpages (all 26 letters of the alphabet, plus an "Other" subpage for everything else (symbols, numbers, non-English alphabet characters, etc.) Updating the interwiki list will involve 27 separate API requests, and so the update will be done one letter of the alphabet at a time to avoid timeouts. There will be separate timestamps recorded for when each letter was updated. There will be an interwiki-continue feature in the API as well, or (preferably) a way to query it by letter of the alphabet. This sounds like a pain in the neck in many ways, though. Another option is to use a bot to push the data, rather than having each wiki pull it.

Question: How much demand is there for a 20,000-wiki interwiki map, encompassing all the non-dead wikis listed at WikiIndex? I just thought it would be cool if, whenever I went to a wiki that had InterwikiMap installed, I could be confident that I could post a talk page comment linking to, say, miseswiki:economics and know that it would link there properly. The implementation idea listed above could get a bit awkward, though. Does anyone have a better plan? Leucosticte (talk) 00:41, 26 November 2012 (UTC)Reply

Comments on v1.0.4[edit]

v1.0.4 adds support for iw_local (forward), iw_trans (transclude), iw_api (API URL), and iw_wikiid (wiki ID). There are a few problems with this. One is that now we have a whitelist format like this:

| wikipedia || https://en.wikipedia.org/wiki/$1 || 1 || 1 || https://en.wikipedia.org/w/api.php || enwiki

The whole idea with the previous setup was that your MediaWiki:InterwikiMapBackup could become someone else's MediaWiki:Interwiki-whitelist. Well, this will still allow for that, except that you'll need to get rid of those forward and transclude values if you don't like them. An alternative format would have been something like:

| prefix=wikipedia || url=https://en.wikipedia.org/wiki/$1 || iw_local=1 || iw_trans=1 || iw_api=https://en.wikipedia.org/w/api.php || iw_wikiid=enwiki

Leucosticte (talk) 09:09, 28 November 2012 (UTC)Reply