Extension:TitleBlacklist/pt-br

The TitleBlacklist extension allows wiki administrators to block the creation, movement and upload of pages, the title of which matches one or more regular expressions, as well as blocking creation of accounts with matching usernames.

Instalação
By default it only affects non-sysop users. To make it default for all use.

Múltiplas fontes de listas negras
Title blacklist can be gathered from multiple sources except local message. For configuring blacklist sources use code like this:


 * Use TBLSRC_LOCALPAGE for using local page as title blacklist
 * Use TBLSRC_URL for using external URL as title blacklist
 * Use TBLSRC_FILE for using file as title blacklist

Editando a lista negra
The title blacklist is found on the MediaWiki:Titleblacklist page.

This page consists of regular expressions, each on a separate line, for example:  Foo  [Bb]ar #No one should create article about it Each entry may also contain optional attributes, enclosed in  and separated with
 * autoconfirmed - only autoconfirmed users are able to create/upload/move such pages
 * casesensitive - don't ignore case when checking title for being blacklisted
 * noedit - users are also unable to edit this article
 * 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

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").

Lista branca
There is also a whitelist at MediaWiki:Titlewhitelist. The blacklist is applied first, then the whitelist. So user input that matches an entry on the blacklist is blocked, except if it matches an entry on the whitelist. You don't have to configure anything in LocalSettings.php in order to use the whitelist. Some of the optional attributes listed above, for the blacklist, also work for the whitelist, e.g. casesensitive.

Personalizando mensagens de aviso
When an attempt to create a page is blocked due to a blacklisted title, a warning message is shown to the user. This can be customised via system messages
 * MediaWiki:Titleblacklist-forbidden-edit: for page creation and editing,
 * MediaWiki:Titleblacklist-forbidden-move: for page moves,
 * MediaWiki:Titleblacklist-forbidden-upload: for image uploads.
 * MediaWiki:Titleblacklist-forbidden-new-account: for new accounts

Custom messages can be defined by using the errmsg attribute.

Visão geral conceitual
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  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:" +.

For example, imagine you want to block "jill" as a new user. Imagine you had a blacklist regex "jill.* " 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.* " or "User:jill.* " 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.

Um exemplo prático
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. Instale a extensão TitleBlacklist.

2. Adicione o seguinte código no arquivo LocalSettings.php

3. Em https://www.example.com/mywiki/MediaWiki:Titleblacklist, adicione

4. Em https://www.example.com/mywiki/MediaWiki:Titlewhitelist, adicione

5. Em https://www.example.com/mywiki/MediaWiki:Titleblacklist-forbidden-new-account edite  The user name "$2" has been blocked from creation. It matches the following blacklist entry:.

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 capitalised.

E.g.: User name creation (and article creation) blocking rules are controlled by MediaWiki:Titleblacklist and MediaWiki:Titlewhitelist. This message can be customised at MediaWiki:Titleblacklist-forbidden-new-account
 * "Mary Smith". OK.
 * "MarySmith". Invalid.
 * "Mary smith". Invalid.
 * "marysmith". Invalid.

Recursos sobre expressões regulares

 * Brief Introduction to Regular Expressions
 * https://web.archive.org/web/20050213032350/http://etext.lib.virginia.edu/services/helpsheets/unix/regex.html
 * The 30 Minute Regex. Tutorial
 * http://www.codeproject.com/Articles/9099/The-Minute-Regex-Tutorial
 * PHP: PCRE regex syntax, the syntax of regular expressions used by PHP &mdash; and therefore this extension
 * http://php.net/manual/en/reference.pcre.pattern.syntax.php

Ver também

 * Combatendo spam e Combatendo vandalismo.