IfAnon
Jump to navigation
Jump to search
An IfAnon is a MediaWiki Parser Function within the UserFunctions Extension that tests whether the current user is anonymous.
- AKA: #ifanon.
- Context:
- Usage:
{{#ifanon: then argument | else argument }}
- Usage:
- Counter-Example(s):
- See: Parsing System, Dynamic Programming, Natural Language Processing System, Parse Tree, Computer Programming Language, Markup Language, Compiler.
References
2018
- (Mediawiki) ⇒ https://www.mediawiki.org/wiki/Extension:UserFunctions Retrieved: 2018-05-31.
- QUOTE: The UserFunctions extension provides a set of dynamic parser functions that trigger on the current user(...)
{{#ifanon:then|else}}
- Tests whether the current user is anonymous.{{#ifblocked:then|else}}
- Tests whether the current user is blocked.{{#ifsysop:then|else}}
- Tests whether the current user is a sysop.{{#ifingroup:group|then|else}}
- Tests whether the current user is a member of the group "group". You can check for multiple groups as well:{{#ifingroup:group1, group2, group3|then|else}}
.
- QUOTE: The UserFunctions extension provides a set of dynamic parser functions that trigger on the current user(...)
2018
- (Mediawiki, 2018) ⇒ https://www.semantic-mediawiki.org/wiki/Help:Parser_functions Retrieved: 2018-05-31.
- QUOTE: A parser function (also called parser hook) is a special piece of syntax that can interact with other wiki elements in a page and can manipulate output generated content.
2018
- (Wikimedia, 2018) ⇒ https://meta.wikimedia.org/wiki/Help:Parser_function Retrieved: 2018-05-31.
- QUOTE: A parser function is one of the double-brace structures that can be in a page, see also Help:Expansion. It returns a value based on at least one unnamed parameter, separated from the function name by a colon ":". There may also be additional parameters, which, like those of ordinary templates, are each preceded by "|". Parser functions differ by whether they have a leading hash character (#):
# {{functionname: argument 1 | argument 2 | argument 3...}}
- QUOTE: A parser function is one of the double-brace structures that can be in a page, see also Help:Expansion. It returns a value based on at least one unnamed parameter, separated from the function name by a colon ":". There may also be additional parameters, which, like those of ordinary templates, are each preceded by "|". Parser functions differ by whether they have a leading hash character (#):
- Core parser functions (standardly built into MediaWiki); this is for backwards compatibility
- Optionally for parser function extensions
- {{#functionname: argument 1 | argument 2 | argument 3...}}
- By default for parser function extensions, e.g., the ParserFunctions extension, to prevent collision with namespaces and interwiki prefixes.