Help:Lua

Lua is a common scripting language used at sites and in software to make additional functionality and adaptations. The Scribunto extension makes Lua available for Mediawiki powered sites.

The core libraries provided by Scribunto are described in the Lua reference manual.

There are other extensions that provide Lua libraries, and some are of special interest:


 * Extension:ArticlePlaceholder – uses Lua to create content for missing articles.
 * Extension:JsonConfig – provides an undocumented  method.
 * Extension:ParserFunctions – …
 * Extension:TitleBlacklist – provides a weakly documented . Documentation at Extension:TitleBlacklist.
 * Extension:Wikibase Client – uses Lua to access defined entities. Documentation at Extension:Wikibase Client/Lua.

Other extensions can be found in Category:ScribuntoExternalLibraries extensions and Category:ScribuntoExternalLibraryPaths extensions.

Background
Lua is provided in the wikitext by call to the parser function, which takes two mandatory arguments. The first is the page title in the module namespace, and the second is the method. In addition, there might be arguments to the method, but the method can also traverse the frames to fetch its arguments. The frames are available as special structures, and will be provided as the first argument to the method.

There are two different access models for the libraries. Some are set up as part of a core -structure, and some must be. It is not always obvious how a specific library is defined, and how it is accessed.