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:Fiction redirect category handler
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 getArgs = require("Module:Arguments").getArgs local p = {} --[[ Local function which handles all the shared character, element and location redirect handling code. --]] local function main(args, objectType, validArgs) local redirectTemplateHandler = require("Module:Redirect template handler") local redirectCategoryShell, mainRedirect, unknownParametersErrors = redirectTemplateHandler.setFictionalObjectRedirect(args, objectType, validArgs) if (unknownParametersErrors) then return redirectCategoryShell .. unknownParametersErrors else return redirectCategoryShell end end --[[ Public function from other modules. Function handles the unique character redirect code. Do not merge with other sections to allow for future changes. --]] function p._character(args, validArgs) local additonalValidArgs = {"birth_name", "sort_name", "title_name"} for i = 1, #additonalValidArgs do table.insert(validArgs, additonalValidArgs[i]) end return main(args, "character", validArgs) end --[[ Public function from other modules. Function handles the unique element redirect code. Do not merge with other sections to allow for future changes. --]] function p._element(args, validArgs) return main(args, "element", validArgs) end --[[ Public function from other modules. Function handles the unique location redirect code. Do not merge with other sections to allow for future changes. --]] function p._location(args, validArgs) return main(args, "location", validArgs) end --[[ Public function which is used to create a Redirect category shell with relevant redirects for fictional character redirects. Parameters: See module documentation for details. --]] function p.character(frame) local args = getArgs(frame) return p._character(args, {}) end --[[ Public function which is used to create a Redirect category shell with relevant redirects for fictional element redirects. Parameters: See module documentation for details. --]] function p.element(frame) local args = getArgs(frame) return p._element(args, {}) end --[[ Public function which is used to create a Redirect category shell with relevant redirects for fictional location redirects. Parameters: See module documentation for details. --]] function p.location(frame) local args = getArgs(frame) return p._location(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:Fiction-related redirects templates
(
edit
)
Template:Lua
(
edit
)
Template:Mlx
(
edit
)
Template:Para
(
edit
)
Template:Tl
(
edit
)
Template:Transcluded section
(
edit
)
Template:Trim
(
edit
)
Module:Fiction redirect category handler/doc
(
edit
)
Module:Redirect template handler/doc
(
edit
)