Help:Interwiki links

From GRWiktionaryHelp

http://pane9911.sitebooth.com/ divx player avi http://foru0321.freehostia.com/ moulin rouge songs http://ferk8090.fusedtree.com/ one tree hill season 5 pics http://sega8407.700megs.com/ wisconsin nursing schools http://redi5409.phreesite.com/ certified replica jacob company watches http://lett5090.blackapplehost.com/ avatar book 3 chapter 1 http://usme8470.110mb.com/ us army insignias http://pane9911.sitebooth.com/divx-mobile-player-089.html palm divx player http://foru0321.freehostia.com/moulin-rouge-history.html moulin rouge john http://ferk8090.fusedtree.com/season-2-of-one-tree-hill.html one tree hill season 5 finale spoiler http://sega8407.700megs.com/high-school-racine-wisconsin.html greendale high school wisconsin http://redi5409.phreesite.com/movado-replica-watches.html replica concord watches http://lett5090.blackapplehost.com/watch-avatar-book-3-chapter-16.html avatar book 2 chapter 8 http://usme8470.110mb.com/us-army-snipers.html us army unit insignia http://pane9911.sitebooth.com/divx-player-with-usb.html divx player 5.0 http://foru0321.freehostia.com/moulin-rouge-cabaret.html moulin rouge musical http://ferk8090.fusedtree.com/one-tree-hill-episode-synopsis.html one tree hill season 2 episode guide http://sega8407.700megs.com/oregon-wisconsin-school-district.html wisconsin middle schools http://redi5409.phreesite.com/replica-fake-watches.html replica oakley watches http://lett5090.blackapplehost.com/avatar-book-3-chapter-14-boiling-rock.html avatar book 3 chapter x http://usme8470.110mb.com/battalions-of-the-us-army.html 99th us army http://pane9911.sitebooth.com/divx-web-player-problem.html divx player reviews http://foru0321.freehostia.com/moulin-rouge-analysis.html moulin rouge images http://ferk8090.fusedtree.com/best-one-tree-hill-episode.html one tree hill episode order http://sega8407.700megs.com/kimberly-school-district-wisconsin.html burlington high school burlington wisconsin http://redi5409.phreesite.com/replica-tag-huer-watches.html replica tag huer watches http://lett5090.blackapplehost.com/avatar-316-book-3-chapter-16.html avatar book 3 chapter 16 when http://usme8470.110mb.com/australien-army.html ausa army http://pane9911.sitebooth.com/divx-web-player-for-firefox.html dvd divx media player http://foru0321.freehostia.com/moulin-rouge-development.html lyrics for moulin rouge http://ferk8090.fusedtree.com/one-tree-hill-quotes-2005.html one tree hill closing quotes http://sega8407.700megs.com/central-high-school-la-crosse-wisconsin.html pulaski school district wisconsin http://lett5090.blackapplehost.com/avatar-book-3-chapter-14-airing.html avatar book 3 chapter 16 airs http://pane9911.sitebooth.com/divx-in-windows-media-player.html windows media player 9 divx http://ferk8090.fusedtree.com/one-tree-hill-quotes-ellie.html one tree hill 513 quotes

Contents

Customization

(remember that your actual wikidb and wikiuser name were specified by you, and are stored in LocalSettings.php )

Start up mysql

Use the mysql command to start your mysql session:

mysql -u wikiuser -p

Using whatever your wiki user mysql username is, in place of wikiuser and entering the corresponding password when prompted. Next, access the database of your wiki:

use wikidb;

Where wikidb is the name of the database used by your wiki.

example:

aaron@escargot ~ $ mysql -u wikiuser -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 816 to server version: 4.0.20

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> USE wikidb
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql>

View interwiki table

type interwiki<tab><tab> to see a list of interwiki related tables

mysql> interwiki
interwiki            interwiki.iw_prefix
interwiki.iw_local   interwiki.iw_url
mysql> interwiki 

To show you what you have...

SELECT * FROM interwiki;

See http://dev.mysql.com/doc/mysql/en/Retrieving_data.html for more information.


Edit interwiki table

Add language links

As an example of adding interwiki links to other lanuage installations of MediaWiki we will add an interwiki link to the french language installation from the english installation.

REPLACE INTO en_interwiki (iw_prefix,iw_url,iw_local) VALUES
('fr','http://your.domain.name/fr/index.php/$1',1);

Where your.domain.name is the domain name or ip address of the Wiki. So now we can access any page that exists in the french language installation by indicating both the namespace and page name in a wiki link.

e.g. where the namespace is 'fr' and the page name is 'Main Page' would link to the 
page named 'Main Page' in the french language installation.

mysql -u <username> -p <nameofyourdatabase> < <filename.sql>

mysql -u wikiuser -p wikidb < bugzilla-interwiki.sql

THIS DOES NOT REPORT SUCCESS when it works... there is a bug in the mysql database program... no feedback is a bug, but it probably worked. You must open that interwiki.sql with a text editor to double check.

Use wikipedia's interwiki list

the file: maintanance/wikipedia-interwiki.sql contains data like this:

REPLACE INTO interwiki (iw_prefix,iw_url,iw_local) VALUES
('w','http://www.wikipedia.org/wiki/$1',1),
('m','http://meta.wikipedia.org/wiki/$1',1),
('meta','http://meta.wikipedia.org/wiki/$1',1),
('zu','http://zu.wikipedia.org/wiki/$1',1);

I assume the replace into works...

so,


mysql> \. /var/www/localhost/mediawiki-1.3.0/maintenance/wikipedia-interwiki.sql
Query OK, 155 rows affected (0.24 sec)
Records: 155  Duplicates: 0  Warnings: 0

mysql>  

should have enabled the interwiki links that I wanted...

Opening interwiki-links in a new window

  1. Edit the Interwiki-table, the interwiki-link
  2. Add
    {{" TARGET="_blank}}
    at the end of the interwiki-link.
It should look like this:
http://de.wikipedia.org/wiki/$1" TARGET="_blank

see also: m:Opening external links in a new window

Changing Your Interwiki Links

  1. If we wanted to change the interwiki URL of our French language wiktionary we could use a mysql command similar to:
update en_interwiki set iw_url='http://120.0.0.1/fr/index.php/$1' where iw_prefix='fr';

More mysql help

m:Mysql Help

Using phpMyAdmin instead

If your server uses the software phpMyAdmin, you can simply select the database that uses the wiki (remember that your actual wikidb and wikiuser name were specified by you, and are stored in LocalSettings.php ), then select the table "interwiki" from the sidebar. To use the graphical interface, just select "browse" at the top and then you can opt to "insert new row" (at the bottom of the table) following the pattern established for the other items ("$1" is what will be replaced with whatever follows the interwiki prefix in your code; it will usually be at the end of the URL for the site for which you want to make a shortcut). Then click go or opt to insert another record until you are done.

Maintenance script

See m:maintenance scripts for how to use it.

maintenance/wikipedia-interwiki.sql

When upgrading from a 1.2 to 1.3, your interwiki table will be created. however, it will not be updated on further upgrades.

In other languages