PartioWiki:Interwiki
Tämä sivu on englanniksi, jotta se tukisi myös muilla kielillä toteutettuja partiowikejä.
This page is in English, so our foreign friends could use this information with their own scoutwikis.
Disclaimer
This instruction has been written only experience from PartioWiki. Check the Versions of this mediawiki. The operating system is Debian Linux.
Interwiki
Interwiki is way to link different sites without posting the actual URLs. By default Mediawiki installation comes with the interwiki table. So you should be able to link like this: meatball:InterWiki which links to http://www.usemod.com/cgi-bin/mb.pl?InterWiki
Now to add new scoutwikis to your interwiki table do this:
Copy interwiki maintenance sql-script to different name, so it will not destroy when you upgrade your mediawiki
wiki@PW:/www/wiki.partio/htdocs$ cd maintenance/
wiki@PW:/www/wiki.partio/htdocs/maintenance$ cp interwiki.sql scoutinterwiki.sql
Append new interwiki prefixes with the site URLs
scoutinterwiki.sql
should look like this:
-- Based more or less on the public interwiki map from MeatballWiki -- Default interwiki prefixes... REPLACE INTO /*$wgDBprefix*/interwiki (iw_prefix,iw_url,iw_local) VALUES ('abbenormal','http://www.ourpla.net/cgi-bin/pikie.cgi?$1',0), ('zwiki','http://www.zwiki.org/$1',0), -- Many lines removed for this wikipage, do not delete from actual file. ('fi','http://wiki.partio.net/$1',0), ('nl','http://www.scoutpedia.nl/index.php/$1',0), ('scout-o-wiki','http://scout-o-wiki.de/index.php/$1',0), ('de','http://www.pfadiwiki.ch/index.php/$1',0), ('es','http://wiki.larocadelconsejo.net/index.php?title=$1',0), ('ar','http://ar.scoutwiki.org/index.php?title=$1',0), ('eo','http://eo.scoutwiki.org/index.php?title=$1',0), ('en','http://en.scoutwiki.org/index.php?title=$1',0), ('fr','http://www.scoutopedia.net/index.php?title=$1',0), ('sv','http://sv.partiowiki.fi/index.php?title=$1',0);
This file should be the same in all scoutwikis! Please change the values to match the ones used with yours!
Check your database name, dbuser, dbpassword
LocalSettings.php
has all of those.
wiki@PW:/www/wiki.partio/htdocs/maintenance$ cd .. wiki@PW:/www/wiki.partio/htdocs$ cat LocalSettings.php | grep wgDB $wgDBserver = "localhost"; $wgDBname = "pwdatabase"; $wgDBuser = "pwdbuser"; $wgDBpassword = "hI1N80S"; $wgDBprefix = ""; $wgDBmysql4 = true; $wgDBmysql5 = false;
Run the SQL script, so those interwiki-prefixes will be stored into database
Do it mysql..
wiki@rissa:/services/www/wiki.partio.net/htdocs$ mysql -u pwdbuser -p pwdatabase Enter password: Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 192778 to server version: 4.0.24_Debian-10sarge2-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> \. maintenance/scoutinterwiki.sql Query OK, 370 rows affected (0.08 sec) Records: 185 Duplicates: 185 Warnings: 0 mysql> \q Bye wiki@PW:/www/wiki.partio/htdocs$
Now you should be able to link [[fi:B-P]].
The interwiki part is done.
Language link
To generate language links, we have to tell what interwiki prefix is used for language links, and what the corresponding ”display name” is.
That is done with the languages/Names.php
languages/Names.php
should look like this:
<?php /** * @package MediaWiki * @subpackage Language */ /* private */ $wgLanguageNames = array( 'aa' => 'Afar', # Afar 'zu' => 'isiZulu', # Zulu #Many lines removed for this wikipage, do not delete from actual file. 'fi' => 'Suomi', #wiki.partio.net Finland 'fr' => 'Français', #scoutopedia.net. France 'nl' => 'Nederlands', #scoutpedia.nl Netherlands 'en' => 'English', #en.scoutwiki.org 'scout-o-wiki' => 'Deutsch-SOW', #scout-o-wiki.de Germany 'de' => 'Deutsch', #pfadiwiki.ch German-Swiss 'es' => 'Español', 'ar' => 'العربية', #ar.scoutwiki.org ); ?>
This file should be the same in all scoutwikis! Please change the values to match the ones used with yours!
And you are all done. Now you should be able to create language links with [[partiowiki:B-P]] and normal interwiki links with [[:partiowiki:B-P]].