Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Humanipedia
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Module:Technical reasons
Module
Discussion
English
Read
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
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 mHatnote = require('Module:Hatnote') local mHatlist = require('Module:Hatnote list') local mYesno = require('Module:Yesno') local mArguments --initialize lazily local p = {} function p.technicalReasons (frame) mArguments = require('Module:Arguments') local args = mArguments.getArgs(frame) return p._technicalReasons(args) end function p._technicalReasons (args) --Return an error if no redirect's provided if not args[1] then return mHatnote.makeWikitextError( 'no redirect provided', 'Template:Technical reasons', args.category ) end --get maxArg manually because getArgs() and table.maxn aren't friends local maxArg = 0 for k, v in pairs(args) do if type(k) == 'number' and k > maxArg then maxArg = k end end --If there's only 1β2 arguments, set from to 1 to default things nicely. --Note that if (not args[2]) this doesn't matter either way. local from = maxArg > 2 and 2 or 1 --Structure the forSee table local forSee = mHatlist.forSeeArgsToTable(args, from) --Suppresses defaulting; for-see table rows that would include defaulting --are set to nil. for k, v in pairs(forSee) do if not v.use or #v.pages == 0 then forSee[k] = nil end end --Stringify the forSee table or set it nil forSee = #forSee ~= 0 and mHatlist.forSeeTableToString(forSee) or nil local whatRedirects = mYesno(args.prefix) and 'terms beginning with "' .. args[1] .. '" redirect' or '"' .. args[1] .. '" redirects' local lead = string.format( 'For [[Wikipedia:Naming conventions (technical restrictions)|technical reasons]], %s here.', whatRedirects ) local text = table.concat({lead, forSee}, ' ') local options = {extraclasses = 'plainlinks selfreference noprint', selfref = true} return mHatnote._hatnote(text, options) end return p
Summary:
Please note that all contributions to Humanipedia 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
Humanipedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Template link
(
edit
)
Template:Tl
(
edit
)
Module:Technical reasons/doc
(
edit
)