Manual:Interwiki table/zh

interwiki 表儲存了前綴及其目的地. 請參閱預設的維基百科前綴. Wiki間鏈接本身儲存在 表中. 可以使用 類訪問此數據.

iw_prefix
維基鏈接的前綴；這與編輯時使用名字空間的方式相同.

iw_url
鏈接的目的地；頁面名稱將替換為 $1.

iw_api
The URL of the file. This is not used except by, when an interwiki map is requested via.

iw_wikiid
The name of the database (for a connection to be established with )

iw_local
Informs MediaWiki how it should treat interwiki links coming from external sources. If iw_local is 1, then it will treat these links as though they were generated from within the local wiki.


 * For example, the interwiki link fr: on the en.wikipedia.org project has iw_local=1 set.

Therefore, the link to https://en.wikipedia.org/wiki/fr:Accueil gracefully redirects you to the French Homepage (Accueil). However, the WorldCat ISSN catalog is flagged 0 on en.wikipedia.org; the link to https://en.wikipedia.org/wiki/issn:1021-9749 does not work, even though 1021-9749 would work if it were on a local Wikipedia page. See m:Help:Interwiki linking#Non-local interwikis.

iw_trans
This is used to allow transcluding templates (or other pages) from another MediaWiki installation. Both  and   need to be on.

Schema summary
+---+---+--+-+-+---+ +---+---+--+-+-+---+ +---+---+--+-+-+---+
 * Field    | Type          | Null | Key | Default | Extra |
 * iw_prefix | varbinary(32) | NO  | PRI | NULL    |       |
 * iw_url   | blob          | NO   |     | NULL    |       |
 * iw_api   | blob          | NO   |     | NULL    |       |
 * iw_wikiid | varbinary(64) | NO  |     | NULL    |       |
 * iw_local | tinyint(1)    | NO   |     | NULL    |       |
 * iw_trans | tinyint(4)    | NO   |     | 0       |       |

+---+---+--+-+-+---+ +---+---+--+-+-+---+ +---+---+--+-+-+---+
 * Field    | Type          | Null | Key | Default | Extra |
 * iw_prefix | varbinary(32) | NO  | PRI | NULL    |       |
 * iw_url   | blob          | NO   |     | NULL    |       |
 * iw_local | tinyint(1)    | NO   |     | NULL    |       |
 * iw_trans | tinyint(4)    | NO   |     | 0       |       |

+---++--+-+-+---+ +---++--+-+-+---+ +---++--+-+-+---+
 * Field    | Type       | Null | Key | Default | Extra |
 * iw_prefix | char(32)  | NO   | PRI | NULL    |       |
 * iw_url   | char(127)  | NO   |     | NULL    |       |
 * iw_local | bool       | NO   |     | NULL    |       |
 * iw_trans | tinyint(1) | NO   |     | 0       |       |

+---++--+-+-+---+ +---++--+-+-+---+ +---++--+-+-+---+
 * Field    | Type       | Null | Key | Default | Extra |
 * iw_prefix | char(32)  | NO   | PRI | NULL    |       |
 * iw_url   | char(127)  | NO   |     | NULL    |       |
 * iw_local | bool       | NO   |     | NULL    |       |

Indexes
 +---++--+--+-+---+-+--++--++-+---+ +---++--+--+-+---+-+--++--++-+---+ +---++--+--+-+---+-+--++--++-+---+
 * Table    | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
 * interwiki |         0 | PRIMARY  |            1 | iw_prefix   | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |