

MediaWiki The wiki collaboration software used to power Wikipedia, the popular online encyclopaedia. It is fast, easily embeddable, and has a relatively simple syntax. Lua was developed in 1993 at the Pontifical Catholic University of Rio de Janeiro, Brazil. Lua The programming language used by Scribunto. Scribunto uses both standard Lua libraries and libraries written specifically for MediaWiki. Using libraries to write software is usually a lot easier than writing equivalent software from scratch. library Software used to write other software. Normally, to find a value in a table, you let Lua know which table you want, and specify which key Lua should check. The result returned from the module is shown on the wiki page in place of the parser function code. invoke The #invoke parser function is used to run Lua modules from wiki pages. Functions can have parameters, which allows them to produce different output for different inputs.
#Mediawiki parser functions code#
function A block of code that can be reused in different places. They allow access to arguments passed to #invoke, and to the MediaWiki parser. frame Frame objects are the interface between wiki pages and Scribunto. It can be found on the edit screen for Lua modules, underneath the edit window and the edit summary box, and is preloaded with the code you type into the edit window. debug console An console for interactively running Scribunto code. For example, if a wiki page calls a template, which in turn calls a Lua module via #invoke, the frame created by #invoke is the child of the template's frame. child The frame that is one step lower in the frame hierarchy than another given frame. The code inside a function definition is a block, as is the code between then and end in an if- then- end construct. block A group of code statements that form a cohesive unit. Arguments are almost the same as parameters the difference is that parameters are the possible inputs to a function, whereas arguments are what you actually put in. Such arguments are often stored in a table named args. For example, if I passed the argument "Fred" to a greeting function, it might return the result "Hello, Fred!" Arguments also refers to the input values that a Lua module receives from a wiki page. This is a list of terms often used in this book.Īrgs Short form of "arguments".
