Content deleted Content added
disable these when in demospace as they mess up the page |
pushing some changes from sandbox live; details at talk page |
||
Line 99:
local current = self.currentTitle
local ret
-- Skip if user provides their own blurb.
if args.text then
ret = args.text
else
-- Set parent talk page.
local talkPage = current.nsText .. ':'
if args.prefix then
Line 109 ⟶ 112:
end
-- Check current namespace for blurb.
local namespace = 'main'
if current.isTalkPage == true then
Line 114 ⟶ 118:
end
-- Most talk pages are "about" an article. For user talk page archives
-- use "with" instead as User:X will also be a participant. User talk
-- archives will be found in both User and User talk namespaces (2,3).
-- For noticeboards and wikiprojects use "on" as the discussions are
-- typically not about the noticeboard itself (4,5).
local namespacePreposition = "about"
if current:inNamespaces(2, 3) == true then
namespacePreposition = "with"
elseif current:inNamespaces(4, 5) == true then
namespacePreposition = "on"
end
-- Set page under discussion.
local subjectPage = current.subjectNsText .. ':' .. current.rootText
-- Prepend colon for non-mainspace pages.
Line 119 ⟶ 136:
subjectPage = ':' .. subjectPage
end
subjectPage = makeWikilink(subjectPage)
if args.
-- For manually-indexed archives only
ret = self:message('blurb-period', talkPage, makeWikilink(subjectPage),▼
ret = self:message('blurb-index', talkPage, subjectPage,
args.period, namespace)▼
args.type, namespace, namespacePreposition)
elseif args.period then
▲ args.period, namespace, namespacePreposition)
else
ret = self:message('blurb-noperiod', talkPage,
'', namespace, namespacePreposition)
end
end
Line 252 ⟶ 274:
local table = makeTable('30em')
for
if tostring(title) == self.currentTitle.prefixedText then
table:tag("td"):wikitext(string.format(
Line 318 ⟶ 340:
end
local table = makeTable(width)
for
table:tag("td"):wikitext(s)
end
Line 340 ⟶ 362:
end
-- Allow for demo pages to be edited freely.
if not args.demospace then
boxComponents = boxComponents .. ' __NONEWSECTIONLINK__ __NOEDITSECTION__ __ARCHIVEDTALK__'
end
return boxComponents
end
|