Open main menu
Home
Random
Donate
Recent changes
Special pages
Community portal
Preferences
About Stockhub
Disclaimers
Search
User menu
Talk
Contributions
Create account
Log in
Editing
Module:R from fictional object multi
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
local p = {} --[[ Local function which creates the relevent category, either with or without a sort key. --]] local function createCategory(categoryScheme, name, sortKey) local category = name .. " " .. categoryScheme if (sortKey) then category = category .. "|" .. sortKey end return "[[Category:" .. category .. "]]" end --[[ Local function which handles the main process. Parameters: -- |1...8= β required; Positional or numbered parameters for each series name. -- |category= β required; The redirect category scheme to be used. -- |sort= β optinal; A sort key for the category. --]] local function _main(args) -- If category wasn't set, return error. if (not args.category) then return error end local categories = "" for i = 1, 10 do if (args[i]) then categories = categories .. createCategory(args.category, args[i], args["sort"]) end end return categories end --[[ Entry point. --]] function p.main(frame) local getArgs = require('Module:Arguments').getArgs local args = getArgs(frame) return _main(args) end return p
Summary:
Please note that all contributions to Stockhub may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Stockhub:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Lua
(
edit
)
Template:Mlx
(
edit
)
Template:Tl
(
edit
)
Module:R from fictional object multi/doc
(
edit
)