Manual:Guide to setting up interwiki linking

'''Q: I'm puzzled about doing Interwiki links, the Interwiki.php is obsoleted... how do you set up interwiki links?'''

A: Before we can answer that, we must ask another question: do you need language links or just external interwiki links?

To set up new interwiki link prefixes, you stick them into the 'interwiki' table in the database (which is undocumented... the source code is the documentation). iw_prefix iw_url  	                iw_local fr 	  http://fr.yourdomain.tld/$1 	1
 * Sample sql in the maintenance dir. Basically:
 * maintenance/interwiki.sql defines the standard prefixes
 * maintenance/wikipedia-interwiki.sql has the wikipedia language prefixes
 * set the magic global on then, and mark the local prefixes as local in the db
 * $wgInterwikiMagic = true; # Treat language links as magic connectors, not inline links
 * default is true
 * The 'iw_local' field in the interwiki table is currently only used for the redirect feature. Inline or 'other langues' box is determined by whether the prefix is in the array of language codes/names defined in the language file ($wgLanguageNames).

Next page: Custom skins >