FANDOM


Invokes global modules from dev.wikia.com.

Syntax

{{#invoke:devmodule|main|modulename|parameter1|
parameter2|fname=functioname}}
  • #mod or #modulename = name of a module stored in dev.wikia, e.g. #mod = InfoboxBuilder
  • parameter# = any named or numbered parameter , e.g. "1=baby", "character=Zerg"
  • #fname = function that will be invoked, e.g. main . Note that if this is omitted it assumes that the function is "main"

Examples

From another wiki with the Module:Devmodule use this code:

CodeOutput
{{#invoke:devmodule|main|#mod=links|wikipedia:Lua}}wikipedia:Lua
CodeOutput
{{#invoke:devmodule|main|#mod=formatnum|#func=main|1231231223|en}} 1,231,231,223


Install

Installing modules

To get a brief introduction to lua read the basics page first. On Wikia, one can use modules by either accessing a module remotely or copying all its contents to a Wiki. Modules accessed remotely from dev.wikia are subject to change while 'correctly' copied modules are controlled by a particular wiki.

Using a module "remotely" using Module:Devmodule

Create Module:Devmodule and copy the following code to remotely access modules in dev's repository. See more details in Global Lua Modules/Devmodule.
--[[This imports modules from dev.wikia]]
return require("Dev:Devmodule")

Loading modules remotely from dev.wikia

Create Module:Devmodule in your wiki and add the following code:
--This loads modules directly from dev.wikia.com
return require("Dev:Devmodule")

Using Module:Devmodule in another wiki

To use modules without depending on dev see this page. Create Template:Devmodule in your wiki and add the following code:
{{#invoke:Devmodule|main}}

Using template in a page

You can use this module in a page using syntax such as:
{{Devmodule|main|arg1|arg2}}

Module information

Functions

p.main

Entry point to use module..
Parameters
NameTypepurpose
frametableA scribunto frame.
Return typeReturn purpose
stringThe return content of the module..

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.