Wikipedia:Guide to Scribbling

"Shh! I'm reading about how to Scribble templates."

This is the Guide to Scribbling. Scribbling, also known as Luafication, is the act of writing a template, or converting a template, so that it uses the Scribunto extension to MediaWiki. The Scribunto extension[a] was developed by Tim Starling and Victor Vasiliev, and allows for embedding scripting languages in MediaWiki. Currently the only supported scripting language is Lua. This Guide aims to give you a broad overview of Scribbling, and pointers to further information in various places.

Scribbled templates come in two parts: the template itself and one or more back-end modules — in the Module: namespace — that contain programs that are run on the wiki servers to generate the wikitext that the template expands to. The template invokes a function within a module using a new parser function named {{#invoke:}}.

The idea of Scribbling is to improve template processing performance. Scribbling eliminates any need for template parser function programming using parser functions such as {{#if}}, {{#ifeq}}, {{#switch}} and {{#expr}}. All of this is instead done in the module, in a language that was actually designed to be a programming language, rather than a template system onto which was bolted various extensions over time to try to make it into a programming language.[b] Scribbling also eliminates any need for templates to expand to further templates and potentially hit the expansion depth limit. A fully Scribbled template should never need to transclude other templates.[c]

  1. ^ MW 2003a, p. 1116.


Cite error: There are <ref group=lower-alpha> tags or {{efn}} templates on this page, but the references will not show without a {{reflist|group=lower-alpha}} template or {{notelist}} template (see the help page).


From Wikipedia, the free encyclopedia · View on Wikipedia

Developed by Nelliwinne