Module:Copied: Difference between revisions

Content deleted Content added
add class per tper from sandbox
Line 17:
text = string.format("%s [[%s]]",text,from)
if (merge == "yes") or not (afd == "") then
text = stringtext .format(. "%s was merged into",text)
else
text = stringtext .format(. "%s was copied or moved into",text)
end
if (merge == "yes") and (to == "") then
Line 44:
end
end
text = stringtext .format(. "%s.",text) -- Finish first sentance
text = string.format("%s The former page's [%s history] now serves to [[WP:Copying within Wikipedia|provide attribution]] for that content in the latter page, and it must not be deleted so long as the latter page exists.",text,tostring(mw.uri.fullUrl(from,{action="history"}) or ""))
return text
Line 132:
local text = "Text has been copied to or from this %s; see the list below. The source pages now serve to [[WP:Copying within Wikipedia|provide attribution]] for the content in the destination pages and must not be deleted so long as the copies exist. For attribution and to access older versions of the copied text, please see the history links below. %s"
text = string.format(text, pageType, historyList)
return text
end
 
local function categories(args,multiUsed)
local to_oldid = args["to_oldid"] or args["to_diff"] or args["diff"] or args["to_oldid1"] or args["to_diff1"] or args["diff1"]
local from_oldid = args["from_oldid"] or args["from_oldid1"]
local text = "[[Category:Wikipedia pages using copied template]]"
if ((not from_oldid) or (not to_oldid)) and not multiUsed then
text = stringtext .format(. "%s[[Category:Wikipedia pages using copied template without oldid]]",text)
end
return text
end
Line 140 ⟶ 150:
local from2 = args["from2"]
if (from2) then
text = multiText(args) .. categories(args,true)
else
elseif (not from2) then
text = singleText(args) .. categories(args,false)
end
return text
Line 154 ⟶ 164:
text = BannerText(args)
})
end
 
local function categories(args)
local to_oldid = args["to_oldid"] or args["to_diff"] or args["diff"]
local from_oldid = args["from_oldid"]
local text = "[[Category:Wikipedia pages using copied template]]"
if ((not from_oldid) or (not to_oldid)) then
text = string.format("%s[[Category:Wikipedia pages using copied template without oldid]]",text)
end
return text
end
 
Line 169:
local getArgs = require('Module:Arguments').getArgs
local args = getArgs(frame)
return renderBanner(args) .. categories(args)
end