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:Infobox film/track
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 check(args, sources, targets) local source for _, param in ipairs(sources) do if args[param] and args[param] ~= '' then source = param break end end if not source then return nil end local warnings = {} for link in mw.ustring.gmatch(args[source], '%[%[[^%[%]]+%]%]') do local name = mw.ustring.match(link, '([^%|]+)%]%]$', 3) for _, param in ipairs(targets) do if args[param] and args[param] ~= '' then local match = mw.ustring.match(args[param], '.?.?%f[%w]' .. name .. '%f[%W]') -- Eliminate duplicate links if match and not mw.ustring.find(match, '^%[[%[:]') then table.insert(warnings, 'The link <code>' .. mw.text.nowiki(link) .. '</code> in <code>|' .. source .. '=</code> should be moved to <code>|' .. param .. '=</code>.') break end end end end return warnings end function p.main(frame) local args = frame:getParent().args local warnings = check(args, {'producer', 'producers'}, {'writer', 'writers', 'screenplay', 'story', 'based_on'}) or {} local warnings2 = check(args, {'music'}, {'cinematography', 'editing'}) or {} for _, v in ipairs(warnings2) do table.insert(warnings, v) end if #warnings ~= 0 then local ret = require('Module:If preview')._warning({table.concat(warnings, ' ')}) local namespace = mw.title.getCurrentTitle().namespace if namespace == 0 or namespace == 118 then ret = ret .. '[[Category:Pages using infobox film with incorrectly placed links]]' end return ret end 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:Info
(
edit
)
Template:Para
(
edit
)
Template:Sandbox other
(
edit
)
Template:Tl
(
edit
)
Module:Infobox film/track/doc
(
edit
)
Module:String
(
edit
)