Difference between revisions of "Module:Changes"
Jump to navigation
Jump to search
(General test) |
m (I mean life is always better if you don't leave important things commented out) |
||
Line 1: | Line 1: | ||
local p = {} | local p = {} | ||
-- Changes | -- Changes | ||
function p.changes() | |||
local groups = {} | |||
local n = 1 | |||
local s = nil | |||
local groups = {} | repeat s = mw.getCurrentFrame().args["group" .. n] | ||
local n = 1 | groups[n] = s | ||
local s = nil | print(groups[n]) | ||
repeat s = mw.getCurrentFrame().args["group" .. n] | until not s | ||
end | |||
until not s | |||
return p | return p |
Revision as of 18:17, 9 February 2015
Replacement Lua scripting to do what Template:Changes does/did, but in a more flexible way.
- It supports the new structure of Version History.
- It can have as many changes as needed, providing that they go up sequencially, and numbers are not missed out (change1, change2, change3 is ok, but change1, change3 isn't).
- It should be faster.
Message me (Chocohead) either on the wiki (here) or on the Forum if you find any problems.
The above documentation is transcluded from Module:Changes/doc. (edit | history)
local p = {} -- Changes function p.changes() local groups = {} local n = 1 local s = nil repeat s = mw.getCurrentFrame().args["group" .. n] groups[n] = s print(groups[n]) until not s end return p