Difference between revisions of "Lua"
(Created page with "Lua is a programming language that is now available, via the [https://www.mediawiki.org/wiki/Extension:Scribunto Scribunto MediaWiki extension], on the English Wikipedia (and ...") |
|||
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{Feature | ||
+ | |image=Lua-Logo.svg | ||
+ | |imgdesc=Lua programming language | ||
+ | |title= | ||
+ | }} | ||
+ | {{#set:feature description = Lua is used to give template authors more functionality than available through [[Parser functions]]. The debate to use [[JavaScript]] or [[Lua]] was settled in 2012. Lua can be used to analyze data, calculate expressions, and format results using functions stored in so-called 'modules' in the wiki. }} | ||
+ | {{#set:feature notes = }} | ||
+ | {{#set:feature tests = }} | ||
+ | {{#set:feature examples = }} | ||
Lua is a programming language that is now available, via the [https://www.mediawiki.org/wiki/Extension:Scribunto Scribunto MediaWiki extension], on the English Wikipedia (and on this wiki). Lua code can now be embedded into wiki templates by employing the "<nowiki>{{#invoke:}}</nowiki>" functionality of the Scribunto MediaWiki extension. | Lua is a programming language that is now available, via the [https://www.mediawiki.org/wiki/Extension:Scribunto Scribunto MediaWiki extension], on the English Wikipedia (and on this wiki). Lua code can now be embedded into wiki templates by employing the "<nowiki>{{#invoke:}}</nowiki>" functionality of the Scribunto MediaWiki extension. | ||
+ | |||
+ | See the [https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#mw.loadData Lua Reference Manual] for methods like <code>mw.loadData</code>. | ||
Lua was installed on the English Wikipedia in February 2013, after testing on mediawiki.org and Wikimedia test wikis. In April 2014 it was installed here. | Lua was installed on the English Wikipedia in February 2013, after testing on mediawiki.org and Wikimedia test wikis. In April 2014 it was installed here. | ||
See https://en.wikipedia.org/wiki/Wikipedia:Lua | See https://en.wikipedia.org/wiki/Wikipedia:Lua | ||
+ | |||
+ | |||
+ | Since the Variables extension is not compatible with future Parsoid, logic that was formerly embedded in complex templates should be properly written in Lua. | ||
+ | |||
+ | There's a page at https://dev.fandom.com/wiki/Lua_templating/Converting_Wikitext_templates | ||
+ | |||
+ | with an interesting conversation and critique from River on Reddit https://www.reddit.com/r/mediawiki/comments/hwpx5w/where_to_learn_about_infoboxes_templates_and/ | ||
[[Category:Programming]] | [[Category:Programming]] | ||
− | [[Category: | + | [[Category:Wiki]] |
Latest revision as of 08:55, 4 February 2024
Lua | |
---|---|
Image shows: | Lua programming language |
Summary | |
Description: | Lua is used to give template authors more functionality than available through Parser functions. The debate to use JavaScript or Lua was settled in 2012. Lua can be used to analyze data, calculate expressions, and format results using functions stored in so-called 'modules' in the wiki. |
More |
Lua is a programming language that is now available, via the Scribunto MediaWiki extension, on the English Wikipedia (and on this wiki). Lua code can now be embedded into wiki templates by employing the "{{#invoke:}}" functionality of the Scribunto MediaWiki extension.
See the Lua Reference Manual for methods like mw.loadData
.
Lua was installed on the English Wikipedia in February 2013, after testing on mediawiki.org and Wikimedia test wikis. In April 2014 it was installed here.
See https://en.wikipedia.org/wiki/Wikipedia:Lua
Since the Variables extension is not compatible with future Parsoid, logic that was formerly embedded in complex templates should be properly written in Lua.
There's a page at https://dev.fandom.com/wiki/Lua_templating/Converting_Wikitext_templates
with an interesting conversation and critique from River on Reddit https://www.reddit.com/r/mediawiki/comments/hwpx5w/where_to_learn_about_infoboxes_templates_and/