Spr1ggs test: Difference between revisions
(template data) |
(Parser function) |
||
Line 87: | Line 87: | ||
} | } | ||
</templatedata> | </templatedata> | ||
=== Parser functions === | |||
https://workingwithmediawiki.com/book/chapter11.html | |||
https://portability.fandom.com/wiki/Parser_function | |||
Whereas a tag extension is expected to take unprocessed text and return HTML to the browser, a parser function can 'interact' with other wiki elements in the page. For example, the output of a parser function could be used as a template parameter or in the construction of a link. | |||
syntax: {{ #functionname: param1 | param2 | param3 }} | |||
{{#if:{{{height|}}}|The height is {{{height|}}}.|No height entered.}} | |||
Seas | |||
{{#switch: {{{Season|}}} | Summer = How nice, it's summer! | Winter = Brr, it's winter! | It's some other season! }} | |||
{{#ifexpr: 1 > 0 | yes | no }} | |||
{{#ifexpr: 1 < 0 | yes | no }} |
Revision as of 18:58, 2 February 2024
Testing new extensions
Popups
https://www.mediawiki.org/wiki/Extension:Popups
Displays page and reference previews when hovering over a link to an article or respectively to a reference. The former consists of summaries of an article's content, the latter shows the full content of the reference. Soy-Ups
MissedPages
The MissedPages extension tracks every time a site visitor tries to go to a wiki page that doesn't exist, and gives site editors a easy-to-use form with which to track the most popular missed pages and also to redirect these to existing pages
https://www.mediawiki.org/wiki/Extension:MissedPages
https://wiki.omniliberal.dev/view/Special:MissedPages
SpamBlacklist
prevents edits that contain URLs whose domains match regular expression patterns defined in specified files or wiki pages and registration by users using specified email addresses.
https://www.mediawiki.org/wiki/Extension:SpamBlacklist
this looks like admin shit
EmbedVideo
Template Data
Label unsigned comments in a conversation.
Parameter | Description | Type | Status | |
---|---|---|---|---|
User's name | user 1 | User name of person who forgot to sign their comment. | User | required |
Date | date 2 | Timestamp of when the comment was posted, in YYYY-MM-DD format.
| Unknown | suggested |
Year | year | no description | Number | optional |
Month | month | no description | Number | optional |
Day | day | no description | Number | optional |
comment | comment | no description | Unknown | optional |
Parser functions
https://workingwithmediawiki.com/book/chapter11.html https://portability.fandom.com/wiki/Parser_function Whereas a tag extension is expected to take unprocessed text and return HTML to the browser, a parser function can 'interact' with other wiki elements in the page. For example, the output of a parser function could be used as a template parameter or in the construction of a link.
syntax: {{ #functionname: param1 | param2 | param3 }}
No height entered.
Seas It's some other season!
yes no