Module:Article history/config: Difference between revisions

Content deleted Content added
add oldid parameters for OTD, automatically link ITN dates, don't separate each date with "on" in date lists, and remove the tracking category for ITN link parameters
use a new table for passing arguments to makeDateText to avoid polluting the category code
Line 1,836:
return nil
end
local dates = {}
for i, t in ipairs(data) do
iflocal notdate t.link= then{}
if t.ymdDate >= 20090101link then
tdate.link = stringt.format(link
elseif t.ymdDate >= 20090101 then
'Wikipedia:ITN archives/%d/%s',
date.link = string.format(
t.year,
'Wikipedia:ITN archives/%d/%s',
t.month
)t.year,
t.month
)
elseif t.ymdDate >= 20050101 then
tdate.link = string.format(
'Portal:Current events/%d %s %d',
t.year,
t.month,
t.day
)
end
end
date.date = t.date
dates[#dates + 1] = date
end
local intro
Line 1,863 ⟶ 1,867:
" featured on Wikipedia's [[Main Page]] in the " ..
"''\"[[Template:In the news|In the news]]\"'' column on $1."
return makeDateText(datadates, blurb)
end,
categories = function (articleHistoryObj, collapsibleNoticeObj)
Line 1,891 ⟶ 1,895:
return nil
end
local dates = {}
for i, t in ipairs(data) do
local date = {}
date.date = t.date
date.link = t.link
if t.oldid then
-- TODO: Move this inside the main module
Line 1,902 ⟶ 1,910:
-- If the oldid is valid, it takes precedence over
-- explicit links.
tdate.link = 'Special:PermaLink/' .. t.oldid
else
collapsibleNoticeObj:addWarning(
Line 1,915 ⟶ 1,923:
end
end
dates[#dates + 1] = date
end
local intro
Line 1,926 ⟶ 1,935:
"''\"[[Wikipedia:Selected anniversaries|On this day...]]\"'' " ..
"column on $1."
return makeDateText(datadates, blurb)
end,
categories = function (articleHistoryObj, collapsibleNoticeObj)