Module:Backwards copy: Difference between revisions

Content deleted Content added
m Protected "Module:Backwards copy": High-risk template or module: 1448 transclusions (more info) ([Edit=Require autoconfirmed or confirmed access] (indefinite))
per talk
 
(2 intermediate revisions by 2 users not shown)
Line 59:
else
local author = args["author" .. i] or (i == 1 and args["author"])
local authors = args["authorlist" .. i] or (i == 1 and args["authorlist"])
local date = (args["date" .. i] or (i == 1 and args["date"])) or
-- legacy way of providing dates
Line 73 ⟶ 72:
"A <code>year%s</code> or <code>date%s</code> parameter was not found, but a parenthesized year was found in the " ..
"<code>author%s</code> parameter. Move the provided year to the correct parameter.",
i, i, i
), demoCheck(args))
elseif string.match(authors or "", "(%d%d%d[%d]*)") then
text = text .. " " .. showWarning(string.format(
"A <code>year%s</code> or <code>date%s</code> parameter was not found, but a parenthesized year was found in the " ..
"<code>authorlist%s</code> parameter. Move the provided year to the correct parameter.",
i, i, i
), demoCheck(args))
Line 87 ⟶ 80:
))
end
end
 
["display-authors"]local display_authors = args["display-authors" .. i] or (i == 1 and args["display-authors"]),; -- get |display-authors= parameter value for this reference
if tonumber (display_authors) and (0 ~= tonumber (display_authors)) then -- for {{backwards copy}} only allowed number is 0 to suppress author name list
display_authors = 'etal'; -- any other number gets 'etal'; any other text will be rejected by cs1|2
end
Line 92 ⟶ 90:
ref = "none",
author = author,
["display-authors"] = authorsdisplay_authors,
["display-authors"] = args["display-authors" .. i] or (i == 1 and args["display-authors"]),
date = date,
url = args["url" .. i] or (i == 1 and args["url"]),
Line 108 ⟶ 105:
text = string.format(
"%s article is substantially duplicated by a piece in an external publication. " ..
"PleaseSince the external publication copied Wikipedia rather than the reverse, please do not flag this article as a copyright violation of the following source",
text
)
Line 160 ⟶ 157:
text = bannerText(frame, args)
}) .. ((demoCheck(args) or mw.title.getCurrentTitle().namespace == 10) and
"" or "[[Category:Wikipedia article talk pages incorporating the backwardscopybackwards copy template]]"
)
end