No categories assigned

Scribunto

Revision as of 16:24, 1 December 2017 by Lsireta (talk | contribs) (Blank screen[edit])

The Scribunto (Latin: "they shall write/let them write (in the future)") extension allows for embedding scripting languages in MediaWiki. Currently the only supported scripting language is Lua.


PCRE version compatibility[<a href="https://www.mediawiki.org/w/index.php?title=Extension:Scribunto&action=edit&section=3" title="Edit section: PCRE version compatibility">edit]

PCRE 8.33 or later is recommended. You can see the version of PCRE used by PHP by viewing a phpinfo() web page, or from the command line with the command php -i | grep 'PCRE'.

CentOS 6 and RHEL 6 are stuck on PCRE 7 and need to be upgraded.

Updating to 8.33 on a server with an older version may be relatively complicated. See Updating to PCRE 8.33 or Higher for details.


Lua[<a href="https://www.mediawiki.org/w/index.php?title=Extension:Scribunto&action=edit&section=24" title="Edit section: Lua">edit]

Learning Lua[<a href="https://www.mediawiki.org/w/index.php?title=Extension:Scribunto&action=edit&section=25" title="Edit section: Learning Lua">edit]

Lua is a simple programming language intended to be accessible to beginners. For a quick crash-course on Lua, try Learn Lua in 15 Minutes.

The best comprehensive introduction to Lua is the book Programming in Lua. The first edition (for Lua 5.0) is available online and is mostly relevant to Lua 5.1, the version used by Scribunto:

The reference manual is also useful:

Lua environment[<a href="https://www.mediawiki.org/w/index.php?title=Extension:Scribunto&action=edit&section=26" title="Edit section: Lua environment">edit]

In Lua, the set of all global variables and functions is called an environment.

Each Script error: You must specify a function to call. call runs in a separate environment. Variables defined in one Script error: You must specify a function to call. will not be available from another. This restriction was necessary to maintain flexibility in the wikitext parser implementation.


Blank screen[<a href="https://www.mediawiki.org/w/index.php?title=Extension:Scribunto&action=edit&section=37" title="Edit section: Blank screen">edit]

Make sure your extension version is applicable to your MediaWiki version.


Source: mediawiki

Attachments

Discussions