Help:Lua

From mediawiki.org
Jump to navigation Jump to search

Lua is a common scripting language used at web sites and in software to make additional functionality and adaptations. The Scribunto extension makes Lua available for Mediawiki powered sites, but can also be extended to other languages.

Background[edit]

Lua is provided in the wikitext by call to the parser function {{invoke:}}, 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 mw-structure, and some must be required. It is not always obvious how a specific library is defined, and how it is accessed.

Libraries[edit]

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 because they are in use at Wikimedia-sites:

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

Notes[edit]

References[edit]

See also[edit]