Manual:FAQ/ja
MediaWikiに関するよく聞かれる質問(FAQ)です。あなたの質問が、この FAQ か 古いmeta FAQにもない場合、IRC channelもしくはサポートデスクで、サポートを求めて下さい。 このFAQは、metaのFAQ を元に、徐々に見直しをしています。ここで見つからない場合は、そちらでも探してみて下さい。
|
Contents
- 1 The basics
- 2 インストール方法と設定
- 2.1 MediaWikiをダウンロードするには?
- 2.2 MediaWikiのインストール方法
- 2.3 パッケージを使用してMediaWikiをインストールするには?
- 2.4 一つのサーバーに複数のMediaWikiをインストールするには?
- 2.5 MediaWikiはsafe_modeが有効な環境で動作しますか?
- 2.6 MediaWikiはシェルによるアクセスは必要ですか?
- 2.7 拡張機能をインストールする方法は?
- 2.8 名前空間を追加するには?
- 2.9 アップロードを有効にするには?
- 2.10 数式の埋め込みを有効にするには?
- 2.11 How do I set the timezone for my MediaWiki?
- 2.12 キャッシュされたページをパージするには?
- 2.13 How do I completely disable caching?
- 2.14 追加のフォーマットのアップロードを許可するには?
- 2.15 "ファイルが不正または無効な拡張子を持っています"
- 2.16 インストーラーが初期利用者を作成しなかった、またはそれが管理者ではない
- 2.17 パスワードを再設定するには?
- 2.18 自分のwikiにインターウィキリンクを作るには?
- 2.19 ベースURLを短くするには?
- 2.20 How do I organize pages into subdirectories like /wiki/subdir/PageName?
- 2.21 MediaWiki.orgのすべてを自由にダウンロードできますか?
- 2.22 利用者の権限を管理/運用するには?
- 2.23 MediaWiki を読み取り専用モードにするには?
- 2.24 利用者設定の既定値を変更するには?
- 2.25 How can I make Mediawiki run faster?
- 2.26 How do I enable a drop-down list of search suggestions?
- 3 アップグレード
- 4 移動
- 5 インターフェイスを変更する
- 5.1 ロゴを変更にするには?
- 5.2 How do I edit the wiki's CSS?
- 5.3 How do I hide the left vertical navigation toolbar
- 5.4 How do I hide the categories at the bottom of each page?
- 5.5 左側にあるロゴをカスタマイズするには?
- 5.6 クリックしたときに左上コーナーのURLをカスタマイズするには?
- 5.7 ロゴのサイズを減らす
- 5.8 ブラウザのアドレス行にあるアイコン(favicon)を変更するには?
- 5.9 ナビゲーションバーをカスタマイズするには?
- 5.10 すべてのページテキストメッセージ(サイトのお知らせ)を設置するには?
- 5.11 メインページを変更するには?
- 5.12 メインのページタイトルを隠すには?
- 5.13 バージョン1.9以前での、メインページのタイトルを隠す解決方法
- 5.14 目次(TOC)を隠すには?
- 5.15 インターフェイスのテキストを変更するには?
- 5.16 インターフェイス言語を変更するには?
- 5.17 How do I remove the article/edit etc tabs?
- 5.18 How do I add/remove tabs throughout my wiki?
- 5.19 匿名利用者による編集を防止するには?
- 5.20 ログインしていない利用者に対して記事/編集その他のタブを除去するには?
- 5.21 一般的にタブを追加/除去するには?
- 5.22 ログインしていない利用者に対してセクション編集リンクを隠すには?
- 5.23 $wgDisableAnonTalkがtrueの時にトップ右で"Talk for this IP"リンクを表示しないようにするには?
- 5.24 スクリーンの右上トップの"アカウントを作成するまたはログインする"のリンクを表示しないようにするには?
- 5.25 フッターを変更するには?
- 5.26 フッターのPowered By MediaWikiの画像を編集/除去するには?
- 5.27 それぞれのページの<title>を変更するには?どこで変更します?
- 5.28 外部リンクを新しいウィンドウで開くには?
- 5.29 MediaWikiのURL、タグなどをフォーマットしないようにするには?
- 5.30 利用者が記事の保存をする前にプレビューを強制するには?
- 5.31 編集ページ上でさらにボタンを追加するには?
- 5.32 編集ページでクリック可能なタグ、特別な文字を追加するには?
- 5.33 How can I use Wikipedia's default skin (Vector) on my wiki?
- 5.34 How do I disable external links from showing in the printable version of a page?
- 5.35 How do I change the text of the article (page name) tab of my wiki's main page?
- 6 基本的な使い方
- 6.1 ページを編集するには?
- 6.2 新しいページを作成するには?
- 6.3 ページの古いバージョンを削除するには?
- 6.4 How do I use oversight/delete revisions in the page history?
- 6.5 編集チュートリアルはありませんか?
- 6.6 印刷可能なページのフォームを閲覧するには?
- 6.7 How do I use templates?
- 6.8 Can I use media (images, video, audio, etc.) from Wikimedia Commons in my installed version of MediaWiki?
- 6.9 How do I use a template as a signature?
- 6.10 How do I add the sandbox functionality to my installation of the wiki?
- 6.11 How do I add a "Sandbox" link to personal tools (top right)?
- 6.12 How do I make my wiki serve all languages?
- 7 wikiをインポートする
- 8 さらにカスタマイズする
- 9 何故?
- 10 アンチスパム
- 11 今どこで?
The basics[edit | edit source]
What are the differences between MediaWiki, Wikimedia, Wikipedia and wiki?[edit | edit source]
This is a common question; please see Differences between Wikipedia, Wikimedia, MediaWiki, and wiki/ja for a detailed answer.
I want to use a MediaWiki instance to (blank). Am I allowed to?[edit | edit source]
MediaWiki is free software: this means that you may use it for any purpose without legal hindrance. Furthermore, its licensing conditions apply solely to the software itself. This means that although many wikis license their content under a permissive license, you are not obliged to license the content submitted to your wiki in any particular way. Of course, as a project founded to support sites like Wikipedia, we encourage you to license the texts you write under a free license, but, in short, you are not required to.
If you wish to alter or amend the software itself, in general, you are permitted to, but there are some restrictions and you should consult the full text of the GNU GPL version 2 for details. Because MediaWiki is provided free of charge, there is no warranty, to the extent permitted by applicable law.
インストール方法と設定[edit | edit source]
MediaWikiをダウンロードするには?[edit | edit source]
MediaWiki の最新の安定版リリースをダウンロードするにはここをクリックしてください。ファイルは.tar.gz アーカイブで提供されます。MediaWiki はGit リポジトリからも直接入手できます。
訳注: Windowsではそのまま利用できませんが、+Lhaca (+Lhaca) などのソフトを使用して展開できます。
MediaWikiのインストール方法[edit | edit source]
MediaWikiをインストールする作業は10分から30分程度かかります。ファイルをアップロード/コピーしソフトウェアを設定するインストーラースクリプトを動作させることを含みます。See the Installation Guide, where you will also find the minimum system requirements.
パッケージを使用してMediaWikiをインストールするには?[edit | edit source]
多くのLinuxディストリビューションは独自のパッケージ化されたフォーマットでMediaWikiを提供します。MediaWiki開発チームはインストール、設定もしく使用するための支援はLinuxディストリビューションにお任せしています。パッケージを維持する個々のコミュニティと会社はインストールの手引きを提供すべきです。
Be warned that third-party distributions may be older versions, so pay close attention to compatibility information for directions and extensions.
- See also: Software bundles.
一つのサーバーに複数のMediaWikiをインストールするには?[edit | edit source]
以下のようにすれば、一つのサーバーに複数のwikiをインストールすることが可能です:
- それぞれのwikiに対して異なるデータベースを使う
または
- それぞれのwikiに対して異なるテーブル接頭辞を使う。すなわち一つのデータベースに属する接頭辞の異なるテーブル群を使用。 (Postgresに関しては、異なるスキーマと利用者を使用することで同様の効果を得ます)
これのオプションの情報に関しては、それぞれ$wgDBnameと$wgDBprefixをご覧ください。
wikiファミリーをセットアップする情報に関しては、Manual:Wiki family/jaをご覧ください。
同じサーバーを使用して複数のwikiをセットアップする代替的な情報に関しては、Steve Rumberg'sの素晴らしい公表と利用者からの追加コメントをご覧ください。
MediaWikiはsafe_modeが有効な環境で動作しますか?[edit | edit source]
もちろんです。制限された範囲で。Safe modeをご覧ください。
MediaWikiはシェルによるアクセスは必要ですか?[edit | edit source]
シェルアクセス(SSHアクセス)はMediaWikiをインストールするためには必要とされませんが、大いにお勧めします。シェルアクセス無しでは、wikiのバックアップまたは新しいバージョンにアップグレードすることが困難でしょう。ですのでメンテナンスタスクはシェルアクセス無しでは不可能です。
拡張機能をインストールする方法は?[edit | edit source]
拡張機能をインストールするための情報に関してはManual:Extensions/jaをご覧ください。拡張機能を書くことに関しても同様です。既存の拡張機能を探すには Category:Extensions/ja をご覧ください。
名前空間を追加するには?[edit | edit source]
名前空間を追加するためには、LocalSettings.phpファイルを修正し、$wgExtraNamespacesを通して名前空間を追加します。次のコードを"Portal"名前空間に追加できます。それは議論の名前空間に対応します:
define( "NS_PORTAL", 100 ); define( "NS_PORTAL_TALK", 101 ); $wgExtraNamespaces[NS_PORTAL] = "Portal"; $wgExtraNamespaces[NS_PORTAL_TALK] = "Portal_talk";
アップロードを有効にするには?[edit | edit source]
File uploads are an often-used feature of MediaWiki, but are disabled by default in all current release versions. To enable them, first make the upload directory (default images) writable by the web server (chmod -R 777 ./images
or allow the Apache user to write to it, etc.) then set $wgEnableUploads to true in LocalSettings.php (i.e. "$wgEnableUploads = true;"). If you get a "failed to mkdir" error when you try to upload, it probably means that there's a permissions problem.
数式の埋め込みを有効にするには?[edit | edit source]
MediaWikiはtexvcと呼ばれる数式をレンダーするためにLaTeXを利用するヘルパープログラム経由で埋め込みの数式を許可します。セットアップの手引きに関してはManual:Mathをご覧ください。
How do I set the timezone for my MediaWiki?[edit | edit source]
- See: Manual:Timezone
キャッシュされたページをパージするには?[edit | edit source]
ナビゲーションバーへの変更をしたときなど、キャッシュされたページをパージするには、&action=purge
をページ URL の末尾に追加してください。
例: http://www.mediawiki.org/w/index.php?title=Main_Page&action=purge
または、短い形式の URL の末尾に ?action=purge
を追加してください:
例: http://www.mediawiki.org/wiki/Main_Page?action=purge
- See also: Manual:Purge, Manual:Parameters to index.php.
How do I completely disable caching?[edit | edit source]
Add in your LocalSettings.php file the following lines:
$wgEnableParserCache = false; $wgCachePages = false;
追加のフォーマットのアップロードを許可するには?[edit | edit source]
MediaWikiは$wgFileExtensions構成ディレクティブを利用して指定されたファイルフォーマットを必要とします。通常このディレクティブはMediaWikiがインストールされたディレクトリのrootに存在するLocalSettings.phpに設定されます。
例えば、PDFファイルのアップロードを許可するためには、次の内容をlocalSettings.phpに追加します:
$wgFileExtensions[] = 'pdf';
To extend uploading to more than one type of file, use the following syntax
$wgFileExtensions = array_merge($wgFileExtensions, array( 'pdf', 'txt', 'mp3' ));
"ファイルが不正または無効な拡張子を持っています"[edit | edit source]
利用者の中には許可された拡張子を持つファイルフォーマットを追加した後で、エラーに遭遇したことを報告する人もいます。エラーの文章は下記のようなものです:
- The file is corrupt or has an incorrect extension. Please check the file and upload again.
可能な解決方法:
- $wgMimeDetectorCommandの値を設定する。UnixやLinuxでは
- $wgMimeDetectorCommand = "file --brief --mime";
- fileinfo PHP拡張機能をコンパイル/インストールする
- Fedora - yum install php-pecl-Fileinfo
関連項目: Manual:Mime type detection/ja
インストーラーが初期利用者を作成しなかった、またはそれが管理者ではない[edit | edit source]
時々、インストーラーはデフォルト利用者の作成に失敗したり、または利用者テーブルが何らかの理由で失われます。これを解決する方法はいくつかのオプションがあります:
maintenance/createAndPromote.php[edit | edit source]
- If your MediaWiki is older than 1.16, make sure AdminSettings.php is set up (see AdminSettings.sample)
- Execute maintenance/createAndPromote.php --username <new user name> --password <password for that user> from the shell. Append --bureaucrat to command line if you want that user to become a bureaucrat, in addition to becoming an administrator.
この作業によって新しい利用者を作成し管理者に昇格させます。ヘルプが必要な場合、--helpパラメータ付きでスクリプトを動作させてください。
データベースを変更[edit | edit source]
- 通常の方法(Special:Userlogin)で新しいアカウントを登録してください。
- Special:Preferencesで利用者IDを確認してください。
- データベースに対して次のSQL文を実行してください:
INSERT INTO user_groups ( ug_user, ug_group ) VALUES ( <id>, 'bureaucrat' ), ( <id>, 'sysop' );
-
<id>
above should be replaced with the appropriate user ID which you can see on the user's preference page.- Note: if
$wgDBprefix
is defined in LocalSettings.php, prepend its value to the table name. For example, if$wgDBprefix
is "XYZ", then the table name to use isXYZuser_groups
.
Temporarily let everyone assign rights to promote your initial user[edit | edit source]
![]() |
You should not let outsiders access your wiki while you do this, if you use this method. This method may leave your wiki temporarily vulnerable to attack while you do the procedure. |
This method essentially involves letting all users temporarily modify user permissions in order to promote one user
- Register a new account using the regular method (Special:UserLogin). Be logged in using that account.
- Add the following lines to the bottom of LocalSettings.php
$wgAddGroups['user'] = true;
- Go to special:userrights and add the user you just created to the Administrator and Bureaucrat groups.
- Remove the
$wgAddGroups['user'] = true;
line from your LocalSettings.php . This step is very important, as until you remove it anyone can alter permissions, which is bad.
パスワードを再設定するには?[edit | edit source]
- Manual:Resetting passwords を参照してください
自分のwikiにインターウィキリンクを作るには?[edit | edit source]
- Manual:Interwiki を参照してください
ベースURLを短くするには?[edit | edit source]
(i.e. /wiki/Article_Name as opposed to /w/index.php?title=Article_Name)
- Manual:Short URL を参照してください
How do I organize pages into subdirectories like /wiki/subdir/PageName?[edit | edit source]
- Manual:$wgNamespacesWithSubpages, Help:Subpages を参照してください
MediaWiki.orgのすべてを自由にダウンロードできますか?[edit | edit source]
もちろん、フリーソフトウェアの意味で自由です。このサイトの書かれた内容に関するライセンス問題についてはProject:Copyrightsをご覧ください。
利用者の権限を管理/運用するには?[edit | edit source]
一般的な情報に関してはManual:User rights/jaとManual:User rights management/jaを参照してください。アクセスを制限する方法と戦略に関してはManual:Preventing access/jaをご覧ください。
匿名利用者がすべてのページを編集できなくする方法[edit | edit source]
The recommended method is by changing the value of the $wgGroupPermissions
configuration option. Edit LocalSettings.php
and add the line:
$wgGroupPermissions['*']['edit'] = false;
If you use Extension:AbuseFilter, any admin can also disable IP editing temporarily as needed.
匿名利用者がすべてのページを閲覧できなくする方法[edit | edit source]
- LocalSettings.php の末尾に以下を追加します:
$wgGroupPermissions['*']['read'] = false;
Manual:$wgWhitelistReadも参照してください。詳細はManual:Preventing access/ja#すべてのページの閲覧を制限するを参照してください。
アカウント作成を制限する方法[edit | edit source]
- LocalSettings.php の末尾に以下を追加します:
$wgGroupPermissions['*']['createaccount'] = false;
詳細情報は Manual:Preventing access#Restrict account creation を参照してください。
利用者登録時にメールアドレスの入力を必須にするには?[edit | edit source]
- Manual:$wgEmailConfirmToEditを参照してください
MediaWiki を読み取り専用モードにするには?[edit | edit source]
MediaWiki バージョン: | ≥ 1.5 |
利用者設定の既定値を変更するには?[edit | edit source]
MediaWiki バージョン: | ≥ 1.4 |
The MediaWiki default user preferences are in the language file, i.e. languages/Language.php if you're using English. Don't edit that file, just use it for reference, like you do with DefaultSettings.php.
Say if you want to change the default number of search results on a page. Language.php says:
/* private */ $wgDefaultUserOptionsEn = array( ... 'searchlimit' => 20, ... )
To change it to 50, put this in your LocalSettings.php:
$wgDefaultUserOptions = array( 'searchlimit' => 50 );
Note that you are setting $wgDefaultUserOptions, which contains the site overrides, not $wgDefaultUserOptionsEn, which contains the software defaults. Any settings in $wgDefaultUserOptions will override those set in the language file.
To change the default namespaces to be searched, in any version of MediaWiki, set $wgNamespacesToBeSearchedDefault in LocalSettings.php to an array mapping namespace indexes to boolean values. For example, to search the main namespace and the category namespace, use:
$wgNamespacesToBeSearchedDefault = array( NS_MAIN => true, NS_CATEGORY => true, );
In some cases, after you change a default user preference, you may also want to change the user preferences of all existing user accounts.
If so, use the userOptions.php script in the Maintenance directory. Use the "--dry" option for the first run, assess the impact and go from there. (--dry does not write the database)
php userOptions.php --dry --nowarn searchlimit --old 20 --new 50
Also, always backup your database before making these kinds of changes (you do not need to do use if you are just using --dry).
- See also: Manual:$wgDefaultUserOptions/ja
How can I make Mediawiki run faster?[edit | edit source]
- Manual:Performance tuning を参照してください
How do I enable a drop-down list of search suggestions?[edit | edit source]
アップグレード[edit | edit source]
- 関連項目: Manual:Upgrading/ja
移動[edit | edit source]
自分のウィキを別のマシンに移動できますか?[edit | edit source]
Yes. It should be. In essence, you will be backing up your old installation and then "restoring" it onto the new machine. Finally, you will have to make additional modifications to update the wiki configuration so that everything points to the new location.
How do I move my wiki to a different server?[edit | edit source]
Follow the instructions at Manual:Moving a wiki.
インターフェイスを変更する[edit | edit source]
ロゴを変更にするには?[edit | edit source]
The logo that appears in the top left of each page is determined by the $wgLogo configuration line in the LocalSettings.php file.
There are two ways to change the logo:
- Upload a picture to your wiki using the normal file uploading interface. This allows the logo to be replaced easily, so you may want to protect the page if you use this method.
- Then add the $wgLogo line to LocalSettings.php, for example:
-
$wgLogo = "{$wgUploadPath}/6/62/mylogo.png";
- Upload an image to your server by other means (such as FTP).
- Add the $wgLogo line to LocalSettings.php, for example:
-
$wgLogo = "{$wgScriptPath}/mylogo.jpg";
- (In this example, the image is in the same folder as the LocalSettings.php file.)
![]() |
MediaWikiと一緒にインストールされたデフォルトのロゴを上書きすることは簡単ですが、アップグレードによって再びロゴが上書きされるのでお勧めしません。または、このファイルのデフォルトの位置を変更します。 |
How do I edit the wiki's CSS?[edit | edit source]
You shouldn't edit the CSS files (such as main.css) directly, because it will make upgrading harder if you need to apply your customizations each time you upgrade the software. Instead you need to edit a wiki page called MediaWiki:Common.css if you want to apply your CSS changes for all skins, or a wiki page called MediaWiki:Monobook.css if you want to apply the customizations only for Monobook skin.
The content of MediaWiki:Common.css and MediaWiki:Monobook.css pages always override the default CSS styles specified in main.css.
[edit | edit source]
In other words, how do you make the main content div take up 100% of the display, hiding the logo, toolbox, navigation and search engine?
To hide it permanently, copy and paste the following into the MediaWiki:Common.css page:
#column-content { margin: 0 0 .6em 0; } #content { margin: 2.8em 0 0 0; } #p-logo, .generated-sidebar, #p-lang, #p-tb, #p-search { display:none; } #p-cactions { left: .1em; }
To instead hide the toolbar when the user presses F11, enter this in your wiki's MediaWiki:Common.js:
if( e == null ) e = event
if( testKey( e, 122 ) ) { //F11
appendCSS('#column-content {margin: 0 0 .6em 0;} #content {margin: 2.8em 0 0 0;} #p-logo, .generated-sidebar, #p-lang, #p-tb, #p-search {display:none;} #p-cactions {left: .1em;} #footer {display:none;}');
return false;
}
}
function testKey( e, intKeyCode ) {
if( window.createPopup )
return e.keyCode == intKeyCode
else
return e.which == intKeyCode
}
How do I hide the categories at the bottom of each page?[edit | edit source]
You can hide display of the categories on each page by modifying your MediaWiki:Common.css and adding:
.catlinks { display: none; }
左側にあるロゴをカスタマイズするには?[edit | edit source]
ロゴはpBodyセクション無しのportletブロックです。p-logo idによって識別されます。背景画像は/includes/DefaultSettings.phpで定義されるwgLogo変数によって指定されます。この位置の指定はシステムルートではなくウェブサーバールートに対して相対的なものです。間違った設定がされている場合はページに画像が表示されません;ウェブサーバーエラーログを元に調整してください。しかしながらクリップされていないのであればp-logoのサイズがロゴに十分な大きさが必要です。これはp-logoスタイルの元でスタイルシート(monobookのmain.css)で設定されています:
#p-logo { z-index: 3; position: absolute; /*needed to use z-index */ top: 0; left: 0; height: 155px; width: 12em; overflow: visible; }
Note, if you are using a different sized logo, and want to change the CSS, please do not modify any of the core MediaWiki stylesheets. Instead add to the on-wiki css page (MediaWiki:Monobook.css for monobook, MediaWiki:Vector.css for vector. MediaWiki:Common.css will also work for all skins)
クリックしたときに左上コーナーのURLをカスタマイズするには?[edit | edit source]
デフォルトでは、ロゴをクリックすることでメインページに移動します。メインページを変更したい場合、MediaWiki:Mainpageを編集します。
To make the link of the site-logo link externally to any other arbitrary URL, you can add a hook to your LocalSettings.php to override the mainpage href which is used by the logo.
/* Change the main page url used in things like the logo to an absolute url */ $wgHooks['SkinTemplateOutputPageBeforeExec'][] = 'lfChangeMainPageURL'; function lfChangeMainPageURL( $sk, &$tpl ) { $tpl->data['nav_urls']['mainpage']['href'] = "http://www.your-desired-url.com/"; // Point the main page url to an absolute url return true; } /* Change the main page url used in things like the logo to a url of another page on the wiki */ $wgHooks['SkinTemplateOutputPageBeforeExec'][] = 'lfChangeMainPageURL'; function lfChangeMainPageURL( $sk, &$tpl ) { $tpl->data['nav_urls']['mainpage']['href'] = Title::newFromText('ThePage')->getLocalURL(); // Point the main page url to a wiki page's url return true; }
ロゴのサイズを減らす[edit | edit source]
タグはロゴのトップにあるのでロゴのポートレットのサイズを減らしたい場合、#p-logoと#p-logo a:hoverルールも変更する必要があることにご注意ください。デフォルトの設定は以下の通りです:
#p-logo a, #p-logo a:hover { display: block; height: 200px; width: 12.2em; background-repeat: no-repeat; background-position: 35% 50% !important; text-decoration: none; }
ブラウザのアドレス行にあるアイコン(favicon)を変更するには?[edit | edit source]
- Simply upload your favicon.ico to the root of your domain/subdomain, make sure file name is in lower case and its name is favicon.ico
- 他にはLocalSettings.phpで$wgFaviconを編集して$wgFavicon = "$wgScriptPath/path/to/your/favicon.ico";を追加します。
See Manual:$wgFavicon for more details.
Tip: The favicon image should be either 16 x 16 pixels or 32 x 32 pixels.
書き換えルール[edit | edit source]
URLから "index.php" を除去するために .htaccess で書き換えルールを使用する場合、.ico ファイルの例外も追加する必要があります。そのまま次のルールを .htaccess に追加してください:
- RewriteRule .*\.ico$ - [L]
このルールは index.php ルールの 前に なければなりません。
大文字と小文字の区別[edit | edit source]
faviconファイルをアップロードするとき、必ずファイル名が小文字にしてください。(すなわち、"Favicon.ico"ではなく"favicon.ico"です。) 多くのサーバー(例えば、UNIXのようなOS)はファイル名が小文字ではない限り、ファイルを探すことができないからです。
ナビゲーションバーをカスタマイズするには?[edit | edit source]
Monobookスキンで使用されているそれぞれのページの左側に現れるナビゲーションバーの内容はMediaWiki:Sidebarによって決定されます。これらをカスタマイズするための情報はManual:Navigation bar/jaをご覧ください。
すべてのページテキストメッセージ(サイトのお知らせ)を設置するには?[edit | edit source]
テキストをMediaWiki:Sitenoticeページに設置します。すべての記事ページのトップに表示されます。
You can also add text to MediaWiki:Anonnotice to create a message that only displays for logged-out users. It is often a good idea to transclude the site notice on the anon notice to make sure that logged-out users still get the information on the site notice,
メインページを変更するには?[edit | edit source]
デフォルトでは、MediaWikiはMain Pageのタイトルを持つページを探し、それをデフォルトのページとして提供します。これは MediaWiki:Mainpageが異なるページを指定するように変えることで変更できます。これはインストール時に含まれる'Main Page'リンクを含むメインのナビゲーションバーのリンクには影響を与えません; これらのリンクを変更するためには、 MediaWiki:Sidebarを編集してください。
メインのページタイトルを隠すには?[edit | edit source]
Simply click on the "Move" tab, and move the page to the desired page title.
Usually you also want to change which page is the configured as "main page".
バージョン1.9以前での、メインページのタイトルを隠す解決方法[edit | edit source]
MediaWiki does not have a built-in option to hide the main page title (see bug 6129), but you can use CSS to hide the title. Alternately, you can use the NoTitle extension.
Method 1 (css)[edit | edit source]
Add the following to MediaWiki:Common.css on your wiki:
body.page-Main_Page h1.firstHeading { display: none; }
If this doesn't work, look at the HTML source code to find the correct class to replace "page-Main_Page" with:
<body class="mediawiki ns-0 ltr page-Some_title">
If no unique class exists, then you cannot use this. You may be using a custom or outdated skin.
Method 2 (display title)[edit | edit source]
Add the following line to any page you want to disable showing the title for (requires setting $wgRestrictDisplayTitle to false)
{{DISPLAYTITLE:<span style="display: none">{{FULLPAGENAME}}</span>}}
FULLPAGENAME is not required, so if it does not need to be present (for screen readers, bots, etc.), you can remove it as follows:
{{DISPLAYTITLE:<span style="display: none"></span>}}
This method will still leave a horizontal rule in the title's former position.
display:none
" will not longer work. Instead you will have to use "position: absolute; clip: rect(1px 1px 1px 1px); clip: rect(1px, 1px, 1px, 1px);
"[2], e. g.{{DISPLAYTITLE:<span style="position: absolute; clip: rect(1px 1px 1px 1px); clip: rect(1px, 1px, 1px, 1px);">{{FULLPAGENAME}}</span>}}
目次(TOC)を隠すには?[edit | edit source]
記事に見出しが4つ以上ある場合、目次(TOC table of contents)は自動的に表示されます。隠す方法は複数あります。
- 一つのページ
- __NOTOC__マジックワードをページのマークアップに設置します。
- すべてのページ
- Install Extension:NoTOC
-
- OR
-
- Add the following rule to MediaWiki:Common.css:
.toc, #toc { display: none; }
- 利用者ごと
- 利用者は目次(TOC)を隠すようなオプションを持つこともできます。これはSpecial:Preferencesで設定される利用者オプションです。
インターフェイスのテキストを変更するには?[edit | edit source]
インターフェイステキストはMediaWikiの名前空間を使用して変更されます。デフォルトのサイト言語から各人がディビエーション(逸脱)するためには、MediaWiki:Englishmessagenameページが存在し、それぞれの言語のデフォルトからのそれぞれのディビエーションのためにMediaWiki:Englishmessagename/languagecodeが存在します。(1.9ではデフォルトのものと等しいメッセージのためのページが存在しません) ページ作成において編集ボックスがデフォルトで自動入力をします。デフォルトを上書きするページを作成するとき、差分を可能にするためにデフォルトのバージョンを最初に保存しておくと便利です。meta:Help:System messagesもご覧ください。
- システムメッセージのリストのために、Special:Allmessagesをご覧ください
- MediaWikiの名前空間をオフに切り替えます。$wgUseDatabaseMessagesコンフィギュレーション設定をご覧ください
- それぞれのページの底でPrivacy policyまたはDisclaimersを除去するためには、MediaWiki:PrivacyまたはMediaWiki:Disclaimersページの内容をそれぞれ一つのマイナス記号に設定してください。
インターフェイス言語を変更するには?[edit | edit source]
デフォルトのインターフェイス言語を変更するためには、LocalSettings.phpにある$wgLanguageCodeの値を変えてください。例:
$wgLanguageCode = "fr";
You may also need to bypass your browser's cache to see the changes.
The new default interface language will be applied to all users who haven't ever customised it.
If you want to provide users the possibility to create and choose pages and interface elements in languages other than the default one of the wiki, you need the Translate extension, which can make your wiki multilingual.
If you want to change the language settings for all existing users, use the userOptions.php maintenance script. For instance, to have all users with English set use French instead, run
php userOptions.php language --old en --new fr
How do I remove the article/edit etc tabs?[edit | edit source]
For a little more control see: User:Subfader/Hide_page_tabs
Edit MediaWiki:Common.css on your wiki, and add this:
li#ca-edit { display: none; }
See the page source for the various #ca-* ids used in the content tabs.
Note: this will only work for Monobook and derived skins such as Modern and Vector (the default skin), and doesn't actually stop people from editing. To do that, see Manual:User rights.
How do I add/remove tabs throughout my wiki?[edit | edit source]
Use Extension:DynamicTabs on older MediaWiki installations or write your own extension (See: Manual:Hooks/SkinTemplateNavigation):
For example, to remove the talk tab and then add a tab that always goes to the main page you would save this code in extensions/AR-Tabs.php
:
MediaWiki バージョン: | ≤ 1.15 |
<?php if( !defined( 'MEDIAWIKI' ) ){ die( "This is not a valid access point.\n" ); } $wgHooks['SkinTemplateContentActions'][] = 'replaceTabs'; function replaceTabs( $content_actions ) { unset( $content_actions['talk'] ); // only this to remove an action $maintitle = Title::newFromText( wfMsgForContent( 'mainpage' ) ); $main_action['main'] = array( 'class' => false or 'selected', // if the tab should be highlighted 'text' => wfMsg( 'sitetitle' ), // what the tab says 'href' => $maintitle->getFullURL(), // where it links to ); $content_actions = array_merge( $main_action, $content_actions ); // add a new action return true; }
MediaWiki バージョン: | ≥ 1.16 |
<?php if( !defined( 'MEDIAWIKI' ) ){ die( "This is not a valid access point.\n" ); } $wgHooks['SkinTemplateNavigation'][] = 'replaceTabs'; function replaceTabs( $skin, &$links) { unset( $links['namespaces']['talk'] ); // Remove the talk action $maintitle = Title::newFromText( wfMsgForContent( 'mainpage' ) ); $links['namespaces']['main'] = array( 'class' => false or 'selected', // if the tab should be highlighted 'text' => wfMsg( 'sitetitle' ), // what the tab says 'href' => $maintitle->getFullURL(), // where it links to 'context' => 'main', ); return true; }
and then add
require_once("extensions/AR-Tabs.php");
to the bottom of LocalSettings.php
How do I remove a tab on only one page?[edit | edit source]
MediaWiki バージョン: | ≥ 1.9 |
For example, to remove the Discussion (talk) page tab from the Main Page, on the MediaWiki:Common.css page add:
body.page-Main_Page li#ca-talk { display: none !important; }
To modify MediaWiki:Common.css you must have administrative privileges.
- See also: Manual:Hide page tabs
How do I remove a tab on all pages[edit | edit source]
MediaWiki バージョン: | ≥ 1.9 |
For example, to remove the Discussion (talk) page tab on all wikipages, on the MediaWiki:Common.css page add:
#ca-talk { display:none!important; }
Other tabs to remove are #ca-history, #ca-viewsource, #ca-view (Read tab), #ca-nstab-main (Page tab), #ca-viewsource.
Other drop down menu items you can remove are #ca-watch, #ca-move, #ca-delete.
To modify MediaWiki:Common.css you must have administrative privileges.
匿名利用者による編集を防止するには?[edit | edit source]
- 推奨する方法は
$wgGroupPermissions
コンフィギュレーション変数の値を変更することです。LocalSettings.php
を編集して次の行を追加します:
$wgGroupPermissions['*']['edit'] = false;
- 代替的には対応するタブを表示しないように手作業でそれぞれのスキンのPHPソースを変更します。
- デフォルトのMonoBookスキンのために、
MonoBook.php
ファイルで対応する行を検索します: -
foreach($this->data['content_actions'] as $key => $tab) {
- そして
foreach
ブロックの内部で以下のコードを書き入れます: -
if ( $this->data['loggedin'] == 1 ) {
- 新しい条件で閉じ大括弧をお忘れ無く。
- ここのタブを隠すために、foreachループの内部でそれぞれの$keyの値を確認するコードを修正しますまたはタブリストを修正するために'hook'拡張機能(SkinTemplateXYZ辺り)を書くことができます。
ログインしていない利用者に対して記事/編集その他のタブを除去するには?[edit | edit source]
匿名利用者による編集を防止するには?をご覧ください。
一般的にタブを追加/除去するには?[edit | edit source]
(例えば)トークタブを除去して常にメインページにゆくものを追加するために、(例えば)extensions/AR-Tabs.phpに以下のコードを保存します:
$wgHooks['SkinTemplateContentActions'][] = 'ReplaceTabs'; function ReplaceTabs ($content_actions) { unset( $content_actions['talk'] ); //これはアクションを削除するためのみ $maintitle = Title::newFromText(wfMsg('mainpage') ); $main_action['main'] = array( 'class' => false or 'selected', //タブがハイライトされる場合 'text' => wfMsg('sitetitle'), //タブが表示するもの 'href' => $maintitle->getFullURL(), //リンクする場所 ); $content_actions = array_merge( $main_action, $content_actions); //新しいアクションを追加する }
そして次のコードをLocalSettings.phpの一番下に追加します:
require_once("extensions/AR-Tabs.php");
すべてのページ上でタブを削除する方法[edit | edit source]
この解決方法はバージョン1.9とそれ以降で機能します。バージョン1.8とそれ以前では、最初に上記のパッチを適用します。
例えば、wikipage上のDiscussion (talk)ページのタブを削除するためには、 MediaWiki:Monobook.cssページ上に次のコードを追加します:
#ca-talk { display:none!important; }
他に除去するタブは#ca-historyと#ca-viewsourceです。MediaWiki:Monobook.cssを修正するためには管理者権限を持たなければなりません。
ログインしていない利用者に対してセクション編集リンクを隠すには?[edit | edit source]
- 推奨する方法は
$wgDefaultUserOptions
設定オプションの値を変更して次の行を追加することです:
$wgDefaultUserOptions ['editsection'] = false;
- 代替的にはそれぞれのスキン(例えば、
MonoBook.php
)を手作業で編集して</head>
の前に追加します:
<?php if(!$this->data['loggedin']) { ?> <style> .editsection { display: none; } </style> <?php } ?>
- ログイン利用者も含めてすべての利用者のためにリンクを隠したい場合、代わりに
monobook/main.css
を編集して以下のコードを追加します:
-
.editsection { display: none; }
- 匿名利用者による編集を防止するには?もご覧ください。
$wgDisableAnonTalkがtrueの時にトップ右で"Talk for this IP"リンクを表示しないようにするには?[edit | edit source]
SKinTemplate.phpの489行(バージョン1.9.2と1.9.3)を変更します
global $wgTitle, $wgShowIPinHeader;
を次のように変更します
global $wgTitle, $wgShowIPinHeader, $wgDisableAnonTalk;
そして 547 - 554行に
$usertalkUrlDetails = $this->makeTalkUrlDetails($this->userpage); $href = &$usertalkUrlDetails['href']; $personal_urls['anontalk'] = array( 'text' => wfMsg('anontalk'), 'href' => $href, 'class' => $usertalkUrlDetails['exists']?false:'new', 'active' => ( $pageurl == $href ) );
以下のように変更します(宣言とインデントが存在する行で追加します)
if( !$wgDisableAnonTalk ) { $usertalkUrlDetails = $this->makeTalkUrlDetails($this->userpage); $href = &$usertalkUrlDetails['href']; $personal_urls['anontalk'] = array( 'text' => wfMsg('anontalk'), 'href' => $href, 'class' => $usertalkUrlDetails['exists']?false:'new', 'active' => ( $pageurl == $href ) ); };
スクリーンの右上トップの"アカウントを作成するまたはログインする"のリンクを表示しないようにするには?[edit | edit source]
Monobook.phpで次の宣言を変更します:
foreach($this->data['personal_urls'] as $key => $item) {
以下のようにします:
foreach($this->data['personal_urls'] as $key => $item) if($this->data['loggedin']==1) {
フッターを変更するには?[edit | edit source]
フッターのPowered By MediaWikiの画像を編集/除去するには?[edit | edit source]
You can hide the Powered by MediaWiki image by adding the following to your wiki's MediaWiki:Common.css:
#f-poweredbyico { display: none; }
この画像を除去または編集したい場合、poweredbyicoを設置して編集しなければなりません。 (願わくは誰かがもっと詳しい手引きを編集してくれるでしょう。)MediaHound 03:59, 13 August 2007 (UTC)
それぞれのページの<title>
を変更するには?どこで変更します?[edit | edit source]
変更したいテキストの多くはMediaWikiの名前空間で見つかります。
タイトル、テキスト、アナウンスメントなどを変更するために、Special:Allmessagesに移動します。そこで変更したいページに関連したテキストを見ることができます。(私が言えることは、MediaWikiの名前空間で保護されたエントリーを編集するためには管理者(インストールしたときに作成したアカウント)としてログインする必要があります)
ブラウザでタイトルを変更したい場合、MediaWiki:Pagetitleを編集します。そこに行って他のwikiでするように編集します。
MediaWiki の最新のバージョンでは、MediaWiki:Pagetitle はデフォルトで $1 - {{SITENAME}} です。{{SITENAME}} が間違ったテキストを表示している場合、LocalSetitngs.php で $wgSitename を設定する必要があります。
LocalSettings.phpで$wgSitenameは正しいが{{SITENAME}}が間違っている場合、$wgSitenameを間違って"Wikipedia"の書き直しに設定する利用者投稿の言語ファイルを使用している可能性があります。その場合は、言語ファイルを正しく編集してください。例えば、ヘブライ語ファイルはwikiディレクトリのlanguages/LanguageHe.phpにあります。
修正した後にブラウザキャッシュをクリアすることを忘れないでください。
外部リンクを新しいウィンドウで開くには?[edit | edit source]
新しいウィンドウで外部リンクを開くをご覧ください
MediaWikiのURL、タグなどをフォーマットしないようにするには?[edit | edit source]
svn co <nowiki>http://somwhere.in.the.net/myproject/</nowiki>
svn co http://somewhere.in.the.net/myproject/
利用者が記事の保存をする前にプレビューを強制するには?[edit | edit source]
編集ページ上でさらにボタンを追加するには?[edit | edit source]
編集ページでクリック可能なタグ、特別な文字を追加するには?[edit | edit source]
Extension:CharInsertをご覧ください
How can I use Wikipedia's default skin (Vector) on my wiki?[edit | edit source]
MediaWiki バージョン: | ≥ 1.16 |
Vector was introduced in MediaWiki version 1.16, and was made the default skin in 1.17. See Manual:$wgDefaultSkin for more information on configuring your default skin.
Additional features of the Vector skin are made available using the Vector extensions, which you must download and install separately.
How do I disable external links from showing in the printable version of a page?[edit | edit source]
Edit the page MediaWiki:Print.css on your wiki and add the following code there:
#content a.external.text:after, #content a.external.autonumber:after { content: none; }
This will override the styles defined in skins/common/commonPrint.css in MediaWiki source code. For more information, see Manual:CSS.
How do I change the text of the article (page name) tab of my wiki's main page?[edit | edit source]
To change the text of the tab, as one example used in Wikipedia, you first open the page "MediaWiki:Mainpage-nstab
".
After you've done that, click Edit and type in the edit box the text you want to be seen later on the main page - that's it. Don't forget to save the page as well.
基本的な使い方[edit | edit source]
ページを編集するには?[edit | edit source]
ページを編集するためにそれぞれのページに現れる編集リンクをクリックします。デフォルトのMonoBookスキンを使用してると、ページのトップ上のタブのフォームにあります。フォームが現れ、既存のマークアップを含みます。修正が終了したとき、変更をコミットするために保存するボタンをクリックします。
次の記事もご覧ください: MetaWiki:ヘルプ:ページの編集
新しいページを作成するには?[edit | edit source]
新しいページを作成する方法はいくつかあります:
- 他のページ上へのリンクを作成し、現れた赤いリンクをクリックします
- ページの意図するロケーションバーにブラウズします。例えば、http://www.foowiki.org/index.php?title=New_pageをロケーションバーに入力して編集リンクをクリックします。wikiの中には、失敗した検索の中にそのページを編集するリンクを含むものがあります。
- See also: Help:Starting a new page
ページの古いバージョンを削除するには?[edit | edit source]
古いバージョンのページデータはデータベースに保有されページ履歴機能を通してアクセスされます。これは変更を検討して望ましくないページを修正または取り消すために便利ですが、場合によって、法的な理由から、またはデータベースのサイズを減らすために、管理者がこの情報を利用できないようにしたいことがあります。
- 管理者はページの削除によってページの古いリビジョンを削除でき、保存されているリビジョンを選んで削除できます。
- Oversight拡張機能(HideRevisionとしても知られます)はページ履歴の有害なリビジョンを削除できます。
- For newer MediaWikis (1.14+), you can enable the core RevisionDelete feature that allows privileged users to remove single revisions from page histories.
- maintenance/deleteOldRevisions.phpをコマンドラインから実行することでサイト全体で最新の記事以外の古いリビジョンを一掃できます。メンテナンススクリプトに関して詳細な情報はManual:Maintenance_scripts/jaをご覧ください。
- See also: Manual:Removing embarrassment
How do I use oversight/delete revisions in the page history?[edit | edit source]
- See: RevisionDelete
You can also delete a page, and then restore only the revisions you want.
編集チュートリアルはありませんか?[edit | edit source]
WikipediaなどのWikimediaの姉妹プロジェクトでいくつか利用できるチュートリアルがあります。Meta上でマークアップのリファレンスなどもあります。
- meta:ヘルプ:ページの編集 Meta上のヘルプ
- ページの編集 日本語版Wikipediaのガイド
- The How to edit a page guide on the English Wikipedia
印刷可能なページのフォームを閲覧するには?[edit | edit source]
MediaWikiはページが印刷されるときにページを自動的かつ適切に整形するスタイルシートを含みます; プリント可能な形式でページをレンダーするブラウザで印刷または印刷プレビュー機能を使用してください。
You can also view this printable form using the printable version link in the sidebar under Toolbox or Print/export if using the Collection extension.
How do I use templates?[edit | edit source]
- See Help:Templates
Can I use media (images, video, audio, etc.) from Wikimedia Commons in my installed version of MediaWiki?[edit | edit source]
Yes, this is encouraged through the use of Manual:$wgUseInstantCommons.
- See also: InstantCommons
How do I use a template as a signature?[edit | edit source]
When you look at your preferences, you see a check box for "raw signature." But the field will only take a certain number of characters. What if you want more?
You will need to create two pages, possibly in your userspace.
- Create the first page (FIRST PAGE)
- Go to your preferences, check "raw signature" and put {{FIRST PAGE}} in the signature. Save
- Create a second page (SECOND PAGE) (possibly a sub-page of the first)
- Go back to the first page (FIRST PAGE) and do {{SECOND PAGE}}
- Go to the second page (SECOND PAGE) and place the code you wish to have for your signature.
If you don't have this structure, you will still be inserting all your signature code into the raw code wherever your signature is used, because the software will insert "SUBST" in your preferences. You may not mind this, in which case you only need one page. If you want the raw code to only display {{FIRST PAGE}}, which looks a lot cleaner, then you need to use the two-page structure.
How do I add the sandbox functionality to my installation of the wiki?[edit | edit source]
In wiki terms, a sandbox is simply a "play pen"; a page which users can mess about in. This is an ordinary page created in the normal manner, and can be located wherever you like. There is no special sandbox functionality built into MediaWiki.
Users often inquire about the Wikipedia sandboxes, which seem to be self-emptying. This is not quite correct; there are a number of volunteers who run bots to clean these up and return them to a certain state at regular time intervals.
How do I add a "Sandbox" link to personal tools (top right)?[edit | edit source]
You need to add the Gadget extension and add the Sandbox gadget. You will probably also want to make it a default gadget.
How do I make my wiki serve all languages?[edit | edit source]
To make your wiki multilingual and a tool for translation, allowing translation of pages and of the custom interface (like the sidebar), use the Translate extension; there's extensive documentation.
wikiをインポートする[edit | edit source]
Importing from MediaWiki XML dumps[edit | edit source]
wikiの他のタイプからインポートする[edit | edit source]
Note: The following is directly copied from old meta FAQ. It might need to be corrected.
There is some documentation about importing in the UPGRADE file distributed with MediaWiki.
To follow on from those, this is how at least one individual imported pages from usemod to MediaWiki:
Because MediaWiki does not automatically link to CamelCase style links, you will need to add brackets [[ ]] to all your links. You can do this with the following:
First, obtain ImportStage1.txt (or whatever you want to call it) from the importUseModWiki.php script ( use > to pipe the output to a file )
Second, do
sed '/Importing/!s/\ [A-Z]\w*[a-z]\w*[A-Z]\w*[a-zA-Z]/\ \[\[&\]\] /g' ImportStage1.txt > ImportStage2.txt
This should create proper links in place of your CamelCase links.
This doesn't work so well for SubPage links - someone care to fix?
Then,
sed 's/upload\:\w*\.\w*/http\:\/\/aberwiki\.org\/uploads\/& /g' ImportStage2.txt > ImportStage3.txt
This fixes your upload links. Change the replace text so it fills in your url such as http://www.yourwiki.org/uploads/filename
You are now ready to import ImportStage3.txt into your database with a command such as
mysql -u<mysqluser> -p<yourpass> <db name> < ImportStage3.txt
Note: If your importUseModWiki.php
outputs an XML file instead of SQL statements, this probably means you have a rather new version of MediaWiki. In such a case, you can import the XML file -- see Importing a Wikipedia database dump into MediaWiki, towards the bottom of the page ('Import XML'). Don't forget to rebuild all the tables -- that page also explains how to do that.
他のタイプのファイルからインポートする[edit | edit source]
There are a variety of tools available to help convert content from HTML (and other formats) to MediaWiki markup.
- Developer and SysAdmin tools
- HTML::WikiConverter::MediaWiki - a Perl module for converting from HTML to MediaWiki markup.
- Wikificator - a Javascript MediaWiki extension that converts XHTML to MediaWiki markup.
- The Edit.php, importImages.php and ImportTextFile.php maintenance scripts can be used to import text and images into MediaWiki.
- End-user tools
- HTML to Wiki Converter - an online HTML to MediaWiki markup conversion service. (Based on HTML::WikiConverter::MediaWiki)
- wikEd - a text editor for MediaWiki that can import HTML (including Microsoft Word-generated HTML.)
- Instructions
- Brief notes on converting from Microsoft .chm help files to MediaWiki
- Notes on converting from Microsoft Office formats to MediaWiki
MediaWiki自動インポートスクリプト[edit | edit source]
Taken from wiki_import - MediaWiki auto import script:
説明[edit | edit source]
The script is designed to import a whole folder of files into mediawiki, with the folder directory tree mapped as wiki category hierarchy.
機能[edit | edit source]
- economic, build wiki site from existing knowledge base collection without "double-entry"
- persistent, map folder directory tree as wiki category hierarchy
- sophisticated, import/handle all well-known file types automatically
- complete, cover every applicable scenario, even the case when you need to control access to individual wiki pages
- versatile, highly customizable
クィックヘルプ[edit | edit source]
wiki_import.sh $ $Revision: 1.1 $
mediawiki automatic file import script
Usage: wiki_import.sh [OPTIONS]...
The script is designed to import a whole folder of files into mediawiki, with the folder directory tree mapped as wiki category hierarchy.
The specification of the file-to-import is passed from standard input.
Options:
-s, --sect=n the root category section of the wiki of the imported article (mandatory) -1, --header include standard header (category hierarchy path & notice) -l, --link link to actual file on the web site -f, --footer include standard footer (article category) -R, --res[=p] add restricted tag in the footer as '{{<Res Param|Root Category> Restricted}}' (default=`$_opt_sect')
Configuration Options:
-p, --php=fn mediawiki import php script specification -r, --root=n the root category name for the whole wiki site -m, --max=n max_allowed_packet for mysqld to import -u, --user=n wiki user used for the import -a, --arch=p the root url that linked-to archive files based on
Examples:
echo ./path/to/file.ext | wiki_import.sh -1 -l -f -s 'Customer Support' -R
For the rest of details, check out wiki_import.
さらにカスタマイズする[edit | edit source]
HTMLタグの利用を許可するには?[edit | edit source]
Manual:$wgRawHtml、Manual:$wgGroupPermissionsとManual:Preventing access/jaをご覧ください
警告: この設定によって簡単に利用者を攻撃に晒す可能性があります
この設定を安全にするためにExtension:SecureHTMLとExtension:HTMLetsをご覧ください。
HTMLファイルのアップロードを許可するには?[edit | edit source]
Manual:Allowing HTML Uploadsをご覧ください。
警告: この設定によって簡単に利用者を攻撃に晒す可能性があります
何故?[edit | edit source]
Help名前空間は空なのですか?[edit | edit source]
現在、我々はフリーライセンスの元でクリーンで国際化されたヘルプページセットを持ちません。開発者の中にはこれを望んでいる人もいます; しかし、Help名前空間は現在空白の状態です。独自のヘルプページを追加する、Public Domain help pagesやMeta、例えば利用者ガイドまたはMediaWiki Handbookから特定の項目をコピーすることは自由です。例えば、これらのページはGNU Free Documentation Licenseの元で自由です。
アップグレードした後でいくつかの画像が表示されないのは?[edit | edit source]
利用者の中にはwikiをアップグレードまたは移転をしたら、いくつかの画像が表示されなくなったと報告する人があります。ファイルは存在し、画像の説明ページはunknown / unknownMIMEタイプを表示し、場合によっては、戦税的に危険なファイルであることを警告します。
これを修正するためには、コマンドラインからmaintenance/rebuildImages.phpを使用します。この作業によってデータベースにあるそれぞれのファイルに対してMIME情報が設定されます。
すべてのPNGファイルはサムネイルに変えられないのですか?[edit | edit source]
PHPの最新のバージョンにアップグレードした後で、異なるMimeMagic.php機能がMIMEタイプを検知するために使用されることは可能です。とりわけPHP組み込みのmime_content_typeはPNGファイルを検知することを失敗します。magic.mimeファイルによって可能であるなら、PHPレベルでのバグ修正情報についてmime_content_type pngを検索してください。
詳細についてはここをご覧ください
ショートキーワードを検索してもヒットしないのは?[edit | edit source]
デフォルトでは、MediaWikiはページ内容の検索を可能にするMyISAM全文マッチング機能を使用します。このデフォルトの設定は4語未満の単語はインデックス化されないので、これらのクエリのために結果は返されません。
この振る舞いを変えるために、MySQLはより短い用語をインデックス化できるように再設定する必要があり、MediaWikiのindexテーブルは修正、インデックスをリビルドする必要があります。
- MySQLを再設定する手助けになるものは、http://dev.mysql.com/doc/refman/4.1/ja/fulltext-fine-tuning.html をご覧ください
- 検索インデックステーブルを修正するためには、データベースに対して
REPAIR TABLE searchindex;
クエリを実行してください
MediaWiki 1.24 をダウンロードできないのは?[edit | edit source]
MediaWiki 1.24 は現在では開発段階にあり、一般用のリリースにパッケージ化されていません。望むのであれば、Subversionからダウンロードできます。あるいは、最も最近のリビジョンでアーカイブされたパッケージを望むのであれば、Toolserver 上のmwSnapshots から入手をしてください。
動作しないのは? Wikipedia で動作しているのに![edit | edit source]
Wikipedia と他の Wikimedia ウェブサイトは開発段階の現在のバージョンのコードを使用します; 現在は ブランチ からの MediaWiki 1.25wmf9 (2c94258) です。複数の拡張機能の組み合わせを使用することは、これらのwikiとあなたの特定のセットアップが機能性で異なる可能性があることを意味します。
- 現在の開発コードを取得するためには、 Download from SVN/ja をご覧ください。
- Wikimedia の wikiで動作しているバージョン、および拡張機能を確認するためには、その Wiki での Special:Version をご覧ください・
Fedoraシステム上でパーミッションを設定した後で403 Forbiddenになったのは?[edit | edit source]
Fedora Coreはデフォルトで[:ja:SELinux SELinux]を有効にしています。MediaWikiのためのSELinuxパーミッション設定の手引きはここで読むことができます。
定期的にログアウトするのは?[edit | edit source]
おそらくクッキーまたはセッションデータに関連することです。例えば、PHPのsession.save_path設定の問題などです。m:Help:Logging_in#Log_in_problemsをご覧ください。
利用者アカウントは保存しておいてよい?[edit | edit source]
利用者アカウントの多くがスパマーのアカウントに属するまたはそうしたいから利用者アカウントをwikiから削除する機会が多くあります。適切な選択は必要に応じてアカウントブロックまたはリネームすることです。理由は以下の通りです:
User tableから彼の列を除去しますか?
Rob Churchはこの問題に関してmediawiki-lのメーリングリストに投稿をしました:
"利用者が編集をした場合、利用者テーブルから列を除去することで参照整合性の理論的な損失を起こします。なので、正直に言えば、実際の問題を引き起こす条件を考えることができません; 我々は"未定義の振る舞い"という言い回しを使います。
私が提案することは、安全のために、データベースに対してクィックアップデートを行うことです:
-
UPDATE revision SET rev_user = 0 WHERE rev_user = <current_user_id>
-
UPDATE archive SET ar_user = 0 WHERE ar_user = <current_user_id>
このクエリによってMediaWikiがリビジョンをページ履歴のようなものが生成されたときに匿名によって為されたものとして取り扱うようなります。この作業によって他のテーブルから利用者の詳細を確認しようとするこれらの日常作業によって引き起こされる問題をなくすことができます。
利用者がログエントリ、すなわち、loggingテーブル、アップロードされた画像での列、で問題が起きたら状況は扱いにくくなります。すべての列をぬぐい去り、少々汚くなる可能性があるからです。利用者が編集以外の何かをしたら、それらを無期限にブロックすることを強くお勧めするつもりです。
利用者名が不快で望ましくない場合、RenameUser拡張機能を使用してリネームできます。"
アンチスパム[edit | edit source]
スパムのブラックリストを入手してインストールするには?[edit | edit source]
アンチスパムブラックリスト拡張機能の入手方法と設定はExtension:SpamBlacklistページまたはSVNリポジトリREADMEを参照してください。スパムサイトのブラックリストはmetaにあります。
一つの文字列以上をブロックするために$wgSpamRegexをどのように使いますか?[edit | edit source]
$wgSpamRegexはページ内容のための強力なフィルタです。複数の項目を正規表現に追加することは不格好になる可能性があります。このスニペットを考えてください:
$wgSpamRegexLines[] = 'display\s*:\s*none'; $wgSpamRegexLines[] = 'overflow:\s*\s*auto'; [...] $wgSpamRegex = '/(' . implode( '|', $wgSpamRegexLines ) . ')/i';
時間を浪費せずに追加項目を正規表現に追加する作業を便利にするためのコード例です。共通のスパム攻撃をブロックする2つの人気のあるフィルタも示しています。
今どこで?[edit | edit source]
バグを発見しましたまたは機能のリクエストがあります。どこに投稿すれば?[edit | edit source]
バグと機能リクエストはBugzillaで実装されたMediaZillaに投稿してください。重複エントリーを避けるために投稿する前にデータベースを検索して下さるようお願いします。
奇妙なエラーになっています。他には?[edit | edit source]
- Manual:Errors and Symptoms/jaでカバーされているかどうか見る
- 問題を解決するためには、How to debug MediaWiki/jaを参照
- developersと他に知識のある利用者にコンタクトする方法についてはSee the 下記のセクションを参照。
ここで回答されていない質問があります。次はどこへ?[edit | edit source]
上記のFAQの内容を読み尽くした場合、次のことを試して頂くようお願いします:
- このサイト上の他のソースのヘルプを確認する
- このサイトの残りを検索する
- Metaに記録されたドキュメントを検索する
- m:Meta:MetaProject to transfer content to MediaWiki.orgが終わるまで便利な開発ドキュメントはMeta.wikimedia.orgのPages to be exported to MediaWiki.orgカテゴリに残っています。
- How to become a MediaWiki hacker/ja
- How to debug/ja
- ウェブを検索する
- Project:Support deskでメッセージを投稿する
- mediawiki-lメーリングリストにEメールする
- IRCチャネルでdevelopersに質問をする(Freenodeネットワーク、チャネル #mediawiki)。
まだうまく行きません。どこで助けを求めることができますか?[edit | edit source]
- Project:Support deskでメッセージを投稿する
- mediawiki-l mailing listにメールする(最初に アーカイブを検索する).
- IRCチャネルでdevelopersに質問する(Freenodeネットワーク、#mediawikiのチャネル).
お勧めの読み物[edit | edit source]
言語: | English • català • dansk • Deutsch • español • français • ગુજરાતી • עברית • Bahasa Indonesia • italiano • 日本語 • 한국어 • മലയാളം • occitan • polski • português • português do Brasil • русский • Türkçe • 中文 • 中文(简体) |
---|
- ↑ See this commit for further information.
- ↑ See this thread for further information.