Changes

Jump to navigation Jump to search

Module:Citation

1,428 bytes added, 17:58, 27 August 2012
Added support for Template:reflist.
text = z.wikitext.tag(frame, {name="span", contents=text, params=args})
end
local hiddenspace OCinS = z.wikitext.tag(frame, {name="span", contents=" ", params={styleclass="display: none;Z3988"}}) local OCinS = z.wikitext.tag(frame, {nametitle="span"OCinStitle, contents=hiddenspace, params={classstyle="Z3988display: none;",title=OCinStitle}})
return text .. OCinS
if ( args.noid ~= nil and args.noid ~= "" ) then params.id = "ref_" .. P1 .. P3 end
return z.wikitext.tag(frame, {name="sup",contents=contents,params=params})
end
 
-- This is used by template {{reflist}}.
function z.reflist(frame)
local pframe = frame:getParent()
local config = frame.args -- the arguments passed BY the template, in the wikitext of the template itself
local args = pframe.args -- the arguments passed TO the template, in the wikitext that instantiates the template
local contents = args.refs or ""
local liststyle = args.liststyle
local count = args[1]
local width = args.colwidth
local group = args.group
local params = {}
if ( tonumber(count) and nil == width ) then
width = count
count = nil
end
if ( nil == liststyle ) then
if ( "upper-alpha" == group or "lower-alpha" == group or "upper-roman" == group or "lower-roman" == group or "upper-greek" == group or "lower-greek" == group ) then
liststyle = group
else
liststyle = "decimal"
end
end
params.class = "reflist"
params.group = group
params.style = z.wikitext.liststyle(liststyle)
if ( nil ~= count ) then
params.class = params.class .. " references-column-count references-column-count-" .. count
params.style = params.style .. " " .. z.wikitext.columncountstyle(count)
end
if ( nil ~= width ) then
params.class = params.class .. " references-column-width"
params.style = params.style .. " " .. z.wikitext.columnwidthstyle(width)
end
return z.wikitext.tag(frame, {name="references",contents=contents,params=params})
end
return z
Anonymous user

Navigation menu