Manual:$wgDefaultUserOptions/ja

To add a new user preference, see:

The below changes to LocalSettings.php will override the default user preferences for anonymous visitors and users who have not customized their preferences. Existing user accounts who had the (previous) default option and didn't set it explicitly (which means that it's not stored in the database) will then use the new default.

Available preferences
The following user preferences are available for customization:

注記:
 * New settings are added to MediaWiki periodically. Some of these settings have been added since $wgDefaultUserOptions was introduced in v1.4.0. Currently there is no documentation about when settings were added.
 * It is possible for extensions and language files to add extra toggles to the 'misc' tab. Languages that use this feature should have the setting described here. Extensions should add the information to their extension page.
 * This list is not up to date with the latest MediaWiki Version. List options with --list (see ).



ガジェットのオプション
gadget-$gname e.g. gadget-HotCat for MediaWiki:Gadget-HotCat.js



既定値
各言語は、その言語ファイルに利用者の個人設定のための独自の既定値を設定します. 例えば、右横書きの言語 (右から左に読む言語) では、 は左側ではなく右側に表示されるように設定されるでしょう. $wgDefaultUserOptions に追加された値はオーバーライドです (つまり、ここに値が存在する場合はそれが優先されます) が、言語の既定値が使用される場合、設定が配列から省略される場合があります.

MediaWiki の 1.8.0 未満のバージョンでは、この設定の既定値は単に空の配列であり、現在の言語が既定値を提供するものでした.

バージョン 1.8.0 以降では、言語固有の設定のみが言語ファイルでオーバーライドされるため、ほとんどの設定が  で明示的に設定されるようになりました.

バージョン 1.19 以降、言語ファイルによるオーバーライドは機能しないため除去され、クイックバーなど、それを使用していた機能は別の方法で改善されました.

例
To disable section editing links by default (for new and anonymous users), set the following in LocalSettings.php:

Add pages the user edits to their watchlist by default:

If the preference is of type multiselect, things are a bit more complicated. The key for each default user option is the concatenation of the preference key with the option key. For example if the preference key is 'favoritecolors' and the option key is 'red', the default user option key would be 'favoritecolorsred'. In this hypothetical scenario, if you wanted to have red and yellow selected by default, you would use:

If the preference is of type checkmatrix, things are even more complicated. The key for each default user option is the concatenation of the preference key with the column key and row key, separated with hyphens. For example if the preference key is 'favoritecars' and the column key is 'red' and the row key is 'corvette', the default user option key would be 'favoritecars-red-corvette'. In this hypothetical scenario, if you wanted to have red Corvette and black Jetta selected by default, you would use:

When writing a MediaWiki extension, instead of using the global variable $wgDefaultUserOptions, you can add a section to extensions.json:

関連項目

 * - Changing the user options of existing users
 * - Disabling certain user options
 * - Disabling certain user options