Template:UKB criterion/doc

This template is not used on the English Wikipedia, but it has been kept as a convenience for the operation of a bot on other Wikipedias.

UKB criterion is used to define what pages should count in a contest checked by User:UKBot. Each criterion acts as a page filter that some of the pages the participants have contributed to will pass and others not. In addition to being readable for the bot, the template also produces a human readable form of the criterion.

Each contest must have at least one UKB criterion template, but can have multiple.

Usage
The first parameter defines which criterion type to use, and has to be one of the types the bot supports.


 * : the page must have been created within the contest period:
 * Redirects are excluded by default, to include them:
 * Redirects are excluded by default, to include them:


 * : the page must have been created before the contest started
 * Example:  →


 * : the article must be linked to a Wikidata item  matching a SPARQL query
 * It might be a good idea to add a description, which is shown before the link to the query:
 * : the page must be member of a given categories or any of its subcategories:
 * Multiple categories can be specified. In that case, a page will pass if it's included in at least one of them.
 * To include categories at other language projects, use language prefix and colon (but no leading colon). The bot must also be configured to check the given projects.
 * By default, the bot checks 5 levels of subcategories (defined in ukfilters.py ukfilters.py). This can be adjusted, but given the nature of the Wikipedia category tree, you can get very surprising results by including too many levels. Category contests generally works best for quite shallow, well-defined categories. Setting  means that pages must be direct members of the category, while   means a page can also be a member of one of the subcategories. Example:
 * To exclude certain categories (and their subcategories), use exclude. Multiple categories can be separated by comma. Example:
 * To include categories at other language projects, use language prefix and colon (but no leading colon). The bot must also be configured to check the given projects.
 * By default, the bot checks 5 levels of subcategories (defined in ukfilters.py ukfilters.py). This can be adjusted, but given the nature of the Wikipedia category tree, you can get very surprising results by including too many levels. Category contests generally works best for quite shallow, well-defined categories. Setting  means that pages must be direct members of the category, while   means a page can also be a member of one of the subcategories. Example:
 * To exclude certain categories (and their subcategories), use exclude. Multiple categories can be separated by comma. Example:
 * By default, the bot checks 5 levels of subcategories (defined in ukfilters.py ukfilters.py). This can be adjusted, but given the nature of the Wikipedia category tree, you can get very surprising results by including too many levels. Category contests generally works best for quite shallow, well-defined categories. Setting  means that pages must be direct members of the category, while   means a page can also be a member of one of the subcategories. Example:
 * To exclude certain categories (and their subcategories), use exclude. Multiple categories can be separated by comma. Example:
 * To exclude certain categories (and their subcategories), use exclude. Multiple categories can be separated by comma. Example:


 * : the page must include a certain template. More specifically, the page must have included the given template in the parent revision of the first revision made by a participant. This means that the article is counted also if the participant removes the template, making this criterion suitable for maintenance contests where maintenance templates are removed as articles are improved.
 * Multiple templates can be specified. In that case, it's sufficient that at least one of them is included.
 * Language prefix can be used, without leading colon:
 * Language prefix can be used, without leading colon:
 * Language prefix can be used, without leading colon:


 * : the page must be expanded with at least this number of bytes


 * : the page must be linked from at least one of the specified articles (this can be an existing page or a list created just for the contest). Redirects are followd. Example:


 * : the page must link to at least one of the specified articles. Redirects are followed. Example:


 * : the page must be part of one of the specified namespaces. Example:
 * To limit to one site (the site must be a site supported by UKBot):
 * To limit to one site (the site must be a site supported by UKBot):


 * : specific pages that count in the contest. Can be use when no other criteria are suitable. Example:

Override the generated text
If the generated text is not suitable, it can be overriden using the parameter description. Example:



Combining multiple criteria
When combining multiple criteria, the following applies:


 * The criteria,   and   must always be satisfied for a contribution to count. They relate to other criteria by logical conjunction.
 * For other types of criteria, at least one of them must be satisfied for a contribution to count. They relate to other criteria by logical disjunction.

For example, if you include criteria,   and  , the criteria are combined as  , so a contribution will count if it's to a new article that either is part of a given category tree or matches a given sparql query.

In the future, the bot will support arbitrary combinations of criteria. Syntax suggestions are welcome!