Open main menu

Changes

Module:Citation

No change in size, 22:17, 26 August 2012
Fixed variable conflict.
--require "mw.text"
local p z = {
wikitext = require "Module:Wikitext"
}
function doi(frame, id)
local text = hideinprint(frame, "[[Digital object identifier|doi]]:[http://dx.doi.org/{{urlencode:" .. id .. "}} " .. pz.wikitext.tag(frame, {name="nowiki",contents=id,params={}}) .. "]")
if ( string.sub(id,1,3) ~= "10." ) then
text = text .. "[[Category:Pages with DOI errors]]"
end
local args = { class="citation " .. config.CitationClass, id=id }
text = pz.wikitext.tag(frame, {name="span", contents=text, params=args})
end
return text
if ( page ~= nil ) then
local contents = ":" .. page
p = pz.wikitext.tag(frame, {name="sup",contents=contents,params={class="reference",style="white-space:nowrap;"}})
end
return pz.wikitext.tag(frame, {name="ref",contents="",params={name=name,group=group}}) .. p
end
local args = { name = refid(pframe.args) }
-- return mw.text.tag{name = "ref", contents = content, params = args}
return pz.wikitext.tag(frame, {name = "ref", contents = content, params = args})
end
params.class="reference"
if ( args.noid ~= nil and args.noid ~= "" ) then params.id = "ref_" .. P1 .. P3 end
return pz.wikitext.tag(frame, {name="sup",contents=contents,params=params})
end
return pz
Anonymous user