Module:Article history/config: Difference between revisions

Content deleted Content added
update from Module:Article history/config/sandbox per discussion at Template talk:Article history#DYK subpage parameter: minor clean; accept dyknom parameter for "fact from this article" link and put Recent_additions links in the dates
Update featured portal wording per request
 
(15 intermediate revisions by 12 users not shown)
Line 207:
-- iconSize: The icon size, including "px" suffix. The default is defined in
-- defaultStatusIconSize.
-- iconSmallSize: The icon size if we are outputting a small template. The
-- default is defined in defaultSmallStatusIconSize.
-- iconMultiSize: The icon size if we are outputting multiple status rows. The
-- default is defaultSmallStatusIconSizedefaultMultiStatusIconSize.
-- text: The status text. This may be a string or a function. If it is a
-- function, it takes an article history object as input, and should return
Line 251 ⟶ 249:
link = link or 'Wikipedia:Featured article candidates/' .. articlePage
local text = "'''%s''' is a [[Wikipedia:Featured articles|featured article]]; " ..
"it (or a previous version of it) has been '''''[[%s|identified]]''''' " ..
"as one of the best articles produced by the [[Wikipedia:Wikipedians|Wikipedia community]]. " ..
"Even so, if you can update or improve it, [[Wikipedia:Be bold|please do so]]."
Line 276 ⟶ 274:
text = "'''$1''' is a former [[Wikipedia:Featured article candidates|featured article candidate]]. " ..
"Please view the links under Article milestones below to see why " ..
"the nomination failedwas archived. For older candidates, please check the " ..
"[[Wikipedia:Featured article candidates/Archived nominations/Index|archive]]."
},
Line 297 ⟶ 295:
link = link or 'Wikipedia:Featured list candidates/' .. articlePage
local text = "'''%s''' is a [[Wikipedia:Featured lists|featured list]], " ..
"which means it has been '''''[[%s|identified]]''''' as one of the best " ..
"[[Wikipedia:ListsStand-alone lists|lists]] produced by the [[Wikipedia:Wikipedians|Wikipedia community]]. " ..
"If you can update or improve it, [[Wikipedia:Be bold|please do so]]."
return string.format(text, articlePage, link)
Line 313 ⟶ 311:
"[[Wikipedia:Featured list criteria|featured list standard]], you may " ..
"[[Wikipedia:Featured list candidates|renominate]] the article to " ..
"become a [[Wikipedia:Featured listlists|featured list]]."
},
FFLC = {
Line 321 ⟶ 319:
iconCaption = 'Former FLC',
text = "'''$1''' is a former [[Wikipedia:Featured list candidates|featured list candidate]]. " ..
"Please view the link under Article milestones below to see why the nomination failedwas archived. " ..
"Once the objections have been addressed you may " ..
"[[Wikipedia:Featured list candidates#Resubmitting nominations|resubmit]] " ..
Line 360 ⟶ 358:
if title.namespace == 1 then
ret[#ret + 1] = Category.new('Wikipedia good articles')
ret[#ret + 1] = Category.new('Wikipedia CD Selection-GAs')
local topic = getGoodArticleTopic(articleHistoryObj.args.topic)
if topic then
Line 381 ⟶ 378:
name = 'Former good article nominee',
aliases = {'FAILEDGA'},
icon = 'Symbol unsupportoppose vote.svg',
text = function (articleHistoryObj)
local articlePage = articleHistoryObj.currentTitle.subjectPageTitle.prefixedText
Line 387 ⟶ 384:
local text = "'''%s''' was a '''''[[%s|%s]]''''' nominee, " ..
"but did not meet the [[Wikipedia:Good article criteria|good article criteria]] " ..
"at the time. There aremay be suggestions below for improving the article. " ..
"Once these issues have been addressed, the article can be " ..
"[[Wikipedia:Good article nominations|renominated]]. " ..
Line 436 ⟶ 433:
"[[Wikipedia:Featured topic candidates|featured topic candidate]]. " ..
"Please view the links under Article milestones below to see why " ..
"the nomination failedwas archived."
},
FPO = {
id = 'FPO',
name = 'Featured portal',
icon = 'CscrLinecons big-featuredstar.svg',
text = "TheThis '''$2portal was Portal''' is a [[Wikipedia:Featured portals|featured portal candidates/Portal:$2|identified]],''' " ..
"as a [[Wikipedia:Featured portals|featured portal]] " ..
"which means it has been " ..
"'''''before the [[Wikipedia:FeaturedVillage portalpump candidates(proposals)/Portal:$2|identified]]'''''Archive 138#RfC " ..
"as one'about ofmarking the bestFeatured portals onprocess [[Wikipedia]].as "historical"|process ended in 2017]]..',
"If you see a way this portal can be updated or improved without " ..
"compromising previous work, please feel free to contribute.",
categories = function (articleHistoryObj)
return {Category.new(
Line 476 ⟶ 471:
"[[Wikipedia:Featured portal candidates|featured portal candidate]]. " ..
"Please see the links under Portal milestones below for its " ..
"original nomination page and why the nomination failed.",
categories = function (articleHistoryObj)
return {Category.new(
'Wikipedia featured portal candidates (contested)',
articleHistoryObj.currentTitle.text
)}
end
},
PR = {
Line 611 ⟶ 600:
-- iconSize: The icon size, including "px" suffix. The default is defined in
-- defaultIconSize.
-- iconSmallSize: The icon size if we are outputting a small template. The
-- default is defined in defaultSmallIconSize.
-- text: The notice text. This may be a string or a function. If it is a
-- function, it takes an article history object as the first parameter, and
Line 727 ⟶ 714:
end,
iconSize = '48px',
iconSmallSize = '30px',
text = function (articleHistoryObj, noticeObj)
local data = noticeObj:getData(articleHistoryObj)
Line 834 ⟶ 820:
elseif status == 'FL' then
addCat('FL-Class Featured topics articles')
elseif status == 'FFA/GA' or status == 'FFAC/GA' or status == 'GA' then
addCat('GA-Class Featured topics articles')
else
Line 1,611 ⟶ 1,597:
MFD = {
id = 'MFD',
name = 'MiscellaneaMiscellany for deletion',
results = {
kept = {
Line 1,798 ⟶ 1,784:
text = 'Overturned',
aliases = {'overturn'}
)},
restored = {
id = 'restored',
text = 'Restored',
aliases = {'restore'}
},
['no consensus'] = {
Line 1,828 ⟶ 1,819:
-- iconSize: The icon size, including "px" suffix. The default is defined in
-- defaultIconSize.
-- iconSmallSize: The icon size if we are outputting a small template. The
-- default is defined in defaultSmallIconSize.
-- text: The notice text. This may be a string or a function. If it is a
-- function, it takes an article history object as the first parameter, and
Line 1,857 ⟶ 1,846:
icon = 'Symbol question.svg',
iconCaption = 'Did You Know',
iconSmallSize = '15px',
noticeBarIcon = true,
isActive = function (articleHistoryObj)
Line 1,863 ⟶ 1,851:
end,
makeData = function (articleHistoryObj)
return makeDateData(articleHistoryObj, 'dyk', {'entry', 'nom', 'ignoreerror'})
end,
text = function (articleHistoryObj, collapsibleNoticeObj)
Line 1,879 ⟶ 1,867:
end
local fact = 'fact from this article'
local nomPage = data[1].nom or ('Template:Did you know nominations/' .. articleHistoryObj.currentTitle.text)
if data[1].nom then
if titleExists(nomPage) then
fact = '[[' .. data[1].nomnomPage .. '|' .. fact .. ']]'
end
local blurb = "A " .. fact .. " appeared on " ..
Line 1,932 ⟶ 1,921:
end,
categories = function (articleHistoryObj, collapsibleNoticeObj)
local data = collapsibleNoticeObj:getData(articleHistoryObj)
if not data[1].nom then
return retnil
end
local cats = {}
do
local status = articleHistoryObj:getStatusId()
local catstatusCat
if status == 'FA' then
catif status == 'FA' then
statusCat = 'Wikipedia Did you know articles that are featured articles'
elseif status == 'FL' then
cat statusCat = 'Wikipedia Did you know articles that are featured lists'
elseif status == 'GA' or status == 'FFA/GA' then
cat statusCat = 'Wikipedia Did you know articles that are good articles'
else
cat statusCat = 'Wikipedia Did you know articles'
end
retcats[#retcats + 1] = Category.new('Wikipedia CD Selection-GAs'statusCat)
end,
for _, t in ipairs(data) do
if not t.ignoreerror then
if status == 'FA't.entry then
local mCheckDYKEntry = require('Module:Check DYK hook')
if not mCheckDYKEntry._isValidHook(t.entry) then
cats[#cats + 1] = Category.new('Pages with a malformed DYK entry')
end
else
cats[#cats + 1] = Category.new('Pages with a missing DYK entry')
end
end
end
cats[1] = Category.new(cat)
return cats
end
Line 1,972 ⟶ 1,979:
if t.link then
date.link = t.link
elseif t.ymdDate >= 20110701 then
date.link = string.format(
'Wikipedia:In the news/Candidates/%s %d',
t.month,
t.year
)
elseif t.ymdDate >= 20090101 then
date.link = string.format(
Line 2,226 ⟶ 2,239:
end
end
end
return ret
end,
 
-- Track small banners
function (articleHistoryObj)
local ret = {}
if articleHistoryObj.isSmall then
table.insert(ret, Category.new('Small article history templates'))
end
return ret
Line 2,271 ⟶ 2,275:
-- The default size for icons. The default is 30px.
defaultIconSize = '30px',
 
-- The default size for icons for small templates. The default is 15px.
defaultSmallIconSize = '15px',
 
-- The default size for status icons. The default is 50px.
defaultStatusIconSize = '50px',
 
-- The default size for status icons for smallmulti status templates. The default is 30px.
defaultSmallStatusIconSizedefaultMultiStatusIconSize = '30px',
 
-- The default size for notice bar icons. The default is 15px.
Line 2,286 ⟶ 2,287:
-- The default size for collapsible status icons. The default is 50px.
defaultCollapsibleNoticeIconSize = '20px',
 
-- The default size for collapsible status icons for small templates. The
-- default is 30px.
defaultSmallCollapsibleNoticeIconSize = '20px',
 
-------------------------------------------------------------------------------