Open main menu

Changes

Module:Infobox

132 bytes added, 13:05, 13 July 2019
Undid revision 906073835 by Gonnym (talk) errors in code were reported
-- This module implements {{Infobox}}
--
local p = {}
-- the next two lines add a newline at the end of lists for the PHP parser
-- https://en.wikipedia.org/w/index.php?title=Template_talk:Infobox_musical_artist&oldid=849054481
-- remove when [[:phab:T191516]] is fixed or OBE
s = mw.ustring.gsub(s, '([\r\n][%*#;:][^\r\n]*)$', '%1\n')
s = mw.ustring.gsub(s, '^([%*#;:][^\r\n]*)$', '%1\n')
s = mw.ustring.gsub(s, '^([%*#;:])', '\n%1')
s = mw.ustring.gsub(s, '^(%{%|)', '\n%1')
return s
else
:cssText(rowArgs.datastyle)
:cssText(rowArgs.rowcellstyle)
:newline()
:wikitext(fixChildBoxes(rowArgs.data, 'td'))
end
:css('text-align', 'center')
:cssText(args.belowstyle)
:newline()
:wikitext(fixChildBoxes(args.below,'td'))
end
addRow({
data = args['subheader' .. tostring(num)],
datastyle = args.subheaderstyle or , rowcellstyle = args['subheaderstyle' .. tostring(num)],
class = args.subheaderclass,
rowclass = args['subheaderrowclass' .. tostring(num)]
local function renderTrackingCategories()
if args.decat ~= 'yes' then
if args.child == 'yes' then if args.title then root:wikitext('[[Category:Pages which use embedded infobox templates with the title parameter]]') end if elseif #(getArgNums('data')) == 0 and mw.title.getCurrentTitle().namespace == 0 then
root:wikitext('[[Category:Articles which use infobox templates with no data rows]]')
end
if args.child == 'yes' and args.title then
root:wikitext('[[Category:Pages which use embedded infobox templates with the title parameter]]')
end
end
Anonymous user