વિભાગ:Category handler/doc: આવૃત્તિઓ વચ્ચેનો તફાવત

Content deleted Content added
નાનું Bot: Replace deprecated <source> tag and "enclose" parameter [https://lists.wikimedia.org/pipermail/wikitech-ambassadors/2020-April/002284.html]
Remove {{high-use}} as now redundant to {{used in system}}
લીટી ૧:
{{high-risk|7607966 pages, which is {{#expr:(760796600/{{NUMBEROFPAGES:R}}) round 0}}% of all}}
{{Used in system}}
{{Module rating|p}}
Line ૯ ⟶ ૮:
=== When not to use this module ===
 
For cases where a module only needs to categorise in one of the namespaces main (articles), file (images) or category, then using this module is overkill. Instead, you can simply get a title object using [[revmw:https://www.mediawiki.org/wiki/Extension:Scribunto/Lua reference manual#mw.title.getCurrentTitle#mw.title.getCurrentTitle|mw.title.getCurrentTitle]] and check the <code>nsText</code> field. For example:
<syntaxhighlight lang="lua">
local title = mw.title.getCurrentTitle()
Line ૨૪ ⟶ ૨૩:
:'''main''' = Main/article space, as in normal Wikipedia articles.
:'''talk''' = Any talk space, such as page names that start with "Talk:", "User talk:", "File talk:" and so on.
:'''user, wikipedia, file ... = The other namespaces except the talk pages. Namespace aliases are also accepted. See the table below for the full list.'''
:'''other''' = Any namespaces that were not specified as a parameter to the template. See examples below.
 
Line ૨૨૯ ⟶ ૨૨૮:
For backwards compatibility this template kind of supports the old "category =" parameter. But the parameter name "category" is already used in this module to feed category data for when in category space. So instead this template uses '''category2''' for the usage similar to '''nocat'''. Like this:
 
* If "<code>category2 = ''"</code>" (empty but defined), or "<code>category2 = 'no'</code>", or if '''category2''' is fed any other data (except as described in the next two points), then this template does ''not'' categorize.
* If '''category2''' is undefined or if "<code>category2 = '¬'</code>", then this template categorizes as usual.
* If "<code>category2 = 'yes'</code>" this template categorizes even when on blacklisted pages.
Line ૩૩૧ ⟶ ૩૩૦:
* nocat = frame.args.nocat / true / false / 'yes' / 'no' / 'y' / 'n' / 'true' / 'false' / 1 / 0
* categories = frame.args.categories / false / true / 'no' / 'yes' / 'n' / 'y' / 'false' / 'true' / 0 / 1
* category2 = frame.args.category or '¬' / '' / 'no' / ''not defined'' / '¬' / 'yes'
* page = frame.args.page / 'User:Example'