Module:Sandbox/Base
Yi palo
Documentation for this module may be created at Module:Sandbox/Base/doc
--- Example module.
-- @module example
-- @alias p
-- based on [[:en:Module:Example]], CC BY-SA 4.0, ⓒ [[:en:Special:PageHistory/Module:Example]]
local p = {} --All Lua modules on Wikipedia must begin by defining a variable
--that will hold their externally accessible functions.
--Such variables can have whatever name you want and may
--also contain various data as well as functions.
--- Hello world function
-- @param {table} frame current frame
-- @return Hello world
p.hello = function( frame ) --Add a function to "p".
--Such functions are callable in Wikipedia
--via the #invoke command.
--"frame" will contain the data that Wikipedia
--sends this function when it runs.
-- 'Hello' is a name of your choice. The same name needs to be referred to when the module is used.
local str = "Hello World!" --Declare a local variable and set it equal to
--"Hello World!".
str = str .. 'df'
str = str .. frame:preprocess( string.uupper('[[' .. frame:preprocess( '{{#function:Z13177|live}}') .. ']]' ))
str = str .. frame:preprocess( '[[Ukraine]]' )
return str --This tells us to quit this function and send the information in
--"str" back to Wikipedia.
end -- end of the function "hello"
return p