Open main menu

Extension:TitleBlacklist/ko

This page is a translated version of the page Extension:TitleBlacklist and the translation is 19% complete.

Outdated translations are marked like this.
Other languages:
Deutsch • ‎English • ‎Tiếng Việt • ‎dansk • ‎español • ‎polski • ‎português do Brasil • ‎беларуская (тарашкевіца)‎ • ‎中文 • ‎日本語 • ‎한국어
이 extension 확장기능은 미디어위키 1.21 이상에서 포함됩니다. 따라서 다시 다운로드하지 않아도 됩니다. 하지만 여전히 제공되는 별개의 지침을 따라야 합니다.
미디어위키 확장 기능 매뉴얼
OOjs UI icon advanced.svg
TitleBlacklist
출시 상태: 안정
TitleBlacklist demonstration.png
구현 User rights , API
설명 Blocks the creation of pages matching a regular expression blacklist
만든이 Victor Vasiliev (VasilievVVtalk)
최신 버전 1.5.0 (2014-03-29)
호환성 정책 출시 브랜치
MediaWiki 1.27+
PHP 5.4+
데이터베이스 변경 아니오
라이선스 GNU 일반 공중 사용 허가서 2.0 or later
다운로드

  • $wgTitleBlacklistSources
  • $wgTitleBlacklistUsernameSources
  • $wgTitleBlacklistLogHits
  • $wgTitleBlacklistCaching
  • $wgTitleBlacklistBlockAutoAccountCreation

  • tboverride
  • tboverride-account
  • titleblacklistlog
TitleBlacklist 확장 기능 번역 (translatewiki.net에서 가능한 경우)
사용법과 버전 매트릭스를 확인합니다.
이슈 미해결 작업 · 버그 보고

문서 제목 블랙리스트 확장 기능은 정규 표현식을 이용하여 특정한 규칙을 가진 문서의 생성이나 사용자명 가입을 막을 수 있는 장치입니다.

설치

  • 파일을 다운로드해서, extensions/ 폴더 내의 TitleBlacklist 이라는 이름의 디렉터리 내에 설치합니다.
  • 아래의 코드를 LocalSettings.php의 말미에 추가합니다:
    wfLoadExtension( 'TitleBlacklist' );
    
  • Configure blacklist sources (see below)
  •   완료 – 위키의 ‘Special:Version’에 이동해서, 확장기능이 올바르게 설치된 것을 확인합니다.
By default it only affects non-sysop users. To make it default for all use $wgGroupPermissions['sysop']['tboverride'] = false;.

설정

$wgTitleBlacklistSources
Array of title blacklist sources.
Should be in array( name => source description ) format. Defaults to an empty array.
$wgTitleBlacklistUsernameSources
Sets the sources which may work as a username filter.
'*' is for all; false disables all.
If you want to limit it to particular sources, use array( source name 1, source name 2 ). This may be useful when you have shared account creation system in order to avoid blacklist fragmentation.
$wgTitleBlacklistLogHits
When true, logs on Special:Log/Titleblacklist all attempts of local account creation that match the blacklists. Defaults to false. Note that even disabled, the log will still be visible for users groups with the titleblacklistlog right.
$wgTitleBlacklistCaching
 ?
$wgTitleBlacklistBlockAutoAccountCreation
Also blocks account created automatically that match the blacklists. Defaults to true.

=== 생성 제한 규칙 가져오기 ===

The Title blacklist can be gathered from multiple sources outside the local message. For configuring blacklist sources use code as described below:

wfLoadExtension( 'TitleBlacklist' );
$wgTitleBlacklistSources = array(
    array(
         'type' => 'localpage',
         'src'  => 'MediaWiki:Titleblacklist',
    ),
    array(
         'type' => 'url',
         'src'  => 'https://meta.wikimedia.org/w/index.php?title=Title_blacklist&action=raw',
    ),
    array(
         'type' => 'file',
         'src'  => '/home/wikipedia/blacklists/titles',
    ),
);

See issue T113864 for further information.

Usage

Blacklist

기본적으로 생성 제한 규칙은 MediaWiki:Titleblacklist 문서를 통해 관리됩니다.

문서의 각 줄에는 정규식을 적고, 뒤에 추가적인 옵션을 적어 주면 됩니다. 예를 들어서,

Foo <autoconfirmed|noedit|errmsg=blacklisted-testpage> #This page name is not allowed
[Bb]ar #No one should create article about it
.*pandora.* #This word is not allowed in any part of a page name

정규식 뒤에는 <>로 추가적인 규칙을 정해줄 수 있습니다. 각 옵션은 |로 붙여 주고, 각 옵션의 효과는 다음과 같습니다.

  • autoconfirmed - 가입한지 일정 기간이 된 사용자만이 문서 생성/이동 및 파일 업로드를 할 수 있도록 제한합니다.
  • casesensitive - 규칙에 대소문자를 구별하지 않도록 합니다.
  • noedit - 생성뿐만이 아니라 편집도 불가능하도록 잠급니다.
  • moveonly - 문서 이동만 금지하고, 생성은 허용합니다. (rev:35163)
  • newaccountonly - 계정 생성만 금지하고, 문서 생성은 허용합니다. (rev:38977)
  • reupload - 이미 존재하는 파일을 다시 업로드하는 것은 허용합니다. (rev:33656)
  • errmsg - 사용자에게 원래 안내 메시지 대신 다른 메시지를 출력해줍니다.
  • autoconfirmed - also allows autoconfirmed users to perform such actions
  • casesensitive - don't ignore case when checking title for being blacklisted
  • noedit - users are also unable to edit these pages
  • moveonly - forbid moves but allow ordinary creation (rev:35163)
  • newaccountonly - forbid creation of matching usernames, but allow page creation (rev:38977)
  • reupload - allow reuploads of existing blacklisted files (rev:33656)
  • errmsg - the name of the message that should be displayed instead of standard

If the AntiSpoof extension is installed, you can also use the <antispoof> attribute.

What is referred to here as regular expressions are not proper regular expressions, but rather subpatterns that are inserted into a hard-coded regular expression. i.e. the subpattern Foo from above would create a regular expression like /^Foo$/usi.

Underscores ("_") in regular expressions will be converted to spaces by the extension, because titles are matched against its text form ("Page title" instead of "Page_title").

허용 목록

금지 목록에 포함되더라도 예외적으로 허용할 경우를 추가할 수 있습니다. 이 목록은 MediaWiki:Titlewhitelist에서 관리되며, 동일한 문법을 사용합니다.

안내 메시지 바꾸기

Warning messages

문서 생성 등에 제한이 걸린 경우, 사용자에게 다음의 안내 메시지가 표시됩니다.

특정 규칙에 대해서는 다른 메시지를 표시하도록 할 수 있습니다. 문서 앞쪽의 errmsg 도움말을 참고해주세요.

허용 목록

Conceptual overview

The username for new accounts will be regarded by Titleblacklist differently to the way it regards new articles. Titleblacklist will prepend "User:" (or its localized equivalent) to the string that a user enters at Username on the create account page. So when Titleblacklist is performing matches with your Regex's, as found on MediaWiki:Titleblacklist or MediaWiki:Titlewhitelist, it will match against "User:" + <userinput>.

For example, imagine you want to block "jill" as a new user. Imagine you had a blacklist regex "jill.* <newaccountonly>" and a user enters "jill" as the username on the create account page. This will pass as the comparison Titleblacklist will make will be between "jill.*" (the regex) and "User:jill" (the constructed input string). These don't match and so "jill" is allowed (and you probably didn't intend this). To effect the intended block use a regex like ".*jill.* <newaccountonly>" or "User:jill.* <newaccountonly>" on MediaWiki:Titleblacklist.

If you want to block all users except for all those that do match a regex then block all users in MediaWiki:Titleblacklist and write the permissible regex in the MediaWiki:Titlewhitelist.

How to

If you would like to force all usernames, during account creation, to consist of exactly two names, space separated, with each name capitalized then do the following:

1. TitleBlacklist 설치하기.

2. Add the following to your LocalSettings.php

wfLoadExtension( 'TitleBlacklist' );
$wgGroupPermissions['sysop']['tboverride'] = false; 
$wgTitleBlacklistSources = array(
  array(
    'type' => 'localpage',
    'src'  => 'MediaWiki:Titleblacklist'
  )
);

3. In https://www.example.com/mywiki/MediaWiki:Titleblacklist add

# Block all user accounts, and only permit those that match the MediaWiki:Titlewhitelistregex 
.* <newaccountonly>

4. In https://www.example.com/mywiki/MediaWiki:Titlewhitelist add

# Only allow two names, separated by a space, with each name capitalized. E.g "Fred Mew" OK, "Fred mew" fails, "Fredmew" fails.
# Depends on .* <newaccountonly> in blacklist
User:[A-Z][a-z]+\s[A-Z][a-z]+ <casesensitive>

5. In https://www.example.com/mywiki/MediaWiki:Titleblacklist-forbidden-new-account edit

The user name "$2" has been blocked from creation. It matches the following blacklist entry: <code>$1</code>.

Please use a real name for the user name. User names need to be comprised of two names separated by a space. Each name must be capitalized.

E.g.:
* "Mary Smith". OK.
* "MarySmith". Invalid.
* "Mary smith". Invalid.
* "marysmith". Invalid.

User name creation (and article creation) blocking rules are controlled by MediaWiki:Titleblacklist and MediaWiki:Titlewhitelist. This message can be customized at MediaWiki:Titleblacklist-forbidden-new-account

Testing for matches

The API module action=titleblacklist can be used to test a title and action (e.g. edit, create, new-account) against the blacklist. Users with the 'tboverride' right should be sure to supply the tbnooverride parameter.

For example, if the blacklist contained the filter:

.*(.)\1{10}.* <newaccountonly|errmsg=titleblacklist-forbidden-new-account-invalid> # Disallows eleven or more of the same character repeated in usernames

you could use an API request like

If Scribunto is installed, TitleBlacklist allows for testing if particular titles and actions will match an entry in the blacklist using the mw.ext.TitleBlacklist.test function. If a match is found, the details for the matched entry are returned.

For example, if the blacklist contained the filter:

.*(.)\1{10}.* <newaccountonly|errmsg=titleblacklist-forbidden-new-account-invalid> # Disallows eleven or more of the same character repeated in usernames

함수 가동하기:

mw.ext.TitleBlacklist.test("new-account", "AAAAAAAAAAA")

would return the following table containing details about the matched entry:

{
	custommessage = "titleblacklist-forbidden-new-account-invalid",
	message = "titleblacklist-forbidden-new-account-invalid",
	params = {
		errmsg = "titleblacklist-forbidden-new-account-invalid",
		newaccountonly = true
	},
	raw = " .*(.)\1{10}.* <newaccountonly|errmsg=titleblacklist-forbidden-new-account-invalid> # Disallows eleven or more of the same character repeated in usernames",
	regex = ".*(.)\1{10}.*",
	version = 3
}

Resources on regular expressions

같이 보기