Modul:Revision
Dokumentaciju za ovaj modul možete napraviti na stranici Modul:Revision/dok
local p = {}
--original template synstax: {{ diff | page | diff | oldid | label }}
--new template syntax: {{#invoke:Revision|diff|page|diff|oldid|label}}
--alternative new template syntax: {{#invoke:Revision|diff|page=page|diff=diff|oldid=oldid|label=label}}
function p.diff(frame)
local page = frame.args.page or frame.args[1]
local diff = frame.args.diff or frame.args[2]
local oldid = frame.args.oldid or frame.args[3]
local label = frame.args.label or frame.args[4]
local url = string.format('%s%s/index.php?title=%s&diff=%s&oldid=%s', mw.site.server, mw.site.scriptPath, mw.uri.encode(page, "WIKI"), diff, oldid)
return string.format('<span class="plainlinks">[%s %s]</span>', url, label)
end
return p