Jump to content

手冊:$wgRawHtmlMessages

From mediawiki.org
This page is a translated version of the page Manual:$wgRawHtmlMessages and the translation is 100% complete.
语言、区域和字符编码设置: $wgRawHtmlMessages
可能包含原始HTML的訊息列表。
引进版本:1.32.0​(Gerrit change 449626; git #2ed7bdc)
移除版本:仍在使用
允许的值:(訊息 鍵的陣列)
默认值:参见下方

细节

此变量主要为扩展程序使用,因此它们能够注册敏感消息。 扩展程序的作者应该在这里添加所有没有转换而展示消息(如使用$msg->text()或$msg->plain()的消息,然后将文本发送到输出而不转换)。 此列表用于访问控制,更改在这里列出的消息除编辑MediaWiki命名空间需要的editinterface权限之外,还需要editsitecss和editsitejs权限。

要在擴充功能中添加數值,請將類似這樣的段落加入到extension.json:

"RawHtmlMessages": [
    "foo",
    "bar",
    "baz"
],

訊息名稱必須使用底線而不是空格,並且首字母必須小寫。

默认值

MediaWiki版本:
≥ 1.45
$wgRawHtmlMessages = [];
MediaWiki版本:
1.44
$wgRawHtmlMessages = [
	'copyright',
	'history_copyright',
];

在MediaWiki 1.43——1.44中,这两个原始HTML消息只在$wgAllowRawHtmlCopyrightMessages 是true时被激活。

MediaWiki版本:
1.42 – 1.43
$wgRawHtmlMessages = [
	'copyright',
	'history_copyright',
	'googlesearch',
];
MediaWiki版本:
1.41
$wgRawHtmlMessages = [
	'copyright',
	'history_copyright',
	'googlesearch',
	'youhavenewmessagesmanyusers',
	'youhavenewmessages',
];
提供至

1.39.5

$wgRawHtmlMessages = [
	'copyright',
	'history_copyright',
	'googlesearch',
	'youhavenewmessagesmanyusers',
	'youhavenewmessages',
];

1.35.12

$wgRawHtmlMessages = [
	'copyright',
	'history_copyright',
	'googlesearch',
	'feedback-terms',
	'feedback-termsofuse',
	'youhavenewmessagesmanyusers',
	'youhavenewmessages',
];

MediaWiki版本:
1.32 – 1.40
$wgRawHtmlMessages = [
	'copyright',
	'history_copyright',
	'googlesearch',
	'feedback-terms',
	'feedback-termsofuse',
];

参见